Commit Graph

43 Commits (9c85ff8673cdaeaa911b48cc54c002b0a6bb0916)

Author SHA1 Message Date
tytan652 9c85ff8673 cmake,UI: Refactor find_qt macro
If QT_VERSION is not defined, it gets define with the AUTO value. And
its definition is moved to the helper file.

find_qt now:
- Check quietly for Qt5 and Qt6
- If QT_VERSION is set to AUTO. It checks firstly if Qt5 was found it
  will use it. If not it do the same for Qt6
- If QT_VERSION is set to 5 or 6, it checks if the choice was found and
  use it. And if not, it falls back to the other if found.
- If neither Qt5 or Qt6 are found, a fatal error is emitted.
- The macro saved the _QT_VERSION in the cache to replace QT_VERSION,
  so the process is not repeated each time that find_qt is used.
- When Qt::Gui is in the Linux component list, Qt::GuiPrivate is added.
  So using the versioned one is no longer required.
2022-07-26 17:34:26 +02:00
PatTheMav 4e206896b2
cmake: Fix public header files being installed to rundir
Fixes oversight from https://github.com/obsproject/obs-studio/pull/6768
2022-07-21 22:35:09 +02:00
tytan652 2ba32763e5 cmake: Add PUBLIC_HEADER DESTINATION for development rundir
Fix a warning thrown by CMake.
2022-07-20 15:08:30 -04:00
PatTheMav 48c52c9d74 cmake: Fix libraries and header files being installed for packages
The `EXCLUDE_FROM_ALL` token, which is responsible for excluding
components from a "unspecified" installation (which we use to create
the distributed package) needs to be specified for _every_ destination
specified in an `install` call.

This commit remedies the issue of missing tokens in these calls.
2022-07-13 15:52:13 -04:00
tytan652 ed486b00e1 cmake: Fix headers installation
- Headers are now installed per default on Linux.
- `obs-hevc.h` is not installed if HEVC is disabled.
- OS exclusive headers are no longer installed on the wrong OS.
2022-05-07 16:13:21 -07:00
PatTheMav d42c98fa22
win-capture: Fix added resources not properly copied to rundir
The `add_target_resource` function uses unnecessary path components
when copying files to the rundir, resulting in files added that way
not to end up where OBS expects them to.

The generated binaries created by sub-targets also need to be copied
as part of `win-capture`'s data files, which was easy to fix as the
target exists before CMake switches into the subdirectories.
2022-03-30 11:10:54 +02:00
PatTheMav aae3a6a466 cmake: Fix diverging prefix padding for OBS status outputs
Status output related to OBS configuration is prefixed with the string
"OBS" and added padding for enabled and disabled features. This padding
was not aligned between platforms.

By moving the padding and prefix decoration into its own function,
both elements are controlled in a single place. CMake scripts were
changed to use this new function `obs_status` instead of using CMake's
`message` function directly.
2022-03-26 09:44:23 -04:00
PatTheMav 1a7f5fb48e cmake: Fix targets not being copied into rundir on Windows and Linux
Windows and Linux do not require a contained application bundle to run
and debug OBS - as such targets can and should be copied independently
from the main OBS application target.

Also silences the output of the `install` step that sets up those files.
2022-03-21 13:18:57 -04:00
PatTheMav df94b02075
cmake: Update CMake finders and helper modules 2022-03-16 23:11:06 +01:00
Ryan Foster a7b20fcd2a cmake: Remove outdated osxbundle files
These files have been superseded by files in CI/scripts/macos. They are
no longer used, and keeping them around creates confusion and makes
people think they are still used. Let's remove them to prevent further
confusion.

