0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
Commit Graph

335 Commits

Author SHA1 Message Date
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
Norihiro Kamae
75805eaecb cmake: Remove ObsPluginHelpers.cmake 2023-06-30 12:45:48 -04:00
PatTheMav
a01e2e9ced CI: Update main workflow to enable building with macOS 13 runners 2023-06-29 10:48:15 -04:00
PatTheMav
850976eba9 cmake: Add Windows component to CMake build framework 3.0 2023-06-29 10:11:32 -04:00
PatTheMav
0b325c0e34 cmake: Add separate function to set Xcode-based target properties 2023-06-17 12:23:33 -04:00
PatTheMav
9805b706d1 cmake: Remove legacy files for macOS builds 2023-06-17 12:23:33 -04:00
PatTheMav
50a4e83251 cmake: Remove Info.plist template files for macOS builds
Creation of Info.plist files through Xcode is more canonical and
future-proof, as it will automatically pick up changes/updates
introduced by Apple. Non-standard keys can still be added via a
template file, which will then be extended by Xcode with the default
keys.
2023-06-17 12:23:33 -04:00
PatTheMav
eb3d9963a0 cmake: Update macOS compiler configuration
Compiler extensions are disabled before the first `project` call to
force CMake into considering compilers to not support GNU extensions
(even though clang and gcc do).

Also sets common clang compiler options so they can be used across all
supported platforms.

`openmp-simd` support is enabled by default as there is no performance
penalty on x86_64 systems and intrinsics are enabled on arm64.

Also implements CMake's `CMAKE_COMPILE_WARNING_AS_ERROR` flag to
enable the desired behavior and configuration time.
2023-06-17 12:23:33 -04:00
PatTheMav
e2e3c9e102 cmake: Fix CMake policy scopes and add include guards
Include guards ensure that bootstrap includes happen only once for the
entire project. Moving all policy changes into an included file without
its own policy scope ensures that the policy is applied to the project.
2023-06-17 12:23:33 -04:00
PatTheMav
887b537d56 cmake: Update buildspec and presets for macOS 2023-06-17 12:23:33 -04:00
PatTheMav
4d5b6eb50f
cmake: Disable automatic sorting of compiler flags
Also restores original order of compiler flags and more explicitly
splits up flags for the specific languages in which they take effect.

Notice that ObjC and ObjC++ follow a slightly stricter set of rules
than C and C++, which is reflected by this fix.
2023-06-16 23:21:35 +02:00
PatTheMav
e9972f5198
cmake: Fix truncation warning being treated as an error with Ninja 2023-06-16 20:48:49 +02:00
PatTheMav
29dc42decd cmake: Enable suggested default Xcode build settings for macOS builds
Also updates Ninja-based clang settings to ensure builds fail on same
compilation issues.
2023-06-16 14:12:58 -04:00
PatTheMav
c7ec604df1 cmake: Disable Framework code signing at build time
Frameworks should be archived and exported (where they will be
codesigned by Xcode) or shipped within an App bundle where Xcode will
also take care of it.
2023-06-16 14:12:58 -04:00
gxalpha
6e7e4acb93 mac-syphon: Update Syphon, use obs-deps framework
Updates the syphon to use the Syphon.framework from obs-deps instead of
the submodule.
The submodule however was not updated in 9 years and additionally had
custom patches, compared to the obs-deps release that's built on the
current git commit of Syphon, meaning that some code changes are
necessary. It would be nice to split the code and cmake changes into
multiple commits (where the first would update the submodule and contain
the plugin code changes, and the second switch the cmake away from the
submodule to the obs-deps release), but it really doesn't make sense to
update the submodule first if it gets removed anyways.

Adds a subclass for SyphonClientBase that is responsible for receiving
the frames. This has the advantage that it doesn't need an OpenGL
context like the existing SyphonOpenGLClient, and can just return an
IOSurface directly (without some kind of middleman).
2023-06-15 13:08:41 -04:00
Sean DuBois
19a297f81a CI: Update deps to 2023-06-01 release
Notable changes:
 * deps.ffmpeg: Add libdatachannel
 * deps.macos: Add Syphon Framework

Library added to support WHIP (WebRTC) output.
2023-06-09 20:20:49 -05:00
Lain
106c7aa61f Update copyrights/names 2023-05-20 01:31:18 -07:00
PatTheMav
3c28d3a2bc cmake: Remove use of CPack and generate packaging AppleScript directly 2023-05-18 14:41:08 -04:00
PatTheMav
3f85e447a8 mac-virtualcam: Add Camera Extension to main CMake plugin project
Camera Extensions require specific entitlements for the hosting app,
which also require a provisioning profile. To avoid breaking local
builds that do not require the camera extension, an additional
entitlements file that will not trigger the provisioning profile
requirement will be used if the virtualcam (but not the Camera
Extension) is configured.
2023-05-18 14:41:08 -04:00
tytan652
6e887f8158 obs-ffmpeg,cmake: Replace external folder by obs-deps headers 2023-05-13 17:06:39 -07:00
tytan652
12ad59f31f cmake: Enforce -Wmaybe-uninitialized to never turn into an error 2023-05-05 16:46:59 -04:00
derrod
4a8e8644e0 cmake,UI: Remove unused legacy DSA public key 2023-04-29 16:10:45 -07:00
PatTheMav
f1aba10dc0 cmake: Fix version detection for FFmpeg find module 2023-04-29 16:06:33 -07:00
derrod
90b8e3585e cmake: Set C11 for CMake < 3.21 2023-04-17 14:55:44 -04:00