Qt uses a default font size of 13pt for QWidgets on macOS. By setting
the default font size to 10pt, text becomes too small for comfortable
use on macOS.
This PR patches the font files copied into the macOS bundle to use a
larger font-size of 12pt. It also sets the fallback font to the more
modern SF Display-based `.AppleSystemUIFont` used by default in macOS
if Open Sans is not found.
For exported targets `INCLUDES DESTINATION` behaves in a specific way
when running `install`: It sets the `INTERFACE_INCLUDE_DIRECTORY` for
the target (relative to the `INSTALL_PREFIX` when a relative path is
given).
This is not implicitly done by CMake, which resulted in the exported
libobs Framework to miss the variable and as such targets linking to
libobs were not able to find the necessary headers anymore.
* If a valid team id is provided, automatic code sign management is
enabled
* Different deployment targets for x86_64 and arm64 are enabled for
Xcode-based builds
* Codesign identity and code-sign style are set globally
MacOS' system information checks the CFBundleSupportedPlatforms value
in the app's property list file for the type. This was correctly set
for plugin bundles, but not binary bundles so far.
If the `git describe` command fails we want to fall back to a default
version. _OBS_DEFAULT_VERSION is not in the same format as the string
returned by `git describe` though. In the event that the command fails
just use _OBS_DEFAULT_VERSION directly rather than trying to parse it.
Fixes: cmake fails if git is not installed but .git/ exists #6940
SWIG uses the prefix target property to prefix generated Python
libraries with an underscore (so that obspython.py is loaded first,
which acts as a shim for the actual _obspython.pyd library on Windows).
Usually the prefix is set to an empty string on Windows (to avoid the
automatic "lib" prefix used by CMake), but this also removed the
necessary underscore prefix required for the Python library.
Currently the ffmpeg_mpegts_muxer output is integrated with ffmpeg-mux.
Both use obs native encoders in contrast with obs-ffmpeg-output which
relies on avcodec library.
This allowed easy implementation of SRT, RIST & HLS protocols through
avformat library.
The main drawback is that obs-ffmpeg-mux exe doesn't allow for easy
debugging nor logging of the protocols.
It was written initially as a separate binary designed for recording so
that if obs fails for some reason, the recording can still terminate
gracefully.
In this commit the ffmpeg_mpegts_muxer is rewritten so that a pipe to
the ffmpeg-mux binary is not used any more.
The muxing to mpegts is still delegated to avformat.
But it can be traced more easily in all its steps.
Also the protocol part for SRT & RIST is implemented natively.
Custom avio_contexts for SRT & RIST are used to that end.
This allows to pass our own implementation of librist and libsrt
libraries instead of relying on avformat. This is very advantageous :
- this allows better logging.
- this allows better bug fixing and maintainance without having to rely
on hypothetical upstream fixes.
One immediate bonus of native implementation is that fixes bugs which
were not previously fixable.
Fixes: SRT & RIST auto-reconnect partly broken #6749
Fixes: SRT: OBS unusable and uncloseable after starting stream to
invalid srt server #5791
Signed-off-by: pkv <pkv@obsproject.com>
If QT_VERSION is not defined, it gets define with the AUTO value. And
its definition is moved to the helper file.
find_qt now:
- Check quietly for Qt5 and Qt6
- If QT_VERSION is set to AUTO. It checks firstly if Qt5 was found it
will use it. If not it do the same for Qt6
- If QT_VERSION is set to 5 or 6, it checks if the choice was found and
use it. And if not, it falls back to the other if found.
- If neither Qt5 or Qt6 are found, a fatal error is emitted.
- The macro saved the _QT_VERSION in the cache to replace QT_VERSION,
so the process is not repeated each time that find_qt is used.
- When Qt::Gui is in the Linux component list, Qt::GuiPrivate is added.
So using the versioned one is no longer required.
Existing code didn't check for possible "empty" linked libraries
(e.g. Threads::Threads when compiler has built-in pthreads support).
Also adds support for compile options defined on linked dependencies.
The `EXCLUDE_FROM_ALL` token, which is responsible for excluding
components from a "unspecified" installation (which we use to create
the distributed package) needs to be specified for _every_ destination
specified in an `install` call.
This commit remedies the issue of missing tokens in these calls.
CMake seems to set either `CMAKE_OSX_ARCHITECTURES` and
`CMAKE_OSX_DEPLOYMENT_TARGET` implicitly to empty cache variables when
not defined explicitly on the commandline or via a GUI.
Setting a default thus requires the `FORCE` flag to overwrite these
empty defaults with our desired results. The branches ensure that user-
provided non-empty values are not overwritten as well.
- Headers are now installed per default on Linux.
- `obs-hevc.h` is not installed if HEVC is disabled.
- OS exclusive headers are no longer installed on the wrong OS.
Soon to be updated obs-deps built on CI will retain CMake package files
created while building dependencies. When CMake uses packages, the usual
triplet of variables from finders are not set. `CopyMSVCBins` relies
on one such variable.
This PR sets the `CURL_INCLUDE_DIR` if the cURL target is present, but
apparently imported as a CMake package, to ensure prior functionality is
restored.
PIPEWIRE_DEFINITIONS contains ready-to-use compile flags. If used with
INTERFACE_COMPILE_DEFINITIONS, this can lead to a compile error.
Rename the variable to PIPEWIRE_COMPILE_FLAGS to be clear about that and
prevent accidental misuse.
If WAYLAND_DEFINITIONS is set to "-I/usr/include/wayland", setting its
value as INTERFACE_COMPILE_DEFINITION leads to CMake emitting
"-D-I/usr/include/wayland" in the compiler flags. This breaks the
compilation of targets that call find_package(Wayland), such as libobs
and libobs-opengl, in gcc.
To avoid this, rename WAYLAND_DEFINITIONS to WAYLAND_COMPILE_FLAGS to
reflect that it contains ready-to-use compiler flags. Use
WAYLAND_COMPILE_FLAGS as INTERFACE_COMPILE_OPTIONS so it just gets
appended without adding the superfluous "-D".
Makes the check for the number of plugins in the global list an explicit
length check (not relying on CMake implicit functionality), also moves
it in line with how the same was solved in `ObsHelpers.cmake` globally.
The `add_target_resource` function uses unnecessary path components
when copying files to the rundir, resulting in files added that way
not to end up where OBS expects them to.
The generated binaries created by sub-targets also need to be copied
as part of `win-capture`'s data files, which was easy to fix as the
target exists before CMake switches into the subdirectories.
When using `install`, CMake will fix up a binary's rpath entries
automatically. As `install` is also used to copy all build artifacts
into a common runtime directory, this will lead to independent binaries
such as "obs-ffmpeg-mux" to be fixed up to run within a fully portable
app bundle.
Yet during development, the app bundle is not fully portable, so rpath
entries to e.g. libobs need to be retained. Using CMake's
`install PROGRAMS` variant will achieve just that.
Status output related to OBS configuration is prefixed with the string
"OBS" and added padding for enabled and disabled features. This padding
was not aligned between platforms.
By moving the padding and prefix decoration into its own function,
both elements are controlled in a single place. CMake scripts were
changed to use this new function `obs_status` instead of using CMake's
`message` function directly.
obs-plugintemplate uses the `obs_libraries` component to install
obs components required for plugin development. The need of the separate
`pdbs` directory was removed a while ago (as PDB target installation
can be flagged as `OPTIONAL` and enabled for specific configurations
only). This part was overlooked in that change.
Windows and Linux do not require a contained application bundle to run
and debug OBS - as such targets can and should be copied independently
from the main OBS application target.
Also silences the output of the `install` step that sets up those files.