New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake: CMake Build System 3.0 overhaul for future feature compatibility #8247
Conversation
Additional InformationInstead of ballooning the OP, I'll add some additional features/highlights in the comments. These changes only apply when the 3.0 path is used: CMake
CMake finders
macOS
|
f89c250
to
f62806b
Compare
00c5355
to
7b7821a
Compare
7b7821a
to
7e9748f
Compare
There is a newer version, yes, which is still maintained. If the newer version for some reason does not meet our needs, we should work on that. |
Correct - updating the plugin to use that would fix the warnings by virtue of being a proper refactor. So I'm not concerned about leaving those warnings as a reminder to get around to that at some point. |
6e06a61
to
384e5d8
Compare
384e5d8
to
77cc597
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some questions, some nits, and some items to fix.
I am perfectly okay with some things being deferred to a later PR (sweeping for c_std_11, cxx_std_11, etc.) if that creates less work here or keeps the diff minimal.
77cc597
to
ec8162f
Compare
ec8162f
to
c3ff7ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few items.
58418bd
to
f882db0
Compare
5d6d69c
to
8465aa7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to pass all of my local tests. Looks good to me. Pat or I will handle merge order and submodule updates.
9c6278a
to
cb086ca
Compare
OBS CMake build framework 3.0 is a minor overhaul of version 2.0. Due to close proximity of the 2.0 rework, the amount of actual changes to project files are minimal and mostly concern application generation. This commit contains the bootstrap elements only and requires OS-specific implementations to be functional.
Adds necessary macOS-specific implementation of the framework, focusing on native Xcode builds.
New code path only taken if OBS_CMAKE_VERSION is set to 3.0.0 or greater, old functionality remains unchanged.
cb086ca
to
bca8b8b
Compare
Description
This PR overhauls the existing CMake build system, utilising new features added to CMake in the year since the last update and fixing/integrating issues that arose from the prior update.
Due to increased code quality requirements by macOS builds via Xcode, additional long-existing warnings and code issues have been fixed as well.
Note: This first draft retains every change split up into separate commits to make it easier to fix bugs in specific modules. Appropriate squashing will happen before a final merge.
Dependencies: This PR requires the following PRs to also be merged:
In its current state, the code will compile, but without the obs-deps update macOS builds will not run (due to dynamic linker lookup incompatibilities).
Motivation and Context
Due to macOS 14 removing DAL Plugin functionality entirely, a new virtual camera based on a system extension is required. System extensions not only require code signing and notarisation but also attaching a provisioning profile to the application.
For this (and many other reasons) it became easier to have distributable builds of OBS be built by Xcode directly (as Ninja is not able to handle codesigning, bundling, and applying profiles automatically).
To achieve this, a lot of functionality currently spread out between build scripts (dependency management) the build system itself (generating the Xcode project) and installation scripts (bundling the application) have been integrated into the main build system:
For a transitional period Windows and Linux will still use the existing build scripts (aka "CMake Build System 2.0"), with follow-up PRs for Windows, Linux, GitHub Actions Workflows and build scripts are ready (and will be published after this PR has been stabilised enough - details on those changes will be explained in the respective PRs).
How Has This Been Tested?
Successful builds were created on macOS 13, Ubuntu 22.10, and Windows 11, as well as on CI.
As this PR only changes the way macOS builds are generated, checks on Linux and Windows should focus on regressions.
Types of changes
Checklist: