SIMD Everywhere finder needs to be installed alongside libobs CMake
package since its headers depends on it.
C++ cmath header is included on Windows on ARM to ensure that all math
functions are correctly defined when included in C++ code.
https://github.com/simd-everywhere/simde/issues/1304
macOS intrinsics is included to make sure that no redefinition error
happens.
Ideally CMAKE_OSX_ARCHITECTURES should not be set automatically within
the project but should exclusively be a cache or environment variable
provided by the developer.
This would also match the requirement mentioned by the CMake
documentation that the value should be set before the first project()
call.
If this variable is not set, the Xcode generator would default to the
native platform of the host, but the buildspec system as well as the
"add_obs_plugin" function need a local "architecture" to work, so
use "CMAKE_HOST_SYSTEM_PROCESSOR" instead if CMAKE_OSX_ARCHITECTURES
was not provided.
Qt has some Release DLLs that end with the letter d:
* qdirect2d.dll
* qcertonlybackend.dll
* qopensslbackend.dll
* qschannelbackend.dll
As a result, they get caught by our simple check for if a DLL is a Debug
DLL which just checks if the DLL ends with the letter d.
Extend that check to exclude these specific DLLs from being marked as
Debug DLLs.
While CEF continues to ship & read this up to and including in CEF 6834,
it hasn't actually been used since Chromium 66, so we can safely remove
it without causing regressions in 5060 or 6533.
719f423e70
This prevents the Windows headers from defining min/max macros.
Use std::min and std::max.
Modifies deps, frontend, libobs-d3d11, libobs-winrt, decklink, obs-vst,
and win-dshow.
Using CGEventTapCreate instead of addGlobalMonitorForEventsMatchingMask
to listen to global hotkeys has the advantage of tighter control over
what permissions we need. Since we only listen to and do not modify the
event, it is enough to have "Input Monitoring" instead of the full
"Accessibility" (which would allow modifying the event after catching
it).
The regexp was not tolerating a + sign is the version string,
causing configuration to fail on Ubuntu 24.04 when the installed
version is 6.1.1-3ubuntu5+esm2.
Upon further review, the build directory is never set to build_$arch.
Currently, our CMake Presets on Ubuntu only use build_ubuntu. However,
we can attempt to be flexible here and simply exclude the build
directory configured in CMake.
The regex was incorrectly excluding any file with build in the name. The
intent was to exclude any build directories, so we should be able to
restrict this.
This warning is already enabled for Clang which causes issue for things
that are usually built with MSVC or GCC (e.g. non-macOS plugins).
obs-nvenc switch warning is also fixed in this commit.
obs-qsv11 has switch warning set to not become errors.
Windows and Linux allow the storage of configuration files relative
to the binary location, which is enabled by default on Windows and has
to be explicitly enabled on Linux.
This was originally conflated with the LINUX_PORTABLE build setting
which also allowed the application itself to be run from non-default
locations on a Linux system.
This change reintroduces the functionality behind the
ENABLE_PORTABLE_CONFIG build setting on Linux.
It also adds necessary code to make this setting compatible with the
recently introduced relocatable settings code changes:
When portable mode is enabled, user configuration, scene collections,
and profiles are stored in the config directory created for portable
mode.
To ensure that the find module prefers the variant of LuaJIT shipped
as part of obs-deps, it's necessary to give the name as shipped in
obs-deps the highest precedence.
This ensures that the "find_library" call will discover the less
version-specific variant of the library possibly installed via
Homebrew.
macOS builds should only use dependencies built via the obs-deps
build scripts. Default variants of the same dependencies are not
compatible with our app packaging requirements and thus will create
issues when creating the app bundle.
This is specifically an issue when MbedTLS is installed via Homebrew
which ships a CMake package config by default and is picked up
by our code ever since we switched to prefer CMake packages.
MbedTLS changed a lot of internals with their LTS version 3.6.0, which
are incompatible with the find module currently shipped with
OBS Studio.
The solution requires several changes to be applied at once:
* Rename the generated target name to MbedTLS::mbedtls to match the
name used by MbedTLS' own CMake package
* Update find module to use the updated target name(s)
* Set CMAKE_FIND_PACKAGE_PREFER_CONFIG to TRUE before trying to find
MbedTLS to ensure that CMake package files are used with priority
(Those are shipped only with MbedTLS 3.6.0 in obs-deps).
* A deprecation warning is emitted if the find module is used with
MbedTLS 3.6.0 available
CMake doesn't expect CMake package files to be separated in
subdirectories on Windows and instead expects all files to be put in
a single directory `cmake` found within one of the PREFIX paths.
Also fixes circular dependency in w32-pthreads CMake package config
file.