Commit graph

358 commits

Author SHA1 Message Date
tytan652 b16516a3fa Revert "cmake: Fix script plugin path on Linux with CMake 3"
This reverts commit 7a4cb085ba.
2024-06-14 17:34:14 -04:00
tytan652 4b187ed38c cmake: Copy shared library soname file to rundir on Linux
Soname files are required since 1d8c377240
2024-06-10 16:32:11 -04:00
tytan652 7a4cb085ba cmake: Fix script plugin path on Linux with CMake 3 2024-06-08 17:08:25 -04:00
tytan652 1d8c377240 cmake,UI: Fix SOVERSION on Linux 2024-06-05 18:16:45 -04:00
Kamal Mostafa d813b7837a cmake: Do not write build number file if OBS_BUILD_NUMBER set
Allows for configuration and build from a read-only-mounted source dir
by setting the build number externally. For example:
`cmake -DOBS_BUILD_NUMBER=1`
2024-05-28 14:33:44 -04:00
Paul Hindt 182410cf6c aja: Prepare plugins for new libajantv2 repo
Support building AJA plugins with either the new libajantv2 library, or
the deprecated ntv2 library.

Finder scripts updated to search for libajantv2 and fall back to ntv2 if
not found. This allows this PR to be merged without requiring a
corresponding update to the pre-built obs-deps packages.
2024-05-02 14:31:16 -04:00
Ryan Foster 649c62cfac cmake: Remove more Qt 5 code
Qt Gui virtualkeyboard plugin was removed in Qt 6.x.
Qt Network Bearer Management was removed in Qt 6.0.
Qt Multimedia mediaservice and audio plugins were removed in Qt 6.x.
2024-04-30 12:02:26 -04:00
derrod eea0e3d2cc cmake: Remove font size patch on macOS 2024-04-21 00:01:16 -04:00
Ryan Foster 8a7ad10262 cmake: Remove find_qt macro
We no longer need this functionality in the new CMake paths. It is still
available in the legacy CMake path.
2024-04-17 21:52:14 -04:00
PatTheMav 0af0de26eb libobs: Add changes for CMake build framework 3.0
New code path only taken if OBS_CMAKE_VERSION is set to 3.0.0 or
greater, old functionality remains unchanged.
2024-04-13 23:48:38 -04:00
PatTheMav e77b12820f cmake: Add Linux component to CMake build framework 3.0 2024-04-13 23:48:38 -04:00
tytan652 cebc828cb8 cmake: Add finder for uthash 2024-04-07 10:01:25 +10:00
Aleks Todorov 80ad63a6da cmake: Provide a clear error on version check fail
Currently, when git describe fails to get a git tag for the OBS Version,
a non-fatal message is printed, and the generator is left to continue,
usually ending up with a more cryptic error message down the line.

