Commit Graph

37 Commits

Author SHA1 Message Date
PatTheMav
4dab2c51b8 libobs: Add prerequisites for Metal and Swift support 2025-09-04 17:58:27 -04:00
tytan652
2bd23cd50d libobs,cmake: Replace vendored SIMD Everywhere by prefix/system install
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.
2025-08-21 15:22:08 -04:00
gxalpha
281f8137f5 UI,libobs,obs-outputs: Remove HAVE_OBSCONFIG_H ifdefs
With the removal of all legacy code paths, obsconfig.h always exists and
the compile definition always gets set. As such, it's no longer
necessary to check for it.

As removing the definition itself could be seen as a breaking change,
this simply moves the definition to pc.in and cmake.in files for now to
preserve the value for plugins that might expect this to be set. We may
remove the definition entirely in a later release.
2025-04-30 13:05:35 -04:00
tytan652
1bf84a6901 cmake: Replace Xcb CMake finders with ECM 2025-04-28 13:30:26 -04:00
Ryan Foster
ba9ac1a9a8 cmake: Replace COMPILE_FLAGS with COMPILE_OPTIONS
COMPILE_OPTIONS was added and superseded COMPILE_FLAGS in CMake 3.11.

https://cmake.org/cmake/help/v3.30/prop_sf/COMPILE_FLAGS.html
https://cmake.org/cmake/help/v3.30/prop_sf/COMPILE_OPTIONS.html
2025-02-10 12:57:38 -05:00
Kurt Kartaltepe
22f222600a libobs: Fix underlinking by adding libx11
We directly depend on libx11 for various operations in obs-nix-x11.c,
not just xcb. So be sure to link it in too.

fixes #11667
2025-01-16 15:43:48 -05:00
Ed Maste
c928fac339 libobs: Remove non-USE_XDG code
That is, leave only the code that was under USE_XDG.  Previously the
Linux CMake build defined USE_XDG unconditionally, while it was not set
by the FreeBSD build.

The non-USE_XDG code was broken, and FreeBSD should follow the XDG
convention anyway (in particular, storing config files typically under
$HOME/.config/obs-studio).  Defining USE_XDG in the os-freebsd.cmake
files would leave the non-USE_XDG code unused anywhere, so instead just
remove it.
2024-10-18 18:19:19 -04:00
PatTheMav
6c590805e8 cmake: Update supported CMake version range to 3.28 and 3.30 2024-09-13 14:42:32 -04:00
Ryan Foster
f0d619521b libobs: Fix Windows x86 CMake when using reduced obs-deps package
A recent obs-deps change removed all non-essential x86 deps. This caused
the x86 subproject(s) on Windows to fail to configure due to being
unable to find x86 dependencies that do not exist.

