Commit graph

32 commits

Author SHA1 Message Date
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
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 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
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
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 902843634c
CI: Add new build and packaging scripts for macOS 2023-07-17 19:49:18 +02:00
PatTheMav a01e2e9ced CI: Update main workflow to enable building with macOS 13 runners 2023-06-29 10:48:15 -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
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
PatTheMav 9f191b5101 cmake: Fix buildspec version parsing for dependencies
VERSION comparison requires semver-compliant version strings, but
obs-deps versions are based on dates, which are not compliant. Fix
version strings to semver variants before comparison.
2023-04-14 20:10:19 -04:00
PatTheMav d6a5532394 cmake: Skip dependency setup for CEF when using universal architectures 2023-04-08 16:33:18 -07:00
PatTheMav e4ff8fab7a cmake: Fix discovery of existing pre-built dependencies
As there will be multiple directories containing obs-deps (non-Qt and
Qt variants), the search needs to continue after a first failed attempt
and not abort it entirely.
2023-04-08 16:33:18 -07:00
derrod 35d42f77d6 cmake: Set C standard to ISO C17
- Sets CMAKE_C_STANDARD to 17
- Disables C extensions (e.g. gnu17) to force ISO C on macOS/Windows
- Fixes language properties in cmake 3.0 not being set correctly
- Sets Xcode attributes to c17
2023-04-08 19:30:12 -04:00
PatTheMav a0000412fa cmake: Add changes required to use Xcode archiving 2023-03-29 10:31:57 -04:00
PatTheMav 349372b3b3 cmake: 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.
2023-03-26 18:20:38 -04:00
PatTheMav bbeea0972a cmake: Add Xcode component to CMake build framework 3.0
Adds necessary macOS-specific implementation of the framework, focusing
on native Xcode builds.
2023-03-26 18:20:38 -04:00