This commit also removes the CMake function `obs_finish_bundle` that was
only used with the osxbundle resources and removes calls to that
function.
2021-05-08 18:57:14 -07:00
jp9000 63bcc54b32 cmake: Automatically copy datatarget PDBs
Helps ensure DLLs associated with game capture, virtual camera, and
other such files have their PDBs copied alongside them in any Windows
build, and allows the ability to trace crashes that may occur from
within those files more easily.
2021-04-11 16:47:32 -07:00
jp9000 dc3839ab74 cmake: Add function for installing data from abs path
Allows the ability to install extra data from a specific absolute path
rather than a path relative to the cmake current source dir.  Useful if
say I want to generate data files in to the cmake binary folder rather
than put them in the data folder of the cmake source dir.
2020-09-06 17:46:03 -07:00
Rat f6aed7cb72 obs-scripting: Fix script plugin destination path on MacOS
The actual plugin files get copied to obs-scripting/ without the
64bit subdir like everything else on MacOs, fix this path accordingly
otherwise the scripting home dir passed to Python is incorrect
2019-09-26 23:29:05 +02:00
jp9000 85d259e05c cmake: Make directory before copying file
Fixes the install_obs_data_file cmake helper function to be more
consistent across operating systems.
2018-09-07 03:41:36 -07:00
jp9000 1ea4da3f98 cmake: Add install_obs_data_file function
Allows copying an individual file (which may not be in the data dir) to
an specified install location.
2018-09-07 00:20:14 -07:00
jp9000 db2d4c97e8 deps/obs-scripting: Fix installed files/locations on linux
Uses the 'install' command in cmake to install scripting modules/files
(such as _obspython.so, obslua.so, and obspython.py), and changes the
install location of those files on all operating systems.  If using a
non-unix structure install, those files will be installed in
data/obs-scripting/[32bit/64bit], otherwise with unix structure installs
those files will be installed to [/usr/local/lib]/obs-scripting.
2018-01-16 03:55:38 -08:00
jp9000 899557699f libobs: Add OBS_UNIX_STRUCTURE config variable
This obsconfig.h variable will be true or false depending on whether the
project is configured with the cmake UNIX_STRUCTURE variable or not.
2015-06-01 16:42:27 -07:00
Kevin Tardif c293c17620 Generate proper DL_OPENGL value for linux
Since we rely on the dynamic linker to find the library for us via
dlopen(), we need to have DL_OPENGL be .so.N, not the full library
filename, as ldconfig doesn't cache the full filename

Use of TARGET_SONAME_FILE requires the library to be marked as SHARED,
not MODULE

This closes pull request #370
2015-02-16 15:28:42 -05:00
Carl Fürstenberg 6095e7ef51 Add SOVERSION to libobs-opengl
Because libobs-opengl is a public library, it's customary to have SONAME
embedded in the library file.  Also remove the prefix override and
remove the prefixing "lib" from the output name.  This also requires us
to pass the library file name to dlopen invocations.
2015-01-13 17:51:38 -08:00
BtbN 8841ea8a6f cmake: Export plugin data destination 2014-09-27 09:41:32 -07:00
BtbN f24f53ea27 cmake: Add helper function to install plain files 2014-09-27 09:41:32 -07:00
BtbN 73d3dbf947 cmake: Change obs helper macros to functions 2014-09-27 09:41:31 -07:00
BtbN c9d3c6c8c1 cmake: Refactor growing list of library locations 2014-09-27 09:40:45 -07:00
BtbN 02725acdd4 Fix double invocation of install_obs_plugin in every single plugin 2014-08-19 14:24:59 +02:00
BtbN 8380d10805 Export plugin destination and relative prefix to obsconfig.h 2014-07-26 14:27:39 +02:00
BtbN 3442654259 Remove lib prefix from plugins 2014-07-26 14:09:34 +02:00
BtbN 0b7ef499c5 Add relative plugin dest obsconfig.h define 2014-07-26 14:07:14 +02:00
BtbN cac6ad1822 Move config values from the commandline to obsconfig.h 2014-07-26 14:07:14 +02:00
jp9000 5c597102f2 Improve additional_install_files for debug/release
This improves dependency copying and adds separated debug/release
install files.
2014-07-18 22:41:11 -07:00
BtbN 415a698bac Add support for build time dependency copying 2014-07-19 01:38:42 +02:00
BtbN 4b5b7534aa Copy and install PDB files on msvc builds 2014-07-19 01:38:41 +02:00
BtbN 34923f1f83 Also export a plugin destination, so external plugins know where to install stuff 2014-05-08 14:43:16 +02:00
BtbN 7abf95be27 Use relative path in installed cmake file 2014-05-08 14:43:16 +02:00
BtbN 4959db83d4 Fix absolute path detection 2014-05-08 14:43:16 +02:00
BtbN 38594fff9e Export libobs cmake target, so external plugins can be built without ugly hacks 2014-05-08 14:43:16 +02:00
BtbN 075820028f Improve bundle fixup 2014-04-13 11:05:46 -07:00
BtbN 221a69298b Add a new install function to install targets into the datadir structure
This is mainly intended to be used for preloaded/injected DLLs, which
don't belong into the libdir or plugindir.
2014-04-01 21:33:07 +02:00
BtbN 074f9627b7 Fixup OSX Rpath for imported external libraries on install 2014-01-28 23:07:49 +01:00
BtbN cfc3609a4e Fix/Workaround a cmake path seperator escaping bug on Windows 2014-01-26 02:04:36 +01:00
Palana c1599a069a Remove unnecessary distinction between 32bit and 64bit on osx 2014-01-25 20:39:09 +01:00
jp9000 93d15ef254 Fix some formatting issues and fix cmake file 2014-01-25 12:34:37 -07:00
BtbN 6a9dda87bd Restructure installation and package generation 2014-01-25 19:13:33 +01:00
BtbN 45ec80fb7d Full rewrite of all CMakeLists
CMake now works on all platforms
2014-01-24 18:56:32 +01:00