obsproject / obs-browser

CEF-based OBS Studio browser plugin
GNU General Public License v2.0
781 stars 223 forks source link

cmake: Update formatting and switch to native find_package call for Qt6 #424

Closed PatTheMav closed 9 months ago

PatTheMav commented 11 months ago

Description

Updates the CMake build script for the submodule as a companion PR to https://github.com/obsproject/obs-studio/pull/9769.

Motivation and Context

Clean up the code and remove unnecessary build specifics.

The main breaking change of this PR is that it correctly requires the wrapper library to be built according to the official documentation for Windows:

Linking CEF dynamically (as obs-browser does) requires the use of the dynamic MSVC runtime library and also disabling the sandbox functionality.

(Runtime library changes on Windows have been moved to a separate PR).

Current code works around this issue by forcing the runtime library to be linked statically, a workaround which is removed by this PR.

How Has This Been Tested?

Tested on Windows 11 with an updated wrapper library (built according to the documentation).

Types of changes

Checklist:

RytoEX commented 10 months ago

IIRC, this looked fine to me. The main caveat is that we would have to rebuild the Windows CEF wrapper to coincide with pulling this update into obs-studio?