Instead, print the git output together with a short description of what
actually happened, and exit fatally so the problematic line of code is
clear. An added advantage is that the git output is printed in red
instead of (say) white on color-enabled terminals.
2024-04-04 15:13:43 -04:00
derrod 98ee9c987e cmake: Add HANDLE_VERSION_RANGE to FFnvcodec finders 2024-03-31 02:05:40 -07:00
Azamat H. Hackimov d9b3969bc5 Add CheckSymbolExists module for FindMbedTLS.cmake
FindMbedTLS.cmake uses `check_symbol_exists` macro which requires
`include(CheckSymbolExists)` before invocation (see
https://cmake.org/cmake/help/latest/module/CheckSymbolExists.html).

Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com>
2024-01-29 16:57:15 -05:00
tytan652 7c2b39436b cmake: Skip PDB install for interface target 2024-01-28 11:00:01 +11:00
tytan652 cdca983733 cmake: Skip generate export header if interface in legacy path
It backports a behavior from CMake 3.0 to CMake 2.0
2024-01-28 11:00:01 +11:00
Norihiro Kamae 1d4107d744 cmake: Fix Xcode version error message 2024-01-13 17:51:45 -06:00
PatTheMav 07dd32ad14 obs-ffmpeg: Disable hardened runtime when using ad-hoc signing 2024-01-09 10:59:14 -05:00
PatTheMav e79b190f68 cmake: Update MbedTLS finder to support MSVC Debug configuration
Natively compiled MbedTLS for Windows will use the non-debug platform
library, which will lead to a linker error when building OBS in debug
configuration with MSVC.

Neutralizing the linker directive for Debug builds on Windows
unbreaks the build configuration without the need to ship separate
debug variants of MbedTLS.
2024-01-08 18:54:28 -05:00
PatTheMav ec9809bd43 cmake: Update build requirements to Xcode 15.1 and macOS 14.2 SDK
Lowest supported macOS version to build(!) macOS will be 13.5 with this
change.
2024-01-03 22:02:25 +01:00
PatTheMav 7dbde70de1 cmake: Remove support for generators besides Xcode on macOS 2023-12-19 17:59:44 -05:00
PatTheMav eae4673071 cmake: Update CMake formatting with manual format choices 2023-12-19 17:59:44 -05:00
PatTheMav 8135085a23 cmake: Replace custom Qt discovery function with CMake default
find_qt was necessary during the transitional period between Qt5 and
Qt6. With Qt6 being the only supported Qt version (for open source) for
the time being, code complexity can be reduced for easier maintenance.
2023-12-19 17:59:44 -05:00
gxalpha baa3243412 Revert "cmake: Align Product Name and Bundle Name on macOS"
This reverts commit 9f66c23825.

This commit caused a crash in CEF on startup for many users. Let's just
revert it asap for now and worry about the minor problem it was solving
another time.
2023-12-10 16:56:36 +01:00
PatTheMav 9f66c23825 cmake: Align Product Name and Bundle Name on macOS 2023-11-19 15:04:28 +01:00
derrod 40e4f789c8 cmake: Enable /GL and /LTCG for non-Debug configurations 2023-11-17 11:04:33 -05:00
PatTheMav e075e7057c cmake: Force PDB generation on Windows for MSVC builds in all configs
CMake 3.25 changed the way PDB generation is handled by only enabling
it for Debug and RelWithDebInfo builds, which prohibits generation of
fully optimized builds with associated symbols (which is MSVC's
default).

If configuring with CMake 3.25 or above, enable this globally for builds
using MSVC and fall back to embedded debug information for anything else
(which would probably be clang-cl).
2023-11-11 17:17:20 -06:00
tytan652 bee71b32d2 cmake: Allow finding the CEF wrapper without a build folder on Linux 2023-11-04 18:19:28 -05:00
gxalpha 8dd20dfd33 cmake: Explicitly fail if macOS SDK is too old
Adds a check to explicitly make sure that the macOS SDK being used is
recent enough to build OBS. OBS code currently has ifdefs for older SDKs
in some but not all places and relies on some frameworks existing that
do not exist on older versions, this should clarify what we require.
This commit sets the minimum SDK to 13.1 as this is what our wiki
currently specifies. This can be increased in the future if required.
2023-10-17 14:13:54 -04:00
PatTheMav cc387d7b66 cmake: Use dependency hashes to track revisions
Store and read dependency hashes to determine if a dependency needs to
have its extracted copy replaced (e.g., a dependency that had its
revision changed but not its version changed).
2023-10-09 16:49:29 -04:00
Kurt Kartaltepe 9b98686c31 cmake: Depend entirely on pkg-config if found for VPL
Released versions of VPL have a pkg-config that orders dependencies
before the main VPL library. This causes our library searching with
pkg-config hints to instead search for the first dependency of VPL.

Instead just import the pkg-config definition directly and use it. This
is a bit more correct as all the dependencies will be correctly linked.

Also install the library since the debian package doesnt seem to depend
on the library itself...

fixes #9573
2023-10-09 11:53:59 -04:00
derrod e11ffeccb0 cmake/libobs: Only set beta/rc increment 2023-10-06 17:21:51 -06:00
PatTheMav b3949e6aef cmake: Update qrcodegen finder to match target names of CMake package
qrcodegen is built on obs-deps for macOS and Windows, with the
generated CMake package calling the dependency qrcodegen (not
libqrcoden) and associated target qrcodegen::qrcodegen.

This change updates the finder (required for Linux) to create the same
targets so consumers do not need to differentiate between different
variations of the same dependency on Linux.

Also updates obs-websocket to 5.3.1 to bring in associated CMake
changes.
2023-09-27 18:05:02 -04:00
PatTheMav 00d6f0b26e cmake: Fix regular expression for beta and RC version detection 2023-09-10 10:12:13 +10:00
Kurt Kartaltepe 368082d6c0 obs-qsv11: Use device enumeration for choosing DRM device
Trying to use the display server as the QSV device was found to be
generally wrong in beta, so instead lets save defaults from the earlier
device enumeration similar to obs-ffmpeg-vaapi which is known to work
well.
2023-08-26 16:40:46 -07:00
Ryan Foster 2bf0a800d3 cmake: Restrict FindCEF path to omit default paths on Windows
On Windows, if CEF libraries were present in default paths, they would
be picked up in this find_program call, and it could later cause a build
failure in the CMake custom copy commands on install if the components
we are trying to copy do not exist. I recently ran into this after
installing Intel PresentMon, which included CEF components, and was
picked up by this find_program call. Let's apply NO_DEFAULT_PATH here
the same as the find_library calls in this finder.
2023-08-25 10:36:16 -04:00
derrod 4c51c99d28 cmake: Parse beta/rc version from override/git describe 2023-08-19 17:12:50 +02:00
Kurt Kartaltepe b6b8f5b80a obs-qsv11: Fix VPL initialization on intel-mediaSDK
VPL does not have a consistent initialization process for the various
backends it dispatches to. So this resolves the new VPL dispatcher
failing to initialize the video session when it dispatches to
intel-mediaSDK backend. On the oneVPL-intel-gpu backend VA-API sessions
are correctly initialized so this wasnt noticed when tested on newer
hardware.
2023-08-16 15:40:02 -04:00
Gale dbbbcd8c57 obs-qsv11: Add VPL changes 2023-08-07 13:23:26 -04:00
derrod edf2c8210c cmake,plugins,build-aux: Remove enc-amf 2023-07-22 18:06:26 -07:00
pkv ce6a17e979 cmake: Copy libdatachannel DLL
Copy libdatachannel DLL whether it's compiled on MSVC (and named
datachannel.dll) or cross-compiled on MinGW (and named
libdatachannel.dll).

Signed-off-by: pkv <pkv@obsproject.com>
2023-07-20 10:28:11 -04:00
gxalpha 9d611a064f cmake: Remove Qt version selection and Qt 5 support 2023-07-19 11:56:54 -04:00
PatTheMav 902843634c
CI: Add new build and packaging scripts for macOS 2023-07-17 19:49:18 +02:00
PatTheMav c23bd7e05e cmake: Fix missing libobs subdirectories in MSVC code navigator 2023-07-17 10:36:50 -04:00
tytan652 d76de77abb cmake: Add finder for Libqrcodengencpp 2023-07-14 15:32:04 -04:00
Kurt Kartaltepe c6b470de9a obs-qsv11: Add a Linux implementation
This adds a CMake module for finding the QSV SDK (libmfx/onevpl) and an
the required platform components to initialize QSV with the VA-API
platform.
2023-07-14 12:19:33 -04:00
derrod 8d33da1fab cmake: Disable char8_t when using C++20 2023-07-05 09:39:41 -07:00
PatTheMav 61bed7a828 cmake: Fix copy to rundir in Release and MinSizeRel configurations
Generated post build action batch scripts retained an empty token to
the copy command with the used generator expression (as PDBs are only
generated for Debug and RelWithDebInfo configurations).

Moving their copy step into its own command (and using the `true`
CMake command, which is a no-op) ensures that builds in Release and
MinSizeRel correctly finish this step.
2023-07-02 14:48:25 +02:00
PatTheMav 1660e2536f cmake: Add flags for reproducible builds on Windows
Compiler and linker flags for reproducible builds on Windows were
omitted from the recent CMake rework in error. This commit adds those
flags back.
2023-06-30 16:16:17 -04:00