Co-authored-by: PatTheMav <PatTheMav@users.noreply.github.com>
2024-08-28 18:26:47 -04:00
tytan652
72428ccd97 Remove CMake legacy code path
Except submodules and legacy_check macro since the former depend on it.
2024-08-28 13:53:25 -04:00
PatTheMav
d81fcd70e0 cmake: Update cross-platform build project management for Windows
Enables creation of x64 and x86 child projects when building on ARM64
and decouples functionality from legacy_check function
2024-08-20 16:00:21 -04:00
PatTheMav
b8cfacaec3 Update formatting of CMake files 2024-08-14 12:07:47 -04:00
Rodney
198581a475 libobs: Add source profiler 2024-08-10 23:51:39 -07:00
derrod
efd0e6d0bd libobs: Add buffered file serializer to legacy cmake 2024-06-05 19:25:14 -04:00
derrod
e885d25f5b libobs: Add os_process_args_t and associated functions 2024-04-20 18:30:46 -07:00
PatTheMav
0af0de26eb libobs: 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.
2024-04-13 23:48:38 -04:00
tytan652
e032c2d0c9 deps,libobs: Replace uthash with prefix/system install 2024-04-07 10:01:25 +10:00
Patrick Heyer
e0f0c1147a libobs: Fix missing w32-pthreads dependency when building without UI (#10360)
w32-pthreads is not correctly added to the generated CMake project
if the UI subdirectory is not also included, which leads to builds
configured without UI to fail.
2024-03-11 15:29:33 -04:00
derrod
1938d65c9f libobs/util: Add deque 2024-01-16 16:44:12 +01:00
PatTheMav
e065f2a839 libobs: Update CMake target source lists with alphabetic sorting 2023-12-19 17:59:44 -05:00
derrod
5177a593af libobs: Remove module UI functions 2023-12-02 18:09:20 -06:00
David Rosca
722ca8447e libobs: Add AV1 parsing functions
One notable difference from the AVC/HEVC code is that it also inserts
the METADATA and SEQUENCE_HEADER OBUs into new_packet, otherwise the
resulting video file wouldn't play.
2023-11-04 01:16:25 -05:00
PatTheMav
6ebff6a204 libobs: Suppress warnings about implicit integer downcasts
Returned values are usually 64-bit in length but commonly stored in
16-bit integers anyway.
2023-08-31 17:52:08 -04:00
tytan652
c6ce50c9a3 deps,libobs,plugins: Remove in-tree Jansson
Jansson is provided by other means on any supported platform.
2023-07-29 16:37:14 -07:00
gxalpha
5ed0b8a0b8 libobs: Assume Qt 6, always warn about Qt 5 plugins 2023-07-19 11:56:54 -04:00
PatTheMav
89625715fc cmake: Fix configuration errors with Windows legacy path
By default Windows builds use the legacy CMake code paths, which ideally
work as-is with existing build directories.
2023-06-30 11:56:57 -04:00
PatTheMav
db895092ed 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-06-29 10:11:32 -04:00
PatTheMav
59904a66a3 cmake: Update Framework link definition 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
3ca56fee84 libobs: Silence clang warnings for empty prototypes without void
clang expects an empty prototype to explicitly use `void`.

Also silences the warning in `libobs-opengl`, `obsglad`, `caption`,
`mac-syphon` and `obs-x264-test`.
2023-06-16 14:12:58 -04:00
PatTheMav
2966c4030e libobs: Use static library for version string information
Switching to a static library that contains version information as
const char strings has multiple benefits:

* The version information provided externally via compiler definitions
  will fail compilation early if malformed
* An updated version string (which will happen with every commit) will
  not invalidate existing compilation units, because only the static
  library is affected by the change
* An update of the version change just requires a recompilation of the
  static library and a linker update
* An update of the version will _not_ infect the rest of the codebase
  (as it does currently, because everything includes obsconfig.h one
  way or another)
* Other modules which used the macro definition directly have been
  updated as much as possible to use the proper getter method from
  `libobs` instead (some Windows-specific modules use preprocessor
  string composition, the value has been added as a compiler definition
  directly in those cases)
* Because the impact of a version change due to a commit hash change
  is limited to the static library, ccache hit rates should be
  improved considerably
2023-05-27 16:48:24 -07:00
Lain
106c7aa61f Update copyrights/names 2023-05-20 01:31:18 -07:00
PatTheMav
6e07b86729 cmake: Remove EXCLUDE_FROM_ALL directive from interface libraries 2023-04-04 17:27:54 +00:00
Norihiro Kamae
e4eeecf3df cmake: Fix OBS_INSTALL_PREFIX
Before 349372b3b3, OBS_INSTALL_PREFIX contained trailing slash so that
it can concatinate with further paths.
2023-03-27 15:30:05 +02: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
43a49dca47 cmake: Fix CMake package export templates for CMake 3.24
CMake 3.24 implemented changes that break dependency discovery of the
exported libraries built by OBS.
2022-08-09 19:48:03 -04:00
PatTheMav
1fd7770548 libobs: Update CMakeLists.txt for libobs and associated libraries
Also updates libobs-opengl, libobs-d3d11, libobs-winrt
2022-03-16 23:11:08 +01:00