Commit Graph

43 Commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks 5ce59b4c12 cmake: Update clang integration to 1.0 2023-05-14 03:25:07 +02:00
Michael Fabian 'Xaymar' Dirks eea4cadca2 cmake: Improve bootstrapping and versioning code
Should fix the "'u': undeclared identifier" problem when code is generated from a shallow clone. Also fixes the issue where the clang submodule is required instead of optional.
2023-05-14 03:25:07 +02:00
Michael Fabian 'Xaymar' Dirks 5a3954ae0e project: Fix License, License headers and Copyright information
Fixes several files incorrectly stated a different license from the actual project, as well as the copyright headers included in all files. This change has no effect on the licensing terms, it should clear up a bit of confusion by contributors. Plus the files get a bit smaller, and we have less duplicated information across the entire project.

Overall the project is GPLv2 if not built with Qt, and GPLv3 if it is built with Qt. There are no parts licensed under a different license, all have been adapted from other compatible licenses into GPLv2 or GPLv3.
2023-04-05 18:59:08 +02:00
Michael Fabian 'Xaymar' Dirks 7f3ab14128 cmake, code: Remove unused files
These files are not used, and serve no purpose.
2023-04-05 18:59:05 +02:00
Michael Fabian 'Xaymar' Dirks 53ceddd784 cmake, templates: Remove code signing integration
Time has unfortunately broken this integration beyond the point of usefulness.
2023-04-05 18:58:51 +02:00
Michael Fabian 'Xaymar' Dirks c1b832c03a cmake: Fix bad version strings
PROJECT_VERSION is defined by CMake, and can't be relied on.
2023-04-05 18:58:35 +02:00
Michael Fabian 'Xaymar' Dirks a149531fb8 cmake: Upgrade version code to shared cmake-version module
This module handles parsing, generating, modifying and comparing of versions with pure CMake.
2023-04-05 18:58:28 +02:00
Michael Fabian 'Xaymar' Dirks d7dc5804d4 cmake: Update clang submodule
Fixes #799
2023-04-05 18:58:25 +02:00
Michael Fabian 'Xaymar' Dirks f160580794 cmake: Improve build system with additional features and options
- Moved all auto-dependencies to a uniform subdirectory for easier caching and cleanup.
- Add an option to download or specify a path for libOBS+obs-frontend-api.
- Remove the dependency on the non-standard obs-frontend-apiConfig.cmake file.
- Add an option to download or specify a path for OBS Dependencies.
- Add an option to download or specify a path for Qt.
- Add an option to download or specify a path for AOM.
- Fix and improve architecture and platform detection.
- Fix some messages having two :, or no prefix at all.
- Fix detection of obs-frontend-api.
- Fix applying custom compiler and linker flags for MSVC and GNU-style builds.
- Use target_compile_options over add_compile_options for compatibility.
2023-04-05 18:58:20 +02:00
Michael Fabian 'Xaymar' Dirks 479c05b14a cmake/codesign: Remove broken Timestamping servers 2023-04-05 18:51:51 +02:00
Michael Fabian 'Xaymar' Dirks 1f78de676d cmake: Fix and improve Code Signing on Windows
It was sometimes impossible to sign the binaries on Windows, depending on how CMake was being run. By explicitly converting to the intended native format, we avoid this problem for most situations. Additionally we now support per-project certificates, instead of global certificates only. This also allows multiple uses of cmake-codesign in the same overall project.
2023-04-05 18:51:41 +02:00
Michael Fabian 'Xaymar' Dirks e7d17695c5 cmake: Add support for Code Signing on supported platforms 2023-04-05 18:51:39 +02:00
Michael Fabian 'Xaymar' Dirks c3440d2069 project: Remove undocumented "NVIDIA Face Tracking" feature
Originally intended to be an experiment with no future, it turned out to be very popular with streamers that move a lot. In the end it was popular enough that NVIDIA added their own variant to their Broadcast software, which works decently enough. Unfortunately my wrapper code around the library was written very poorly, so it didn't take long for it to break out of nowhere.
2023-04-05 18:51:35 +02:00
Michael Fabian 'Xaymar' Dirks bb58424b22 cmake: Add find package module for libAOM 2023-04-05 18:51:15 +02:00
Michael Fabian 'Xaymar' Dirks d8bb1cecc5 cmake: (MacOS) Fix linker path for libraries 2023-03-28 13:11:15 +02:00
Michael Fabian 'Xaymar' Dirks 5ac894c59c cmake: Refactor component and dependency system
A complete redesign of the component and dependency system is necessary in order to support additional platforms, such as MacOS and other Linux platforms. Additionally it results in a much cleaner code base, which is less confusing overall.

Eventually it might be necessary to push components of StreamFX into their own CMake projects, as it is getting kind of complex now. Especially with the push for a proper plugin manager, things get dicey for big plugins like StreamFX.
2023-03-28 13:11:10 +02:00
Michael Fabian 'Xaymar' Dirks 90a9bd56a7 cmake: Fix DownloadProject version warning 2023-03-28 13:11:09 +02:00
Michael Fabian 'Xaymar' Dirks 0ecf971446 templates: Move template files to better directory 2023-03-28 12:52:21 +02:00
Michael Fabian 'Xaymar' Dirks 298f8e69e0 cmake/clang: Add support for clang 3.5 to 10.0 2023-03-28 12:52:21 +02:00
Michael Fabian 'Xaymar' Dirks dbb71cf801 project: Code cleanup and reapply formatting
Changes applied:

* Moved utility files to /util/.
* Removed unused #includes.
* Removed unused ::ffmpeg::tools function.
* Removed unused variables.
* Fixed missing parentheses in the version macro.
* Fixed missing override on virtual function overrides and removed unnecessary virtual keyword from them.
* Disabled additional warning for ATL headers on MSVC only.
* Replaced direct printf parameters with their macro equivalent.
* Replaced C-style casts with C++-style casts.
* Applied clang-format again after an earlier change to the CMake file broke the integration for it.
2023-03-28 12:52:20 +02:00
Michael Fabian 'Xaymar' Dirks 16489c4180 project: Improve user experience in the Installer
Adds a BeforeInstall step to the InnoSetup installer which uses the msvc-redist-helper tool to automatically check for the necessary DLLs and install the required redistributable if some are found to be missing.

Additionally slightly modernized the installer with a design that isn't from the 90s, and paves the way for preventing updating StreamFX while OBS Studio is still running.
2023-03-28 12:52:16 +02:00
Michael Fabian 'Xaymar' Dirks 96d270ba73 cmake: Fix generated version resource file 2023-03-28 12:52:11 +02:00
Michael Fabian 'Xaymar' Dirks 2e2c4811bb cmake: Update Clang integration to support AppleClang 2023-03-28 12:40:46 +02:00
Michael Fabian 'Xaymar' Dirks c93789f6dc cmake: Slightly redesign version string generation 2020-04-22 23:11:01 +02:00
Michael Fabian 'Xaymar' Dirks 92fc2b3ccb cmake: Add support for running clang-tidy
Adds supports for running clang-tidy from within CMake, if the Clang toolset was found. This feature is experimental, but should work on many compilers, as it relies on generated compile_commands.json which are fully generated by the clang subproject. Using clang-tidy we can find hidden bugs that other static analyzers do not detect, or compilers don't even bother throwing an error for.
2020-04-18 19:11:53 +02:00
Michael Fabian 'Xaymar' Dirks cc9d3486b2 project: Fix Linux support by fixing errors and warnings
With this, GCC 8 and above should now be able to compile the project both in obs-studio and as a standalone install. Some features are currently still not fully supported and require extra work, but the majority of things are supported and work out of the box. Exact feature parity can be looked up here on the wiki: https://github.com/Xaymar/obs-StreamFX/wiki/Platform-Feature-Parity

Related: #119 #98 #30
2020-04-02 20:37:45 +02:00
Michael Fabian 'Xaymar' Dirks 59fa1d36d7 common: Common header include for improved platform support
This header includes all common data between headers used in the plugin. This should improve cross-platform compiling support whenever possible, as all platform-dependent common includes and defines can be done here.
2020-04-02 17:02:01 +02:00
Michael Fabian 'Xaymar' Dirks 43f1dcf205 filter-nv-face-tracking: Nvidia exclusive Face Tracking filter
Ever wished you had a professional camera operator to highlight and follow the action, ensuring the audience never misses a beat? Thanks to NVIDIA, you can now do this at home for free! The new NVIDIA AR SDK unlocks augmented reality features, including motion tracking for faces.

This allows me to provide you with an automated zoom and cropping solution for your video camera to transform your streams into a slick, polished broadcast, where you’ll always be the star of the show. Don’t forget - everything is customizable so the possibilities are endless. You can even recreate that Futurama squinting meme if you wanted to (with some scripting)!

The filter requires compatible Nvidia RTX hardware and the Nvidia AR SDK Runtime to be installed ahead of time. This filter is considered "stable" and shouldn't change much from version to version.
2020-03-31 21:46:47 +02:00
Michael Fabian 'Xaymar' Dirks cbb6c4f785 cmake: Use shared submodule for Clang integration 2020-01-22 11:12:34 +01:00
Michael Fabian 'Xaymar' Dirks 0a16ce07dc project: Merged FFmpeg Encoders Step 2 2020-01-13 22:40:15 +01:00
Michael Fabian 'Xaymar' Dirks 3eea289679 project: Merged FFmpeg Encoders Step 1 2020-01-13 01:52:30 +01:00
Michael Fabian 'Xaymar' Dirks a99030f5c0 ci: Build Installers and rename to StreamFX 2019-12-22 07:55:13 +01:00
Michael Fabian 'Xaymar' Dirks 6ce6ffe5bd cmake: Only warn if clang-format can't be found 2019-12-21 17:35:53 +01:00
Michael Fabian 'Xaymar' Dirks 1482cb1d11 cmake: Add clang-format support
This does not rely on the "integrated" clang-format, but instead uses a custom target to achieve the goal. Supports file filtering (to ensure that clang-format only affects supported files), automatic dependency by the project (always run before build), multiple targets and a global target.

Options are:
- TARGETS <target> ...: Targets to add clang-format support to.
- DEPENDENCY: Add a dependency to the given targets so that clang-format runs before building.
- REGEX: Filter out files of the given targets, defaults to '\.(h|hpp|c|cpp)'.
- GLOBAL: Add a global CLANG_FORMAT target.
2019-12-21 17:05:53 +01:00
Michael Fabian 'Xaymar' Dirks 098c0d80cd cmake: Further improve the version template 2019-10-13 07:26:13 +02:00
Michael Fabian 'Xaymar' Dirks f1a376d44b cmake: Add commit to version.hpp template
Switches out the `const uint16_t` for actual defines, which are easier to deal with and work in C out of the box.
2019-10-13 05:54:20 +02:00
Michael Fabian 'Xaymar' Dirks aeb34450f6 cmake: Add commit hash to installer file name 2019-10-13 05:43:45 +02:00
Michael Fabian 'Xaymar' Dirks 411f5ee900 cmake: Remove CppCheck support
The current way was a hack at best, and there is a much better way using CMAKE_EXPORT_COMPILE_COMMANDS=ON. For more, read the CppCheck manual.
2019-04-19 08:20:33 +02:00
Michael Fabian 'Xaymar' Dirks ba00fbb97e project: Fix even more warnings 2019-03-01 12:00:30 +01:00
Michael Fabian 'Xaymar' Dirks 95fdcff3a9 cmake: Reworked build system for Installers and Archives 2018-12-23 21:15:05 +01:00
Michael Fabian 'Xaymar' Dirks a244914ca3 cmake: Add Template and Inline Suppression support for CppCheck 2018-09-27 02:43:28 +02:00
Michael Fabian 'Xaymar' Dirks dc0104850a cmake: Massive update ported from obs-amd-encoder
This includes support for included, referenced, packaged and downloaded obs-studio libraries, cppcheck, packaging using cpack, 7z, zip or InnoSetup and more.
2018-09-26 01:17:08 +02:00
Michael Fabian 'Xaymar' Dirks 19506f1997 cmake: Many fixes and improvements
* Standalone builds no longer require you to have a compiled version of OBS Studio. Instead the project will now download the last compatible libOBS version from CI and use it for linking.
* The project version now has a tweak field again, which is either 0 or determined by the number of git commits since the last release tag.
* The Install command now properly uses CMAKE_INSTALL_PREFIX instead of INSTALL_DIR.
* Packaging is now done using CPack instead of custom commands.
2018-04-24 12:31:43 +02:00