mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-29 02:03:03 +08:00
Update formatting of CMake files
This commit is contained in:
+33
-20
@@ -36,25 +36,29 @@ endif()
|
||||
|
||||
message(
|
||||
DEPRECATION
|
||||
"\n"
|
||||
"============ LEGACY BUILD SYSTEM IS DEPRECATED ============"
|
||||
"\n"
|
||||
"You are using the legacy build system to build OBS Studio. "
|
||||
"The legacy build system is unsupported and will be removed in the near future."
|
||||
"\n"
|
||||
"To migrate to the new build system, familiarize yourself with CMake presets "
|
||||
"(https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) and create "
|
||||
"a user preset with your customized build settings, inheriting from one of the default presets."
|
||||
"\n"
|
||||
"============ LEGACY BUILD SYSTEM IS DEPRECATED ============")
|
||||
"\n"
|
||||
"============ LEGACY BUILD SYSTEM IS DEPRECATED ============"
|
||||
"\n"
|
||||
"You are using the legacy build system to build OBS Studio. "
|
||||
"The legacy build system is unsupported and will be removed in the near future."
|
||||
"\n"
|
||||
"To migrate to the new build system, familiarize yourself with CMake presets "
|
||||
"(https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) and create "
|
||||
"a user preset with your customized build settings, inheriting from one of the default presets."
|
||||
"\n"
|
||||
"============ LEGACY BUILD SYSTEM IS DEPRECATED ============"
|
||||
)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/Modules")
|
||||
include(VersionConfig)
|
||||
|
||||
# Prohibit in-source builds
|
||||
if("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
|
||||
message(FATAL_ERROR "OBS: You cannot build in a source directory (or any directory with CMakeLists.txt file). "
|
||||
"Please make a build subdirectory. Feel free to remove CMakeCache.txt and CMakeFiles.")
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"OBS: You cannot build in a source directory (or any directory with CMakeLists.txt file). "
|
||||
"Please make a build subdirectory. Feel free to remove CMakeCache.txt and CMakeFiles."
|
||||
)
|
||||
endif()
|
||||
|
||||
project(obs-studio VERSION ${OBS_VERSION_CANONICAL})
|
||||
@@ -68,10 +72,17 @@ include(CompilerConfig)
|
||||
|
||||
# Allow selection of common build types via UI
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE
|
||||
"RelWithDebInfo"
|
||||
CACHE STRING "OBS build type [Release, RelWithDebInfo, Debug, MinSizeRel]" FORCE)
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Release RelWithDebInfo Debug MinSizeRel)
|
||||
set(
|
||||
CMAKE_BUILD_TYPE
|
||||
"RelWithDebInfo"
|
||||
CACHE STRING
|
||||
"OBS build type [Release, RelWithDebInfo, Debug, MinSizeRel]"
|
||||
FORCE
|
||||
)
|
||||
set_property(
|
||||
CACHE CMAKE_BUILD_TYPE
|
||||
PROPERTY STRINGS Release RelWithDebInfo Debug MinSizeRel
|
||||
)
|
||||
endif()
|
||||
|
||||
# Global project options
|
||||
@@ -86,9 +97,11 @@ option(USE_LIBCXX "Use libc++ instead of libstdc++" ${APPLE})
|
||||
option(BUILD_TESTS "Build test directory (includes test sources and possibly a platform test executable)" OFF)
|
||||
|
||||
if(OS_WINDOWS)
|
||||
option(INSTALLER_RUN
|
||||
"Build a multiarch installer (needs to run independently after both archs have compiled) (Windows)" OFF)
|
||||
|
||||
option(
|
||||
INSTALLER_RUN
|
||||
"Build a multiarch installer (needs to run independently after both archs have compiled) (Windows)"
|
||||
OFF
|
||||
)
|
||||
elseif(OS_POSIX)
|
||||
option(LINUX_PORTABLE "Build portable version (Linux)" OFF)
|
||||
option(USE_XDG "Utilize XDG Base Directory Specification (Linux)" ON)
|
||||
|
||||
+44
-51
@@ -25,13 +25,8 @@ add_executable(OBS::studio ALIAS obs-studio)
|
||||
|
||||
target_link_libraries(
|
||||
obs-studio
|
||||
PRIVATE CURL::libcurl
|
||||
FFmpeg::avcodec
|
||||
FFmpeg::avutil
|
||||
FFmpeg::avformat
|
||||
OBS::libobs
|
||||
OBS::frontend-api
|
||||
OBS::json11)
|
||||
PRIVATE CURL::libcurl FFmpeg::avcodec FFmpeg::avutil FFmpeg::avformat OBS::libobs OBS::frontend-api OBS::json11
|
||||
)
|
||||
|
||||
include(cmake/ui-qt.cmake)
|
||||
include(cmake/ui-elements.cmake)
|
||||
@@ -40,10 +35,8 @@ include(cmake/feature-importers.cmake)
|
||||
include(cmake/feature-browserpanels.cmake)
|
||||
|
||||
if(NOT OAUTH_BASE_URL)
|
||||
# cmake-format: off
|
||||
set(OAUTH_BASE_URL "https://auth.obsproject.com/" CACHE STRING "Default OAuth base URL")
|
||||
mark_as_advanced(OAUTH_BASE_URL)
|
||||
# cmake-format: on
|
||||
endif()
|
||||
include(cmake/feature-twitch.cmake)
|
||||
include(cmake/feature-restream.cmake)
|
||||
@@ -56,49 +49,51 @@ configure_file(ui-config.h.in ui-config.h)
|
||||
|
||||
target_sources(
|
||||
obs-studio
|
||||
PRIVATE # cmake-format: sortable
|
||||
api-interface.cpp
|
||||
auth-base.cpp
|
||||
auth-base.hpp
|
||||
auth-listener.cpp
|
||||
auth-listener.hpp
|
||||
auth-oauth.cpp
|
||||
auth-oauth.hpp
|
||||
display-helpers.hpp
|
||||
ffmpeg-utils.cpp
|
||||
ffmpeg-utils.hpp
|
||||
multiview.cpp
|
||||
multiview.hpp
|
||||
obf.c
|
||||
obf.h
|
||||
obs-app-theming.cpp
|
||||
obs-app-theming.hpp
|
||||
obs-app.cpp
|
||||
obs-app.hpp
|
||||
obs-proxy-style.cpp
|
||||
obs-proxy-style.hpp
|
||||
platform.hpp
|
||||
qt-display.cpp
|
||||
qt-display.hpp
|
||||
ui-config.h
|
||||
ui-validation.cpp
|
||||
ui-validation.hpp)
|
||||
PRIVATE
|
||||
api-interface.cpp
|
||||
auth-base.cpp
|
||||
auth-base.hpp
|
||||
auth-listener.cpp
|
||||
auth-listener.hpp
|
||||
auth-oauth.cpp
|
||||
auth-oauth.hpp
|
||||
display-helpers.hpp
|
||||
ffmpeg-utils.cpp
|
||||
ffmpeg-utils.hpp
|
||||
multiview.cpp
|
||||
multiview.hpp
|
||||
obf.c
|
||||
obf.h
|
||||
obs-app-theming.cpp
|
||||
obs-app-theming.hpp
|
||||
obs-app.cpp
|
||||
obs-app.hpp
|
||||
obs-proxy-style.cpp
|
||||
obs-proxy-style.hpp
|
||||
platform.hpp
|
||||
qt-display.cpp
|
||||
qt-display.hpp
|
||||
ui-config.h
|
||||
ui-validation.cpp
|
||||
ui-validation.hpp
|
||||
)
|
||||
|
||||
target_sources(
|
||||
obs-studio
|
||||
PRIVATE # cmake-format: sortable
|
||||
goliveapi-censoredjson.cpp
|
||||
goliveapi-censoredjson.hpp
|
||||
goliveapi-network.cpp
|
||||
goliveapi-network.hpp
|
||||
goliveapi-postdata.cpp
|
||||
goliveapi-postdata.hpp
|
||||
models/multitrack-video.hpp
|
||||
multitrack-video-error.cpp
|
||||
multitrack-video-error.hpp
|
||||
multitrack-video-output.cpp
|
||||
multitrack-video-output.hpp
|
||||
system-info.hpp)
|
||||
PRIVATE
|
||||
goliveapi-censoredjson.cpp
|
||||
goliveapi-censoredjson.hpp
|
||||
goliveapi-network.cpp
|
||||
goliveapi-network.hpp
|
||||
goliveapi-postdata.cpp
|
||||
goliveapi-postdata.hpp
|
||||
models/multitrack-video.hpp
|
||||
multitrack-video-error.cpp
|
||||
multitrack-video-error.hpp
|
||||
multitrack-video-output.cpp
|
||||
multitrack-video-output.hpp
|
||||
system-info.hpp
|
||||
)
|
||||
|
||||
if(OS_WINDOWS)
|
||||
include(cmake/os-windows.cmake)
|
||||
@@ -127,6 +122,4 @@ get_property(obs_module_list GLOBAL PROPERTY OBS_MODULES_ENABLED)
|
||||
list(JOIN obs_module_list "|" SAFE_MODULES)
|
||||
target_compile_definitions(obs-studio PRIVATE "SAFE_MODULES=\"${SAFE_MODULES}\"")
|
||||
|
||||
# cmake-format: off
|
||||
set_target_properties_obs(obs-studio PROPERTIES FOLDER frontend OUTPUT_NAME "$<IF:$<PLATFORM_ID:Windows>,obs64,obs>")
|
||||
# cmake-format: on
|
||||
|
||||
@@ -5,6 +5,6 @@ if(TARGET OBS::browser-panels)
|
||||
|
||||
target_sources(
|
||||
obs-studio
|
||||
PRIVATE # cmake-format: sortable
|
||||
window-dock-browser.cpp window-dock-browser.hpp window-extra-browsers.cpp window-extra-browsers.hpp)
|
||||
PRIVATE window-dock-browser.cpp window-dock-browser.hpp window-extra-browsers.cpp window-extra-browsers.hpp
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
target_sources(
|
||||
obs-studio
|
||||
PRIVATE # cmake-format: sortable
|
||||
importers/classic.cpp importers/importers.cpp importers/importers.hpp importers/sl.cpp importers/studio.cpp
|
||||
importers/xsplit.cpp)
|
||||
PRIVATE
|
||||
importers/classic.cpp
|
||||
importers/importers.cpp
|
||||
importers/importers.hpp
|
||||
importers/sl.cpp
|
||||
importers/studio.cpp
|
||||
importers/xsplit.cpp
|
||||
)
|
||||
|
||||
@@ -8,15 +8,18 @@ endif()
|
||||
|
||||
target_sources(
|
||||
obs-studio
|
||||
PRIVATE # cmake-format: sortable
|
||||
update/crypto-helpers-mac.mm
|
||||
update/crypto-helpers.hpp
|
||||
update/models/branches.hpp
|
||||
update/models/whatsnew.hpp
|
||||
update/shared-update.cpp
|
||||
update/shared-update.hpp
|
||||
update/update-helpers.cpp
|
||||
update/update-helpers.hpp)
|
||||
PRIVATE
|
||||
update/crypto-helpers-mac.mm
|
||||
update/crypto-helpers.hpp
|
||||
update/models/branches.hpp
|
||||
update/models/whatsnew.hpp
|
||||
update/shared-update.cpp
|
||||
update/shared-update.hpp
|
||||
update/update-helpers.cpp
|
||||
update/update-helpers.hpp
|
||||
)
|
||||
|
||||
target_link_libraries(obs-studio PRIVATE "$<LINK_LIBRARY:FRAMEWORK,Security.framework>" nlohmann_json::nlohmann_json
|
||||
OBS::blake2)
|
||||
target_link_libraries(
|
||||
obs-studio
|
||||
PRIVATE "$<LINK_LIBRARY:FRAMEWORK,Security.framework>" nlohmann_json::nlohmann_json OBS::blake2
|
||||
)
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
if(RESTREAM_CLIENTID
|
||||
AND RESTREAM_HASH MATCHES "^(0|[a-fA-F0-9]+)$"
|
||||
AND TARGET OBS::browser-panels)
|
||||
if(RESTREAM_CLIENTID AND RESTREAM_HASH MATCHES "^(0|[a-fA-F0-9]+)$" AND TARGET OBS::browser-panels)
|
||||
target_sources(obs-studio PRIVATE auth-restream.cpp auth-restream.hpp)
|
||||
target_enable_feature(obs-studio "Restream API connection" RESTREAM_ENABLED)
|
||||
else()
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
if(TWITCH_CLIENTID
|
||||
AND TWITCH_HASH MATCHES "^(0|[a-fA-F0-9]+)$"
|
||||
AND TARGET OBS::browser-panels)
|
||||
if(TWITCH_CLIENTID AND TWITCH_HASH MATCHES "^(0|[a-fA-F0-9]+)$" AND TARGET OBS::browser-panels)
|
||||
target_sources(obs-studio PRIVATE auth-twitch.cpp auth-twitch.hpp)
|
||||
target_enable_feature(obs-studio "Twitch API connection" TWITCH_ENABLED)
|
||||
else()
|
||||
|
||||
@@ -17,14 +17,15 @@ if(ENABLE_WHATSNEW AND TARGET OBS::browser-panels)
|
||||
|
||||
target_sources(
|
||||
obs-studio
|
||||
PRIVATE # cmake-format: sortable
|
||||
update/crypto-helpers-mbedtls.cpp
|
||||
update/crypto-helpers.hpp
|
||||
update/models/whatsnew.hpp
|
||||
update/shared-update.cpp
|
||||
update/shared-update.hpp
|
||||
update/update-helpers.cpp
|
||||
update/update-helpers.hpp)
|
||||
PRIVATE
|
||||
update/crypto-helpers-mbedtls.cpp
|
||||
update/crypto-helpers.hpp
|
||||
update/models/whatsnew.hpp
|
||||
update/shared-update.cpp
|
||||
update/shared-update.hpp
|
||||
update/update-helpers.cpp
|
||||
update/update-helpers.hpp
|
||||
)
|
||||
endif()
|
||||
|
||||
target_enable_feature(obs-studio "What's New panel" WHATSNEW_ENABLED)
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
if(YOUTUBE_CLIENTID
|
||||
AND YOUTUBE_SECRET
|
||||
AND YOUTUBE_CLIENTID_HASH MATCHES "^(0|[a-fA-F0-9]+)$"
|
||||
AND YOUTUBE_SECRET_HASH MATCHES "^(0|[a-fA-F0-9]+)$"
|
||||
AND TARGET OBS::browser-panels)
|
||||
if(
|
||||
YOUTUBE_CLIENTID
|
||||
AND YOUTUBE_SECRET
|
||||
AND YOUTUBE_CLIENTID_HASH MATCHES "^(0|[a-fA-F0-9]+)$"
|
||||
AND YOUTUBE_SECRET_HASH MATCHES "^(0|[a-fA-F0-9]+)$"
|
||||
AND TARGET OBS::browser-panels
|
||||
)
|
||||
target_sources(
|
||||
obs-studio
|
||||
PRIVATE # cmake-format: sortable
|
||||
auth-youtube.cpp
|
||||
auth-youtube.hpp
|
||||
window-dock-youtube-app.cpp
|
||||
window-dock-youtube-app.hpp
|
||||
window-youtube-actions.cpp
|
||||
window-youtube-actions.hpp
|
||||
youtube-api-wrappers.cpp
|
||||
youtube-api-wrappers.hpp)
|
||||
PRIVATE
|
||||
auth-youtube.cpp
|
||||
auth-youtube.hpp
|
||||
window-dock-youtube-app.cpp
|
||||
window-dock-youtube-app.hpp
|
||||
window-youtube-actions.cpp
|
||||
window-youtube-actions.hpp
|
||||
youtube-api-wrappers.cpp
|
||||
youtube-api-wrappers.hpp
|
||||
)
|
||||
|
||||
target_enable_feature(obs-studio "YouTube API connection" YOUTUBE_ENABLED)
|
||||
else()
|
||||
|
||||
+16
-8
@@ -16,7 +16,8 @@ if(NOT DEFINED APPDATA_RELEASE_DATE)
|
||||
COMMAND git log --tags -1 --pretty=%cd --date=short
|
||||
OUTPUT_VARIABLE APPDATA_RELEASE_DATE
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
elseif(EXISTS "${CMAKE_SOURCE_DIR}/cmake/.CMakeBuildNumber")
|
||||
file(TIMESTAMP "${CMAKE_SOURCE_DIR}/cmake/.CMakeBuildNumber" APPDATA_RELEASE_DATE "%Y-%m-%d")
|
||||
else()
|
||||
@@ -30,7 +31,8 @@ if(NOT DEFINED GIT_HASH)
|
||||
COMMAND git rev-parse HEAD
|
||||
OUTPUT_VARIABLE GIT_HASH
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
else()
|
||||
set(GIT_HASH "master")
|
||||
endif()
|
||||
@@ -38,27 +40,33 @@ endif()
|
||||
|
||||
configure_file(cmake/linux/com.obsproject.Studio.metainfo.xml.in com.obsproject.Studio.metainfo.xml)
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.obsproject.Studio.metainfo.xml"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo")
|
||||
install(
|
||||
FILES "${CMAKE_CURRENT_BINARY_DIR}/com.obsproject.Studio.metainfo.xml"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo"
|
||||
)
|
||||
|
||||
install(FILES cmake/linux/com.obsproject.Studio.desktop DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
|
||||
|
||||
install(
|
||||
FILES cmake/linux/icons/obs-logo-128.png
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/128x128/apps"
|
||||
RENAME com.obsproject.Studio.png)
|
||||
RENAME com.obsproject.Studio.png
|
||||
)
|
||||
|
||||
install(
|
||||
FILES cmake/linux/icons/obs-logo-256.png
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/256x256/apps"
|
||||
RENAME com.obsproject.Studio.png)
|
||||
RENAME com.obsproject.Studio.png
|
||||
)
|
||||
|
||||
install(
|
||||
FILES cmake/linux/icons/obs-logo-512.png
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/512x512/apps"
|
||||
RENAME com.obsproject.Studio.png)
|
||||
RENAME com.obsproject.Studio.png
|
||||
)
|
||||
|
||||
install(
|
||||
FILES cmake/linux/icons/obs-logo-scalable.svg
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps"
|
||||
RENAME com.obsproject.Studio.svg)
|
||||
RENAME com.obsproject.Studio.svg
|
||||
)
|
||||
|
||||
@@ -11,10 +11,10 @@ if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 14.0.3)
|
||||
target_compile_options(obs-studio PRIVATE -Wno-error=unqualified-std-cast-call)
|
||||
endif()
|
||||
|
||||
# cmake-format: off
|
||||
target_link_libraries(
|
||||
obs-studio
|
||||
PRIVATE "$<LINK_LIBRARY:FRAMEWORK,AppKit.framework>"
|
||||
"$<LINK_LIBRARY:FRAMEWORK,ApplicationServices.framework>"
|
||||
"$<LINK_LIBRARY:FRAMEWORK,AVFoundation.framework>")
|
||||
# cmake-format: on
|
||||
PRIVATE
|
||||
"$<LINK_LIBRARY:FRAMEWORK,AppKit.framework>"
|
||||
"$<LINK_LIBRARY:FRAMEWORK,ApplicationServices.framework>"
|
||||
"$<LINK_LIBRARY:FRAMEWORK,AVFoundation.framework>"
|
||||
)
|
||||
|
||||
+29
-27
@@ -14,29 +14,32 @@ configure_file(cmake/windows/obs.rc.in obs.rc)
|
||||
|
||||
target_sources(
|
||||
obs-studio
|
||||
PRIVATE # cmake-format: sortable
|
||||
cmake/windows/obs.manifest
|
||||
obs.rc
|
||||
platform-windows.cpp
|
||||
update/crypto-helpers-mbedtls.cpp
|
||||
update/crypto-helpers.hpp
|
||||
update/models/branches.hpp
|
||||
update/models/whatsnew.hpp
|
||||
update/shared-update.cpp
|
||||
update/shared-update.hpp
|
||||
update/update-helpers.cpp
|
||||
update/update-helpers.hpp
|
||||
update/update-window.cpp
|
||||
update/update-window.hpp
|
||||
update/win-update.cpp
|
||||
update/win-update.hpp
|
||||
win-dll-blocklist.c
|
||||
win-update/updater/manifest.hpp)
|
||||
PRIVATE
|
||||
cmake/windows/obs.manifest
|
||||
obs.rc
|
||||
platform-windows.cpp
|
||||
update/crypto-helpers-mbedtls.cpp
|
||||
update/crypto-helpers.hpp
|
||||
update/models/branches.hpp
|
||||
update/models/whatsnew.hpp
|
||||
update/shared-update.cpp
|
||||
update/shared-update.hpp
|
||||
update/update-helpers.cpp
|
||||
update/update-helpers.hpp
|
||||
update/update-window.cpp
|
||||
update/update-window.hpp
|
||||
update/win-update.cpp
|
||||
update/win-update.hpp
|
||||
win-dll-blocklist.c
|
||||
win-update/updater/manifest.hpp
|
||||
)
|
||||
|
||||
target_sources(obs-studio PRIVATE system-info-windows.cpp)
|
||||
|
||||
target_link_libraries(obs-studio PRIVATE crypt32 OBS::blake2 OBS::w32-pthreads MbedTLS::MbedTLS
|
||||
nlohmann_json::nlohmann_json Detours::Detours)
|
||||
target_link_libraries(
|
||||
obs-studio
|
||||
PRIVATE crypt32 OBS::blake2 OBS::w32-pthreads MbedTLS::MbedTLS nlohmann_json::nlohmann_json Detours::Detours
|
||||
)
|
||||
|
||||
target_compile_definitions(obs-studio PRIVATE PSAPI_VERSION=2)
|
||||
|
||||
@@ -60,14 +63,13 @@ set_source_files_properties(update/win-update.cpp PROPERTIES COMPILE_DEFINITIONS
|
||||
|
||||
add_subdirectory(win-update/updater)
|
||||
|
||||
set_property(
|
||||
TARGET obs-studio
|
||||
APPEND
|
||||
PROPERTY AUTORCC_OPTIONS --format-version 1)
|
||||
set_property(TARGET obs-studio APPEND PROPERTY AUTORCC_OPTIONS --format-version 1)
|
||||
|
||||
set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT obs-studio)
|
||||
set_target_properties(
|
||||
obs-studio
|
||||
PROPERTIES WIN32_EXECUTABLE TRUE
|
||||
VS_DEBUGGER_COMMAND "${CMAKE_BINARY_DIR}/rundir/$<CONFIG>/bin/64bit/$<TARGET_FILE_NAME:obs-studio>"
|
||||
VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/rundir/$<CONFIG>/bin/64bit")
|
||||
PROPERTIES
|
||||
WIN32_EXECUTABLE TRUE
|
||||
VS_DEBUGGER_COMMAND "${CMAKE_BINARY_DIR}/rundir/$<CONFIG>/bin/64bit/$<TARGET_FILE_NAME:obs-studio>"
|
||||
VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/rundir/$<CONFIG>/bin/64bit"
|
||||
)
|
||||
|
||||
+61
-54
@@ -7,65 +7,72 @@ if(NOT TARGET OBS::qt-plain-text-edit)
|
||||
endif()
|
||||
|
||||
if(NOT TARGET OBS::qt-slider-ignorewheel)
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/slider-ignorewheel"
|
||||
"${CMAKE_BINARY_DIR}/shared/qt/slider-ignorewheel")
|
||||
add_subdirectory(
|
||||
"${CMAKE_SOURCE_DIR}/shared/qt/slider-ignorewheel"
|
||||
"${CMAKE_BINARY_DIR}/shared/qt/slider-ignorewheel"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT TARGET OBS::qt-vertical-scroll-area)
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/vertical-scroll-area"
|
||||
"${CMAKE_BINARY_DIR}/shared/qt/vertical-scroll-area")
|
||||
add_subdirectory(
|
||||
"${CMAKE_SOURCE_DIR}/shared/qt/vertical-scroll-area"
|
||||
"${CMAKE_BINARY_DIR}/shared/qt/vertical-scroll-area"
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(obs-studio PRIVATE OBS::properties-view OBS::qt-plain-text-edit OBS::qt-slider-ignorewheel
|
||||
OBS::qt-vertical-scroll-area)
|
||||
target_link_libraries(
|
||||
obs-studio
|
||||
PRIVATE OBS::properties-view OBS::qt-plain-text-edit OBS::qt-slider-ignorewheel OBS::qt-vertical-scroll-area
|
||||
)
|
||||
|
||||
target_sources(
|
||||
obs-studio
|
||||
PRIVATE # cmake-format: sortable
|
||||
absolute-slider.cpp
|
||||
absolute-slider.hpp
|
||||
adv-audio-control.cpp
|
||||
adv-audio-control.hpp
|
||||
audio-encoders.cpp
|
||||
audio-encoders.hpp
|
||||
balance-slider.hpp
|
||||
basic-controls.cpp
|
||||
basic-controls.hpp
|
||||
clickable-label.hpp
|
||||
context-bar-controls.cpp
|
||||
context-bar-controls.hpp
|
||||
focus-list.cpp
|
||||
focus-list.hpp
|
||||
horizontal-scroll-area.cpp
|
||||
horizontal-scroll-area.hpp
|
||||
hotkey-edit.cpp
|
||||
hotkey-edit.hpp
|
||||
item-widget-helpers.cpp
|
||||
item-widget-helpers.hpp
|
||||
lineedit-autoresize.cpp
|
||||
lineedit-autoresize.hpp
|
||||
log-viewer.cpp
|
||||
log-viewer.hpp
|
||||
media-controls.cpp
|
||||
media-controls.hpp
|
||||
menu-button.cpp
|
||||
menu-button.hpp
|
||||
mute-checkbox.hpp
|
||||
noncheckable-button.hpp
|
||||
remote-text.cpp
|
||||
remote-text.hpp
|
||||
scene-tree.cpp
|
||||
scene-tree.hpp
|
||||
screenshot-obj.hpp
|
||||
source-label.cpp
|
||||
source-label.hpp
|
||||
source-tree.cpp
|
||||
source-tree.hpp
|
||||
undo-stack-obs.cpp
|
||||
undo-stack-obs.hpp
|
||||
url-push-button.cpp
|
||||
url-push-button.hpp
|
||||
visibility-item-widget.cpp
|
||||
visibility-item-widget.hpp
|
||||
volume-control.cpp
|
||||
volume-control.hpp)
|
||||
PRIVATE
|
||||
absolute-slider.cpp
|
||||
absolute-slider.hpp
|
||||
adv-audio-control.cpp
|
||||
adv-audio-control.hpp
|
||||
audio-encoders.cpp
|
||||
audio-encoders.hpp
|
||||
balance-slider.hpp
|
||||
basic-controls.cpp
|
||||
basic-controls.hpp
|
||||
clickable-label.hpp
|
||||
context-bar-controls.cpp
|
||||
context-bar-controls.hpp
|
||||
focus-list.cpp
|
||||
focus-list.hpp
|
||||
horizontal-scroll-area.cpp
|
||||
horizontal-scroll-area.hpp
|
||||
hotkey-edit.cpp
|
||||
hotkey-edit.hpp
|
||||
item-widget-helpers.cpp
|
||||
item-widget-helpers.hpp
|
||||
lineedit-autoresize.cpp
|
||||
lineedit-autoresize.hpp
|
||||
log-viewer.cpp
|
||||
log-viewer.hpp
|
||||
media-controls.cpp
|
||||
media-controls.hpp
|
||||
menu-button.cpp
|
||||
menu-button.hpp
|
||||
mute-checkbox.hpp
|
||||
noncheckable-button.hpp
|
||||
remote-text.cpp
|
||||
remote-text.hpp
|
||||
scene-tree.cpp
|
||||
scene-tree.hpp
|
||||
screenshot-obj.hpp
|
||||
source-label.cpp
|
||||
source-label.hpp
|
||||
source-tree.cpp
|
||||
source-tree.hpp
|
||||
undo-stack-obs.cpp
|
||||
undo-stack-obs.hpp
|
||||
url-push-button.cpp
|
||||
url-push-button.hpp
|
||||
visibility-item-widget.cpp
|
||||
visibility-item-widget.hpp
|
||||
volume-control.cpp
|
||||
volume-control.hpp
|
||||
)
|
||||
|
||||
+46
-53
@@ -1,10 +1,6 @@
|
||||
# cmake-format: off
|
||||
find_package(Qt6 REQUIRED Widgets Network Svg Xml)
|
||||
# cmake-format: on
|
||||
|
||||
if(OS_LINUX
|
||||
OR OS_FREEBSD
|
||||
OR OS_OPENBSD)
|
||||
if(OS_LINUX OR OS_FREEBSD OR OS_OPENBSD)
|
||||
find_package(Qt6 REQUIRED Gui DBus)
|
||||
endif()
|
||||
|
||||
@@ -12,61 +8,58 @@ if(NOT TARGET OBS::qt-wrappers)
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/wrappers" "${CMAKE_BINARY_DIR}/shared/qt/wrappers")
|
||||
endif()
|
||||
|
||||
target_link_libraries(obs-studio PRIVATE Qt::Widgets Qt::Svg Qt::Xml Qt::Network OBS::qt-wrappers)
|
||||
target_link_libraries(
|
||||
obs-studio
|
||||
PRIVATE Qt::Widgets Qt::Svg Qt::Xml Qt::Network OBS::qt-wrappers
|
||||
)
|
||||
|
||||
set_target_properties(
|
||||
obs-studio
|
||||
PROPERTIES AUTOMOC ON
|
||||
AUTOUIC ON
|
||||
AUTORCC ON)
|
||||
PROPERTIES AUTOMOC ON AUTOUIC ON AUTORCC ON
|
||||
)
|
||||
|
||||
set_property(
|
||||
TARGET obs-studio
|
||||
APPEND
|
||||
PROPERTY AUTOUIC_SEARCH_PATHS forms forms/source-toolbar)
|
||||
set_property(TARGET obs-studio APPEND PROPERTY AUTOUIC_SEARCH_PATHS forms forms/source-toolbar)
|
||||
|
||||
set(_qt_sources
|
||||
# cmake-format: sortable
|
||||
forms/AutoConfigFinishPage.ui
|
||||
forms/AutoConfigStartPage.ui
|
||||
forms/AutoConfigStartPage.ui
|
||||
forms/AutoConfigStreamPage.ui
|
||||
forms/AutoConfigTestPage.ui
|
||||
forms/AutoConfigVideoPage.ui
|
||||
forms/ColorSelect.ui
|
||||
forms/obs.qrc
|
||||
forms/OBSAbout.ui
|
||||
forms/OBSAdvAudio.ui
|
||||
forms/OBSBasic.ui
|
||||
forms/OBSBasicControls.ui
|
||||
forms/OBSBasicFilters.ui
|
||||
forms/OBSBasicInteraction.ui
|
||||
forms/OBSBasicProperties.ui
|
||||
forms/OBSBasicSettings.ui
|
||||
forms/OBSBasicSourceSelect.ui
|
||||
forms/OBSBasicTransform.ui
|
||||
forms/OBSBasicVCamConfig.ui
|
||||
forms/OBSExtraBrowsers.ui
|
||||
forms/OBSImporter.ui
|
||||
forms/OBSLogReply.ui
|
||||
forms/OBSLogViewer.ui
|
||||
forms/OBSMissingFiles.ui
|
||||
forms/OBSRemux.ui
|
||||
forms/OBSUpdate.ui
|
||||
forms/OBSYoutubeActions.ui
|
||||
forms/source-toolbar/browser-source-toolbar.ui
|
||||
forms/source-toolbar/color-source-toolbar.ui
|
||||
forms/source-toolbar/device-select-toolbar.ui
|
||||
forms/source-toolbar/game-capture-toolbar.ui
|
||||
forms/source-toolbar/image-source-toolbar.ui
|
||||
forms/source-toolbar/media-controls.ui
|
||||
forms/source-toolbar/text-source-toolbar.ui)
|
||||
set(
|
||||
_qt_sources
|
||||
forms/AutoConfigFinishPage.ui
|
||||
forms/AutoConfigStartPage.ui
|
||||
forms/AutoConfigStartPage.ui
|
||||
forms/AutoConfigStreamPage.ui
|
||||
forms/AutoConfigTestPage.ui
|
||||
forms/AutoConfigVideoPage.ui
|
||||
forms/ColorSelect.ui
|
||||
forms/obs.qrc
|
||||
forms/OBSAbout.ui
|
||||
forms/OBSAdvAudio.ui
|
||||
forms/OBSBasic.ui
|
||||
forms/OBSBasicControls.ui
|
||||
forms/OBSBasicFilters.ui
|
||||
forms/OBSBasicInteraction.ui
|
||||
forms/OBSBasicProperties.ui
|
||||
forms/OBSBasicSettings.ui
|
||||
forms/OBSBasicSourceSelect.ui
|
||||
forms/OBSBasicTransform.ui
|
||||
forms/OBSBasicVCamConfig.ui
|
||||
forms/OBSExtraBrowsers.ui
|
||||
forms/OBSImporter.ui
|
||||
forms/OBSLogReply.ui
|
||||
forms/OBSLogViewer.ui
|
||||
forms/OBSMissingFiles.ui
|
||||
forms/OBSRemux.ui
|
||||
forms/OBSUpdate.ui
|
||||
forms/OBSYoutubeActions.ui
|
||||
forms/source-toolbar/browser-source-toolbar.ui
|
||||
forms/source-toolbar/color-source-toolbar.ui
|
||||
forms/source-toolbar/device-select-toolbar.ui
|
||||
forms/source-toolbar/game-capture-toolbar.ui
|
||||
forms/source-toolbar/image-source-toolbar.ui
|
||||
forms/source-toolbar/media-controls.ui
|
||||
forms/source-toolbar/text-source-toolbar.ui
|
||||
)
|
||||
|
||||
target_sources(obs-studio PRIVATE ${_qt_sources})
|
||||
|
||||
source_group(
|
||||
TREE "${CMAKE_CURRENT_SOURCE_DIR}/forms"
|
||||
PREFIX "UI Files"
|
||||
FILES ${_qt_sources})
|
||||
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}/forms" PREFIX "UI Files" FILES ${_qt_sources})
|
||||
|
||||
unset(_qt_sources)
|
||||
|
||||
+59
-58
@@ -1,60 +1,61 @@
|
||||
target_sources(
|
||||
obs-studio
|
||||
PRIVATE # cmake-format: sortable
|
||||
window-basic-about.cpp
|
||||
window-basic-about.hpp
|
||||
window-basic-adv-audio.cpp
|
||||
window-basic-adv-audio.hpp
|
||||
window-basic-auto-config-test.cpp
|
||||
window-basic-auto-config.cpp
|
||||
window-basic-auto-config.hpp
|
||||
window-basic-filters.cpp
|
||||
window-basic-filters.hpp
|
||||
window-basic-interaction.cpp
|
||||
window-basic-interaction.hpp
|
||||
window-basic-main-browser.cpp
|
||||
window-basic-main-dropfiles.cpp
|
||||
window-basic-main-icons.cpp
|
||||
window-basic-main-outputs.cpp
|
||||
window-basic-main-outputs.hpp
|
||||
window-basic-main-profiles.cpp
|
||||
window-basic-main-scene-collections.cpp
|
||||
window-basic-main-screenshot.cpp
|
||||
window-basic-main-transitions.cpp
|
||||
window-basic-main.cpp
|
||||
window-basic-main.hpp
|
||||
window-basic-preview.cpp
|
||||
window-basic-preview.hpp
|
||||
window-basic-properties.cpp
|
||||
window-basic-properties.hpp
|
||||
window-basic-settings-a11y.cpp
|
||||
window-basic-settings-appearance.cpp
|
||||
window-basic-settings-stream.cpp
|
||||
window-basic-settings.cpp
|
||||
window-basic-settings.hpp
|
||||
window-basic-source-select.cpp
|
||||
window-basic-source-select.hpp
|
||||
window-basic-stats.cpp
|
||||
window-basic-stats.hpp
|
||||
window-basic-status-bar.cpp
|
||||
window-basic-status-bar.hpp
|
||||
window-basic-transform.cpp
|
||||
window-basic-transform.hpp
|
||||
window-basic-vcam-config.cpp
|
||||
window-basic-vcam-config.hpp
|
||||
window-basic-vcam.hpp
|
||||
window-dock.cpp
|
||||
window-dock.hpp
|
||||
window-importer.cpp
|
||||
window-importer.hpp
|
||||
window-log-reply.cpp
|
||||
window-log-reply.hpp
|
||||
window-main.hpp
|
||||
window-missing-files.cpp
|
||||
window-missing-files.hpp
|
||||
window-namedialog.cpp
|
||||
window-namedialog.hpp
|
||||
window-projector.cpp
|
||||
window-projector.hpp
|
||||
window-remux.cpp
|
||||
window-remux.hpp)
|
||||
PRIVATE
|
||||
window-basic-about.cpp
|
||||
window-basic-about.hpp
|
||||
window-basic-adv-audio.cpp
|
||||
window-basic-adv-audio.hpp
|
||||
window-basic-auto-config-test.cpp
|
||||
window-basic-auto-config.cpp
|
||||
window-basic-auto-config.hpp
|
||||
window-basic-filters.cpp
|
||||
window-basic-filters.hpp
|
||||
window-basic-interaction.cpp
|
||||
window-basic-interaction.hpp
|
||||
window-basic-main-browser.cpp
|
||||
window-basic-main-dropfiles.cpp
|
||||
window-basic-main-icons.cpp
|
||||
window-basic-main-outputs.cpp
|
||||
window-basic-main-outputs.hpp
|
||||
window-basic-main-profiles.cpp
|
||||
window-basic-main-scene-collections.cpp
|
||||
window-basic-main-screenshot.cpp
|
||||
window-basic-main-transitions.cpp
|
||||
window-basic-main.cpp
|
||||
window-basic-main.hpp
|
||||
window-basic-preview.cpp
|
||||
window-basic-preview.hpp
|
||||
window-basic-properties.cpp
|
||||
window-basic-properties.hpp
|
||||
window-basic-settings-a11y.cpp
|
||||
window-basic-settings-appearance.cpp
|
||||
window-basic-settings-stream.cpp
|
||||
window-basic-settings.cpp
|
||||
window-basic-settings.hpp
|
||||
window-basic-source-select.cpp
|
||||
window-basic-source-select.hpp
|
||||
window-basic-stats.cpp
|
||||
window-basic-stats.hpp
|
||||
window-basic-status-bar.cpp
|
||||
window-basic-status-bar.hpp
|
||||
window-basic-transform.cpp
|
||||
window-basic-transform.hpp
|
||||
window-basic-vcam-config.cpp
|
||||
window-basic-vcam-config.hpp
|
||||
window-basic-vcam.hpp
|
||||
window-dock.cpp
|
||||
window-dock.hpp
|
||||
window-importer.cpp
|
||||
window-importer.hpp
|
||||
window-log-reply.cpp
|
||||
window-log-reply.hpp
|
||||
window-main.hpp
|
||||
window-missing-files.cpp
|
||||
window-missing-files.hpp
|
||||
window-namedialog.cpp
|
||||
window-namedialog.hpp
|
||||
window-projector.cpp
|
||||
window-projector.hpp
|
||||
window-remux.cpp
|
||||
window-remux.hpp
|
||||
)
|
||||
|
||||
@@ -11,9 +11,7 @@ find_package(LibAJANTV2 REQUIRED)
|
||||
|
||||
find_package(Qt6 REQUIRED Widgets)
|
||||
|
||||
if(OS_LINUX
|
||||
OR OS_FREEBSD
|
||||
OR OS_OPENBSD)
|
||||
if(OS_LINUX OR OS_FREEBSD OR OS_OPENBSD)
|
||||
find_package(Qt6 REQUIRED Gui)
|
||||
|
||||
find_package(X11 REQUIRED)
|
||||
@@ -30,25 +28,29 @@ endif()
|
||||
add_library(aja-output-ui MODULE)
|
||||
add_library(OBS::aja-output-ui ALIAS aja-output-ui)
|
||||
|
||||
target_sources(aja-output-ui PRIVATE # cmake-format: sortable
|
||||
aja-ui-main.cpp aja-ui-main.h AJAOutputUI.cpp AJAOutputUI.h)
|
||||
target_sources(aja-output-ui PRIVATE aja-ui-main.cpp aja-ui-main.h AJAOutputUI.cpp AJAOutputUI.h)
|
||||
|
||||
target_sources(aja-output-ui PRIVATE forms/output.ui)
|
||||
|
||||
target_compile_options(
|
||||
aja-output-ui PRIVATE $<$<COMPILE_LANG_AND_ID:CXX,AppleClang,Clang>:-Wno-deprecated-declarations>
|
||||
$<$<COMPILE_LANG_AND_ID:CXX,AppleClang,Clang>:-Wno-quoted-include-in-framework-header>)
|
||||
aja-output-ui
|
||||
PRIVATE
|
||||
$<$<COMPILE_LANG_AND_ID:CXX,AppleClang,Clang>:-Wno-deprecated-declarations>
|
||||
$<$<COMPILE_LANG_AND_ID:CXX,AppleClang,Clang>:-Wno-quoted-include-in-framework-header>
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
aja-output-ui
|
||||
PRIVATE OBS::libobs
|
||||
OBS::aja-support
|
||||
OBS::frontend-api
|
||||
OBS::properties-view
|
||||
Qt::Widgets
|
||||
AJA::LibAJANTV2
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:X11::X11>
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:Qt::GuiPrivate>)
|
||||
PRIVATE
|
||||
OBS::libobs
|
||||
OBS::aja-support
|
||||
OBS::frontend-api
|
||||
OBS::properties-view
|
||||
Qt::Widgets
|
||||
AJA::LibAJANTV2
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:X11::X11>
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:Qt::GuiPrivate>
|
||||
)
|
||||
|
||||
target_link_options(aja-output-ui PRIVATE $<$<PLATFORM_ID:Windows>:/IGNORE:4099>)
|
||||
|
||||
@@ -56,12 +58,9 @@ if(OS_WINDOWS)
|
||||
configure_file(cmake/windows/obs-module.rc.in aja-output-ui.rc)
|
||||
target_sources(aja-output-ui PRIVATE aja-output-ui.rc)
|
||||
|
||||
# cmake-format: off
|
||||
set_property(TARGET aja-output-ui APPEND PROPERTY AUTORCC_OPTIONS --format-version 1)
|
||||
# cmake-format: on
|
||||
endif()
|
||||
|
||||
# cmake-format: off
|
||||
set_target_properties_obs(
|
||||
aja-output-ui
|
||||
PROPERTIES FOLDER frontend
|
||||
@@ -69,5 +68,5 @@ set_target_properties_obs(
|
||||
AUTOMOC ON
|
||||
AUTOUIC ON
|
||||
AUTORCC ON
|
||||
AUTOUIC_SEARCH_PATHS forms)
|
||||
# cmake-format: on
|
||||
AUTOUIC_SEARCH_PATHS forms
|
||||
)
|
||||
|
||||
@@ -7,40 +7,40 @@ if(NOT ENABLE_DECKLINK)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(OS_LINUX
|
||||
OR OS_FREEBSD
|
||||
OR OS_OPENBSD)
|
||||
if(OS_LINUX OR OS_FREEBSD OR OS_OPENBSD)
|
||||
find_package(X11 REQUIRED)
|
||||
mark_as_advanced(X11)
|
||||
endif()
|
||||
|
||||
# cmake-format: off
|
||||
find_package(Qt6 REQUIRED Widgets)
|
||||
# cmake-format: on
|
||||
|
||||
add_library(decklink-captions MODULE)
|
||||
add_library(OBS::decklink-captions ALIAS decklink-captions)
|
||||
|
||||
target_sources(decklink-captions PRIVATE decklink-captions.cpp decklink-captions.h forms/captions.ui)
|
||||
|
||||
target_compile_options(decklink-captions PRIVATE $<$<PLATFORM_ID:Darwin>:-Wno-quoted-include-in-framework-header>
|
||||
$<$<PLATFORM_ID:Darwin>:-Wno-comma>)
|
||||
target_compile_options(
|
||||
decklink-captions
|
||||
PRIVATE $<$<PLATFORM_ID:Darwin>:-Wno-quoted-include-in-framework-header> $<$<PLATFORM_ID:Darwin>:-Wno-comma>
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
decklink-captions
|
||||
PRIVATE OBS::frontend-api OBS::libobs Qt::Widgets
|
||||
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,Cocoa.framework>>" $<$<PLATFORM_ID:Linux,FreeBSD>:X11::X11>)
|
||||
PRIVATE
|
||||
OBS::frontend-api
|
||||
OBS::libobs
|
||||
Qt::Widgets
|
||||
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,Cocoa.framework>>"
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD>:X11::X11>
|
||||
)
|
||||
|
||||
if(OS_WINDOWS)
|
||||
configure_file(cmake/windows/obs-module.rc.in decklink-captions.rc)
|
||||
target_sources(decklink-captions PRIVATE decklink-captions.rc)
|
||||
|
||||
# cmake-format: off
|
||||
set_property(TARGET decklink-captions APPEND PROPERTY AUTORCC_OPTIONS --format-version 1)
|
||||
# cmake-format: on
|
||||
endif()
|
||||
|
||||
# cmake-format: off
|
||||
set_target_properties_obs(
|
||||
decklink-captions
|
||||
PROPERTIES FOLDER plugins/decklink
|
||||
@@ -48,5 +48,5 @@ set_target_properties_obs(
|
||||
AUTOMOC ON
|
||||
AUTOUIC ON
|
||||
AUTORCC ON
|
||||
AUTOUIC_SEARCH_PATHS forms)
|
||||
# cmake-format: on
|
||||
AUTOUIC_SEARCH_PATHS forms
|
||||
)
|
||||
|
||||
@@ -9,9 +9,7 @@ endif()
|
||||
|
||||
find_package(Qt6 REQUIRED Widgets)
|
||||
|
||||
if(OS_LINUX
|
||||
OR OS_FREEBSD
|
||||
OR OS_OPENBSD)
|
||||
if(OS_LINUX OR OS_FREEBSD OR OS_OPENBSD)
|
||||
find_package(Qt6 REQUIRED Gui)
|
||||
|
||||
find_package(X11 REQUIRED)
|
||||
@@ -26,28 +24,30 @@ endif()
|
||||
|
||||
target_sources(decklink-output-ui PRIVATE forms/output.ui)
|
||||
|
||||
target_sources(decklink-output-ui PRIVATE DecklinkOutputUI.cpp DecklinkOutputUI.h decklink-ui-main.cpp
|
||||
decklink-ui-main.h)
|
||||
target_sources(
|
||||
decklink-output-ui
|
||||
PRIVATE DecklinkOutputUI.cpp DecklinkOutputUI.h decklink-ui-main.cpp decklink-ui-main.h
|
||||
)
|
||||
|
||||
target_compile_options(decklink-output-ui PRIVATE $<$<PLATFORM_ID:Darwin>:-Wno-quoted-include-in-framework-header>)
|
||||
|
||||
target_link_libraries(
|
||||
decklink-output-ui
|
||||
PRIVATE OBS::libobs
|
||||
OBS::frontend-api
|
||||
OBS::properties-view
|
||||
Qt::Widgets
|
||||
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,Cocoa.framework>>"
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:X11::X11>
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:Qt::GuiPrivate>)
|
||||
PRIVATE
|
||||
OBS::libobs
|
||||
OBS::frontend-api
|
||||
OBS::properties-view
|
||||
Qt::Widgets
|
||||
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,Cocoa.framework>>"
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:X11::X11>
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:Qt::GuiPrivate>
|
||||
)
|
||||
|
||||
if(OS_WINDOWS)
|
||||
configure_file(cmake/windows/obs-module.rc.in decklink-output-ui.rc)
|
||||
target_sources(decklink-output-ui PRIVATE decklink-output-ui.rc)
|
||||
|
||||
# cmake-format: off
|
||||
set_property(TARGET decklink-output-ui APPEND PROPERTY AUTORCC_OPTIONS --format-version 1)
|
||||
# cmake-format: on
|
||||
endif()
|
||||
|
||||
set_target_properties_obs(
|
||||
@@ -57,4 +57,5 @@ set_target_properties_obs(
|
||||
AUTOMOC ON
|
||||
AUTOUIC ON
|
||||
AUTORCC ON
|
||||
AUTOUIC_SEARCH_PATHS forms)
|
||||
AUTOUIC_SEARCH_PATHS forms
|
||||
)
|
||||
|
||||
@@ -4,9 +4,7 @@ legacy_check()
|
||||
|
||||
find_package(Qt6 REQUIRED Widgets)
|
||||
|
||||
if(OS_LINUX
|
||||
OR OS_FREEBSD
|
||||
OR OS_OPENBSD)
|
||||
if(OS_LINUX OR OS_FREEBSD OR OS_OPENBSD)
|
||||
find_package(Qt6 REQUIRED Gui)
|
||||
find_package(X11 REQUIRED)
|
||||
endif()
|
||||
@@ -28,42 +26,49 @@ endif()
|
||||
|
||||
target_sources(
|
||||
frontend-tools
|
||||
PRIVATE # cmake-format: sortable
|
||||
$<$<PLATFORM_ID:Darwin>:auto-scene-switcher-osx.mm>
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:auto-scene-switcher-nix.cpp>
|
||||
$<$<PLATFORM_ID:Windows>:auto-scene-switcher-win.cpp>
|
||||
$<$<PLATFORM_ID:Windows>:captions-handler.cpp>
|
||||
$<$<PLATFORM_ID:Windows>:captions-handler.hpp>
|
||||
$<$<PLATFORM_ID:Windows>:captions-mssapi-stream.cpp>
|
||||
$<$<PLATFORM_ID:Windows>:captions-mssapi-stream.hpp>
|
||||
$<$<PLATFORM_ID:Windows>:captions-mssapi.cpp>
|
||||
$<$<PLATFORM_ID:Windows>:captions-mssapi.hpp>
|
||||
$<$<PLATFORM_ID:Windows>:captions.cpp>
|
||||
$<$<PLATFORM_ID:Windows>:captions.hpp>
|
||||
auto-scene-switcher.cpp
|
||||
auto-scene-switcher.hpp
|
||||
frontend-tools.c
|
||||
output-timer.cpp
|
||||
output-timer.hpp
|
||||
tool-helpers.hpp)
|
||||
PRIVATE
|
||||
$<$<PLATFORM_ID:Darwin>:auto-scene-switcher-osx.mm>
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:auto-scene-switcher-nix.cpp>
|
||||
$<$<PLATFORM_ID:Windows>:auto-scene-switcher-win.cpp>
|
||||
$<$<PLATFORM_ID:Windows>:captions-handler.cpp>
|
||||
$<$<PLATFORM_ID:Windows>:captions-handler.hpp>
|
||||
$<$<PLATFORM_ID:Windows>:captions-mssapi-stream.cpp>
|
||||
$<$<PLATFORM_ID:Windows>:captions-mssapi-stream.hpp>
|
||||
$<$<PLATFORM_ID:Windows>:captions-mssapi.cpp>
|
||||
$<$<PLATFORM_ID:Windows>:captions-mssapi.hpp>
|
||||
$<$<PLATFORM_ID:Windows>:captions.cpp>
|
||||
$<$<PLATFORM_ID:Windows>:captions.hpp>
|
||||
auto-scene-switcher.cpp
|
||||
auto-scene-switcher.hpp
|
||||
frontend-tools.c
|
||||
output-timer.cpp
|
||||
output-timer.hpp
|
||||
tool-helpers.hpp
|
||||
)
|
||||
|
||||
target_sources(frontend-tools PRIVATE forms/auto-scene-switcher.ui forms/captions.ui forms/output-timer.ui
|
||||
forms/scripts.ui)
|
||||
target_sources(
|
||||
frontend-tools
|
||||
PRIVATE forms/auto-scene-switcher.ui forms/captions.ui forms/output-timer.ui forms/scripts.ui
|
||||
)
|
||||
|
||||
target_compile_options(frontend-tools PRIVATE $<$<PLATFORM_ID:Darwin>:-Wno-quoted-include-in-framework-header>
|
||||
$<$<PLATFORM_ID:Darwin>:-Wno-comma>)
|
||||
target_compile_options(
|
||||
frontend-tools
|
||||
PRIVATE $<$<PLATFORM_ID:Darwin>:-Wno-quoted-include-in-framework-header> $<$<PLATFORM_ID:Darwin>:-Wno-comma>
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
frontend-tools
|
||||
PRIVATE OBS::frontend-api
|
||||
OBS::libobs
|
||||
OBS::properties-view
|
||||
OBS::qt-plain-text-edit
|
||||
OBS::qt-wrappers
|
||||
Qt::Widgets
|
||||
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,Cocoa>>"
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:X11::X11>
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:Qt::GuiPrivate>)
|
||||
PRIVATE
|
||||
OBS::frontend-api
|
||||
OBS::libobs
|
||||
OBS::properties-view
|
||||
OBS::qt-plain-text-edit
|
||||
OBS::qt-wrappers
|
||||
Qt::Widgets
|
||||
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,Cocoa>>"
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:X11::X11>
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:Qt::GuiPrivate>
|
||||
)
|
||||
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/obs-scripting" "${CMAKE_BINARY_DIR}/shared/obs-scripting")
|
||||
|
||||
@@ -77,12 +82,9 @@ if(OS_WINDOWS)
|
||||
configure_file(cmake/windows/obs-module.rc.in frontend-tools.rc)
|
||||
target_sources(frontend-tools PRIVATE frontend-tools.rc)
|
||||
|
||||
# cmake-format: off
|
||||
set_property(TARGET frontend-tools APPEND PROPERTY AUTORCC_OPTIONS --format-version 1)
|
||||
# cmake-format: on
|
||||
endif()
|
||||
|
||||
# cmake-format: off
|
||||
set_target_properties_obs(
|
||||
frontend-tools
|
||||
PROPERTIES FOLDER frontend
|
||||
@@ -91,5 +93,5 @@ set_target_properties_obs(
|
||||
AUTOUIC ON
|
||||
AUTORCC ON
|
||||
AUTOUIC_SEARCH_PATHS forms
|
||||
XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES)
|
||||
# cmake-format: on
|
||||
XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES
|
||||
)
|
||||
|
||||
@@ -18,12 +18,10 @@ elseif(OS_MACOS)
|
||||
set_target_properties(obs-frontend-api PROPERTIES SOVERSION 1)
|
||||
endif()
|
||||
|
||||
# cmake-format: off
|
||||
set_target_properties_obs(obs-frontend-api PROPERTIES FOLDER frontend PUBLIC_HEADER obs-frontend-api.h)
|
||||
|
||||
if (OS_WINDOWS OR OS_MACOS)
|
||||
if(OS_WINDOWS OR OS_MACOS)
|
||||
set_property(TARGET obs-frontend-api PROPERTY PREFIX "")
|
||||
endif()
|
||||
# cmake-format: on
|
||||
|
||||
target_export(obs-frontend-api)
|
||||
|
||||
@@ -9,18 +9,20 @@ add_executable(updater WIN32)
|
||||
|
||||
target_sources(
|
||||
updater
|
||||
PRIVATE hash.cpp
|
||||
helpers.cpp
|
||||
helpers.hpp
|
||||
http.cpp
|
||||
init-hook-files.c
|
||||
manifest.hpp
|
||||
patch.cpp
|
||||
resource.h
|
||||
updater.cpp
|
||||
updater.hpp
|
||||
updater.manifest
|
||||
updater.rc)
|
||||
PRIVATE
|
||||
hash.cpp
|
||||
helpers.cpp
|
||||
helpers.hpp
|
||||
http.cpp
|
||||
init-hook-files.c
|
||||
manifest.hpp
|
||||
patch.cpp
|
||||
resource.h
|
||||
updater.cpp
|
||||
updater.hpp
|
||||
updater.manifest
|
||||
updater.rc
|
||||
)
|
||||
|
||||
target_compile_definitions(updater PRIVATE NOMINMAX "PSAPI_VERSION=2")
|
||||
|
||||
@@ -28,20 +30,13 @@ target_include_directories(updater PRIVATE "${CMAKE_SOURCE_DIR}/libobs" "${CMAKE
|
||||
|
||||
target_link_libraries(
|
||||
updater
|
||||
PRIVATE OBS::blake2_static
|
||||
nlohmann_json::nlohmann_json
|
||||
zstd::libzstd_static
|
||||
comctl32
|
||||
shell32
|
||||
version
|
||||
winhttp
|
||||
wintrust)
|
||||
PRIVATE OBS::blake2_static nlohmann_json::nlohmann_json zstd::libzstd_static comctl32 shell32 version winhttp wintrust
|
||||
)
|
||||
|
||||
# zstd is hardcoded with /DEFAULTLIB:LIBCMT
|
||||
target_link_options(updater PRIVATE $<$<CONFIG:DEBUG>:/NODEFAULTLIB:LIBCMT>)
|
||||
|
||||
set_target_properties(
|
||||
updater
|
||||
PROPERTIES FOLDER frontend
|
||||
OUTPUT_NAME updater
|
||||
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
PROPERTIES FOLDER frontend OUTPUT_NAME updater MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>"
|
||||
)
|
||||
|
||||
@@ -4,7 +4,8 @@ if(NOT DEFINED APPDATA_RELEASE_DATE)
|
||||
COMMAND git log --tags -1 --pretty=%cd --date=short
|
||||
OUTPUT_VARIABLE APPDATA_RELEASE_DATE
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
else()
|
||||
file(TIMESTAMP "${CMAKE_SOURCE_DIR}/CMakeLists.txt" APPDATA_RELEASE_DATE "%Y-%m-%d")
|
||||
endif()
|
||||
@@ -16,7 +17,8 @@ if(NOT DEFINED GIT_HASH)
|
||||
COMMAND git rev-parse HEAD
|
||||
OUTPUT_VARIABLE GIT_HASH
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
else()
|
||||
set(GIT_HASH "master")
|
||||
endif()
|
||||
@@ -24,27 +26,33 @@ endif()
|
||||
|
||||
configure_file(com.obsproject.Studio.metainfo.xml.in com.obsproject.Studio.metainfo.xml)
|
||||
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/com.obsproject.Studio.metainfo.xml
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo)
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/com.obsproject.Studio.metainfo.xml
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo
|
||||
)
|
||||
|
||||
install(FILES com.obsproject.Studio.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
|
||||
|
||||
install(
|
||||
FILES icons/obs-logo-128.png
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/128x128/apps
|
||||
RENAME com.obsproject.Studio.png)
|
||||
RENAME com.obsproject.Studio.png
|
||||
)
|
||||
|
||||
install(
|
||||
FILES icons/obs-logo-256.png
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/256x256/apps
|
||||
RENAME com.obsproject.Studio.png)
|
||||
RENAME com.obsproject.Studio.png
|
||||
)
|
||||
|
||||
install(
|
||||
FILES icons/obs-logo-512.png
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/512x512/apps
|
||||
RENAME com.obsproject.Studio.png)
|
||||
RENAME com.obsproject.Studio.png
|
||||
)
|
||||
|
||||
install(
|
||||
FILES icons/obs-logo-scalable.svg
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps
|
||||
RENAME com.obsproject.Studio.svg)
|
||||
RENAME com.obsproject.Studio.svg
|
||||
)
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
# OBS CMake 32-bit slice module
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=E1121
|
||||
# cmake-format: on
|
||||
|
||||
include_guard(GLOBAL)
|
||||
|
||||
include(compilerconfig)
|
||||
@@ -17,7 +12,6 @@ macro(legacy_check)
|
||||
return()
|
||||
endmacro()
|
||||
|
||||
# cmake-format: off
|
||||
# target_disable_feature: Stub macro for 32-bit projects
|
||||
macro(target_disable_feature)
|
||||
endmacro()
|
||||
@@ -25,12 +19,13 @@ endmacro()
|
||||
# target_disable: Stub macro for 32-bit projects
|
||||
macro(target_disable)
|
||||
endmacro()
|
||||
# cmake-format: on
|
||||
|
||||
# check_uuid: Helper function to check for valid UUID
|
||||
function(check_uuid uuid_string return_value)
|
||||
set(valid_uuid TRUE)
|
||||
# gersemi: off
|
||||
set(uuid_token_lengths 8 4 4 4 12)
|
||||
# gersemi: on
|
||||
set(token_num 0)
|
||||
|
||||
string(REPLACE "-" ";" uuid_tokens ${uuid_string})
|
||||
@@ -57,9 +52,7 @@ function(check_uuid uuid_string return_value)
|
||||
set(valid_uuid FALSE)
|
||||
endif()
|
||||
message(DEBUG "UUID ${uuid_string} valid: ${valid_uuid}")
|
||||
# cmake-format: off
|
||||
set(${return_value} ${valid_uuid} PARENT_SCOPE)
|
||||
# cmake-format: on
|
||||
endfunction()
|
||||
|
||||
if(OS_WINDOWS)
|
||||
|
||||
@@ -3,14 +3,40 @@
|
||||
include_guard(GLOBAL)
|
||||
|
||||
# Map fallback configurations for optimized build configurations
|
||||
set(CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO RelWithDebInfo Release MinSizeRel None "")
|
||||
set(CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL MinSizeRel Release RelWithDebInfo None "")
|
||||
set(CMAKE_MAP_IMPORTED_CONFIG_RELEASE Release RelWithDebInfo MinSizeRel None "")
|
||||
# gersemi: off
|
||||
set(
|
||||
CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO
|
||||
RelWithDebInfo
|
||||
Release
|
||||
MinSizeRel
|
||||
None
|
||||
""
|
||||
)
|
||||
set(
|
||||
CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL
|
||||
MinSizeRel
|
||||
Release
|
||||
RelWithDebInfo
|
||||
None
|
||||
""
|
||||
)
|
||||
set(
|
||||
CMAKE_MAP_IMPORTED_CONFIG_RELEASE
|
||||
Release
|
||||
RelWithDebInfo
|
||||
MinSizeRel
|
||||
None
|
||||
""
|
||||
)
|
||||
# gersemi: on
|
||||
|
||||
# Prohibit in-source builds
|
||||
if("${CMAKE_CURRENT_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
message(FATAL_ERROR "In-source builds of OBS are not supported. "
|
||||
"Specify a build directory via 'cmake -S <SOURCE DIRECTORY> -B <BUILD_DIRECTORY>' instead.")
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"In-source builds of OBS are not supported. "
|
||||
"Specify a build directory via 'cmake -S <SOURCE DIRECTORY> -B <BUILD_DIRECTORY>' instead."
|
||||
)
|
||||
file(REMOVE_RECURSE "${CMAKE_CURRENT_SOURCE_DIR}/CMakeCache.txt" "${CMAKE_CURRENT_SOURCE_DIR}/CMakeFiles")
|
||||
endif()
|
||||
|
||||
@@ -41,10 +67,17 @@ include(osconfig)
|
||||
# Allow selection of common build types via UI
|
||||
if(NOT CMAKE_GENERATOR MATCHES "(Xcode|Visual Studio .+)")
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE
|
||||
"RelWithDebInfo"
|
||||
CACHE STRING "OBS build type [Release, RelWithDebInfo, Debug, MinSizeRel]" FORCE)
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Release RelWithDebInfo Debug MinSizeRel)
|
||||
set(
|
||||
CMAKE_BUILD_TYPE
|
||||
"RelWithDebInfo"
|
||||
CACHE STRING
|
||||
"OBS build type [Release, RelWithDebInfo, Debug, MinSizeRel]"
|
||||
FORCE
|
||||
)
|
||||
set_property(
|
||||
CACHE CMAKE_BUILD_TYPE
|
||||
PROPERTY STRINGS Release RelWithDebInfo Debug MinSizeRel
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -3,9 +3,12 @@
|
||||
include_guard(GLOBAL)
|
||||
|
||||
# Define build number cache file
|
||||
set(_BUILD_NUMBER_CACHE
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/.CMakeBuildNumber"
|
||||
CACHE INTERNAL "OBS build number cache file")
|
||||
set(
|
||||
_BUILD_NUMBER_CACHE
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/.CMakeBuildNumber"
|
||||
CACHE INTERNAL
|
||||
"OBS build number cache file"
|
||||
)
|
||||
|
||||
# Read build number from cache file or manual override
|
||||
if(NOT DEFINED OBS_BUILD_NUMBER)
|
||||
|
||||
@@ -1,26 +1,15 @@
|
||||
# OBS common build dependencies module
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=E1121
|
||||
# cmake-lint: disable=E1126
|
||||
# cmake-lint: disable=R0912
|
||||
# cmake-lint: disable=R0915
|
||||
# cmake-format: on
|
||||
|
||||
include_guard(GLOBAL)
|
||||
|
||||
# _check_deps_version: Checks for obs-deps VERSION file in prefix paths
|
||||
function(_check_deps_version version)
|
||||
set(found
|
||||
FALSE
|
||||
PARENT_SCOPE)
|
||||
set(found FALSE PARENT_SCOPE)
|
||||
|
||||
foreach(path IN LISTS CMAKE_PREFIX_PATH)
|
||||
if(EXISTS "${path}/share/obs-deps/VERSION")
|
||||
if(dependency STREQUAL qt6 AND NOT EXISTS "${path}/lib/cmake/Qt6/Qt6Config.cmake")
|
||||
# cmake-format: off
|
||||
set(found FALSE PARENT_SCOPE)
|
||||
# cmake-format: on
|
||||
continue()
|
||||
endif()
|
||||
|
||||
@@ -30,25 +19,25 @@ function(_check_deps_version version)
|
||||
string(REPLACE "-" "." version "${version}")
|
||||
|
||||
if(_check_version VERSION_EQUAL version)
|
||||
set(found
|
||||
TRUE
|
||||
PARENT_SCOPE)
|
||||
set(found TRUE PARENT_SCOPE)
|
||||
break()
|
||||
elseif(_check_version VERSION_LESS version)
|
||||
message(AUTHOR_WARNING "Older ${label} version detected in ${path}: \n"
|
||||
"Found ${_check_version}, require ${version}")
|
||||
message(
|
||||
AUTHOR_WARNING
|
||||
"Older ${label} version detected in ${path}: \n"
|
||||
"Found ${_check_version}, require ${version}"
|
||||
)
|
||||
list(REMOVE_ITEM CMAKE_PREFIX_PATH "${path}")
|
||||
list(APPEND CMAKE_PREFIX_PATH "${path}")
|
||||
set(CMAKE_PREFIX_PATH
|
||||
${CMAKE_PREFIX_PATH}
|
||||
PARENT_SCOPE)
|
||||
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
|
||||
continue()
|
||||
else()
|
||||
message(AUTHOR_WARNING "Newer ${label} version detected in ${path}: \n"
|
||||
"Found ${_check_version}, require ${version}")
|
||||
set(found
|
||||
TRUE
|
||||
PARENT_SCOPE)
|
||||
message(
|
||||
AUTHOR_WARNING
|
||||
"Newer ${label} version detected in ${path}: \n"
|
||||
"Found ${_check_version}, require ${version}"
|
||||
)
|
||||
set(found TRUE PARENT_SCOPE)
|
||||
break()
|
||||
endif()
|
||||
endif()
|
||||
@@ -75,9 +64,7 @@ function(_check_dependencies)
|
||||
string(JSON hash GET ${data} hashes ${platform})
|
||||
string(JSON url GET ${data} baseUrl)
|
||||
string(JSON label GET ${data} label)
|
||||
# cmake-format: off
|
||||
string(JSON revision ERROR_VARIABLE error GET ${data} revision ${platform})
|
||||
# cmake-format: on
|
||||
|
||||
message(STATUS "Setting up ${label} (${arch})")
|
||||
|
||||
@@ -96,8 +83,11 @@ function(_check_dependencies)
|
||||
endif()
|
||||
|
||||
if(EXISTS "${dependencies_dir}/.dependency_${dependency}_${arch}.sha256")
|
||||
file(READ "${dependencies_dir}/.dependency_${dependency}_${arch}.sha256"
|
||||
OBS_DEPENDENCY_${dependency}_${arch}_HASH)
|
||||
file(
|
||||
READ
|
||||
"${dependencies_dir}/.dependency_${dependency}_${arch}.sha256"
|
||||
OBS_DEPENDENCY_${dependency}_${arch}_HASH
|
||||
)
|
||||
endif()
|
||||
|
||||
set(skip FALSE)
|
||||
@@ -130,10 +120,7 @@ function(_check_dependencies)
|
||||
|
||||
if(NOT EXISTS "${dependencies_dir}/${file}")
|
||||
message(STATUS "Downloading ${url}")
|
||||
file(
|
||||
DOWNLOAD "${url}" "${dependencies_dir}/${file}"
|
||||
STATUS download_status
|
||||
EXPECTED_HASH SHA256=${hash})
|
||||
file(DOWNLOAD "${url}" "${dependencies_dir}/${file}" STATUS download_status EXPECTED_HASH SHA256=${hash})
|
||||
|
||||
list(GET download_status 0 error_code)
|
||||
list(GET download_status 1 error_message)
|
||||
@@ -162,16 +149,12 @@ function(_check_dependencies)
|
||||
file(WRITE "${dependencies_dir}/.dependency_${dependency}_${arch}.sha256" "${hash}")
|
||||
|
||||
if(dependency STREQUAL prebuilt)
|
||||
set(VLC_PATH
|
||||
"${dependencies_dir}/${destination}"
|
||||
CACHE PATH "VLC source code directory" FORCE)
|
||||
set(VLC_PATH "${dependencies_dir}/${destination}" CACHE PATH "VLC source code directory" FORCE)
|
||||
list(APPEND CMAKE_PREFIX_PATH "${dependencies_dir}/${destination}")
|
||||
elseif(dependency STREQUAL qt6)
|
||||
list(APPEND CMAKE_PREFIX_PATH "${dependencies_dir}/${destination}")
|
||||
elseif(dependency STREQUAL cef)
|
||||
set(CEF_ROOT_DIR
|
||||
"${dependencies_dir}/${destination}"
|
||||
CACHE PATH "CEF root directory" FORCE)
|
||||
set(CEF_ROOT_DIR "${dependencies_dir}/${destination}" CACHE PATH "CEF root directory" FORCE)
|
||||
endif()
|
||||
|
||||
message(STATUS "Setting up ${label} (${arch}) - done")
|
||||
@@ -179,7 +162,5 @@ function(_check_dependencies)
|
||||
|
||||
list(REMOVE_DUPLICATES CMAKE_PREFIX_PATH)
|
||||
|
||||
set(CMAKE_PREFIX_PATH
|
||||
${CMAKE_PREFIX_PATH}
|
||||
CACHE PATH "CMake prefix search path" FORCE)
|
||||
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} CACHE PATH "CMake prefix search path" FORCE)
|
||||
endfunction()
|
||||
|
||||
@@ -21,62 +21,66 @@ set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
set(CMAKE_VISIBILITY_INLINES_HIDDEN TRUE)
|
||||
|
||||
# clang options for C, C++, ObjC, and ObjC++
|
||||
set(_obs_clang_common_options
|
||||
-fno-strict-aliasing
|
||||
-Wno-trigraphs
|
||||
-Wno-missing-field-initializers
|
||||
-Wno-missing-prototypes
|
||||
-Werror=return-type
|
||||
-Wunreachable-code
|
||||
-Wquoted-include-in-framework-header
|
||||
-Wno-missing-braces
|
||||
-Wparentheses
|
||||
-Wswitch
|
||||
-Wno-unused-function
|
||||
-Wno-unused-label
|
||||
-Wunused-parameter
|
||||
-Wunused-variable
|
||||
-Wunused-value
|
||||
-Wempty-body
|
||||
-Wuninitialized
|
||||
-Wno-unknown-pragmas
|
||||
-Wfour-char-constants
|
||||
-Wconstant-conversion
|
||||
-Wno-conversion
|
||||
-Wint-conversion
|
||||
-Wbool-conversion
|
||||
-Wenum-conversion
|
||||
-Wnon-literal-null-conversion
|
||||
-Wsign-compare
|
||||
-Wshorten-64-to-32
|
||||
-Wpointer-sign
|
||||
-Wnewline-eof
|
||||
-Wno-implicit-fallthrough
|
||||
-Wdeprecated-declarations
|
||||
-Wno-sign-conversion
|
||||
-Winfinite-recursion
|
||||
-Wcomma
|
||||
-Wno-strict-prototypes
|
||||
-Wno-semicolon-before-method-body
|
||||
-Wformat-security
|
||||
-Wvla
|
||||
-Wno-error=shorten-64-to-32
|
||||
$<$<BOOL:${OBS_COMPILE_DEPRECATION_AS_WARNING}>:-Wno-error=deprecated-declarations>)
|
||||
set(
|
||||
_obs_clang_common_options
|
||||
-fno-strict-aliasing
|
||||
-Wno-trigraphs
|
||||
-Wno-missing-field-initializers
|
||||
-Wno-missing-prototypes
|
||||
-Werror=return-type
|
||||
-Wunreachable-code
|
||||
-Wquoted-include-in-framework-header
|
||||
-Wno-missing-braces
|
||||
-Wparentheses
|
||||
-Wswitch
|
||||
-Wno-unused-function
|
||||
-Wno-unused-label
|
||||
-Wunused-parameter
|
||||
-Wunused-variable
|
||||
-Wunused-value
|
||||
-Wempty-body
|
||||
-Wuninitialized
|
||||
-Wno-unknown-pragmas
|
||||
-Wfour-char-constants
|
||||
-Wconstant-conversion
|
||||
-Wno-conversion
|
||||
-Wint-conversion
|
||||
-Wbool-conversion
|
||||
-Wenum-conversion
|
||||
-Wnon-literal-null-conversion
|
||||
-Wsign-compare
|
||||
-Wshorten-64-to-32
|
||||
-Wpointer-sign
|
||||
-Wnewline-eof
|
||||
-Wno-implicit-fallthrough
|
||||
-Wdeprecated-declarations
|
||||
-Wno-sign-conversion
|
||||
-Winfinite-recursion
|
||||
-Wcomma
|
||||
-Wno-strict-prototypes
|
||||
-Wno-semicolon-before-method-body
|
||||
-Wformat-security
|
||||
-Wvla
|
||||
-Wno-error=shorten-64-to-32
|
||||
$<$<BOOL:${OBS_COMPILE_DEPRECATION_AS_WARNING}>:-Wno-error=deprecated-declarations>
|
||||
)
|
||||
|
||||
# clang options for C
|
||||
set(_obs_clang_c_options ${_obs_clang_common_options} -Wno-shadow -Wno-float-conversion)
|
||||
|
||||
# clang options for C++
|
||||
set(_obs_clang_cxx_options
|
||||
${_obs_clang_common_options}
|
||||
-Wno-non-virtual-dtor
|
||||
-Wno-overloaded-virtual
|
||||
-Wno-exit-time-destructors
|
||||
-Wno-shadow
|
||||
-Winvalid-offsetof
|
||||
-Wmove
|
||||
-Werror=block-capture-autoreleasing
|
||||
-Wrange-loop-analysis)
|
||||
set(
|
||||
_obs_clang_cxx_options
|
||||
${_obs_clang_common_options}
|
||||
-Wno-non-virtual-dtor
|
||||
-Wno-overloaded-virtual
|
||||
-Wno-exit-time-destructors
|
||||
-Wno-shadow
|
||||
-Winvalid-offsetof
|
||||
-Wmove
|
||||
-Werror=block-capture-autoreleasing
|
||||
-Wrange-loop-analysis
|
||||
)
|
||||
|
||||
if(CMAKE_CXX_STANDARD GREATER_EQUAL 20)
|
||||
list(APPEND _obs_clang_cxx_options -fno-char8_t)
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
# OBS CMake common helper functions module
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=E1121
|
||||
# cmake-format: on
|
||||
|
||||
include_guard(GLOBAL)
|
||||
|
||||
# message_configuration: Function to print configuration outcome
|
||||
@@ -22,14 +17,11 @@ function(message_configuration)
|
||||
" | (_) | |_) \\__ \\_____\\__ \\ |_| |_| | (_| | | (_) |\n"
|
||||
" \\___/|_.__/|___/ |___/\\__|\\__,_|\\__,_|_|\\___/ \n"
|
||||
"\nOBS: Application Version: ${OBS_VERSION} - Build Number: ${OBS_BUILD_NUMBER}\n"
|
||||
"==================================================================================\n\n")
|
||||
"==================================================================================\n\n"
|
||||
)
|
||||
|
||||
get_property(OBS_FEATURES_ENABLED GLOBAL PROPERTY OBS_FEATURES_ENABLED)
|
||||
list(
|
||||
SORT OBS_FEATURES_ENABLED
|
||||
COMPARE NATURAL
|
||||
CASE SENSITIVE
|
||||
ORDER ASCENDING)
|
||||
list(SORT OBS_FEATURES_ENABLED COMPARE NATURAL CASE SENSITIVE ORDER ASCENDING)
|
||||
|
||||
if(OBS_FEATURES_ENABLED)
|
||||
message(NOTICE "------------------------ Enabled Features ------------------------")
|
||||
@@ -39,11 +31,7 @@ function(message_configuration)
|
||||
endif()
|
||||
|
||||
get_property(OBS_FEATURES_DISABLED GLOBAL PROPERTY OBS_FEATURES_DISABLED)
|
||||
list(
|
||||
SORT OBS_FEATURES_DISABLED
|
||||
COMPARE NATURAL
|
||||
CASE SENSITIVE
|
||||
ORDER ASCENDING)
|
||||
list(SORT OBS_FEATURES_DISABLED COMPARE NATURAL CASE SENSITIVE ORDER ASCENDING)
|
||||
|
||||
if(OBS_FEATURES_DISABLED)
|
||||
message(NOTICE "------------------------ Disabled Features ------------------------")
|
||||
@@ -54,11 +42,7 @@ function(message_configuration)
|
||||
|
||||
if(ENABLE_PLUGINS)
|
||||
get_property(OBS_MODULES_ENABLED GLOBAL PROPERTY OBS_MODULES_ENABLED)
|
||||
list(
|
||||
SORT OBS_MODULES_ENABLED
|
||||
COMPARE NATURAL
|
||||
CASE SENSITIVE
|
||||
ORDER ASCENDING)
|
||||
list(SORT OBS_MODULES_ENABLED COMPARE NATURAL CASE SENSITIVE ORDER ASCENDING)
|
||||
|
||||
if(OBS_MODULES_ENABLED)
|
||||
message(NOTICE "------------------------ Enabled Modules ------------------------")
|
||||
@@ -68,11 +52,7 @@ function(message_configuration)
|
||||
endif()
|
||||
|
||||
get_property(OBS_MODULES_DISABLED GLOBAL PROPERTY OBS_MODULES_DISABLED)
|
||||
list(
|
||||
SORT OBS_MODULES_DISABLED
|
||||
COMPARE NATURAL
|
||||
CASE SENSITIVE
|
||||
ORDER ASCENDING)
|
||||
list(SORT OBS_MODULES_DISABLED COMPARE NATURAL CASE SENSITIVE ORDER ASCENDING)
|
||||
|
||||
if(OBS_MODULES_DISABLED)
|
||||
message(NOTICE "------------------------ Disabled Modules ------------------------")
|
||||
@@ -167,9 +147,7 @@ function(_handle_generator_expression_dependency library)
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.25)
|
||||
set(${var_FOUND_VAR}
|
||||
${var_FOUND_VAR}
|
||||
PARENT_SCOPE)
|
||||
set(${var_FOUND_VAR} ${var_FOUND_VAR} PARENT_SCOPE)
|
||||
else()
|
||||
return(PROPAGATE ${var_FOUND_VAR})
|
||||
endif()
|
||||
@@ -225,18 +203,14 @@ function(find_dependencies)
|
||||
endforeach()
|
||||
|
||||
if(NOT is_root)
|
||||
# cmake-format: off
|
||||
set(found_libraries ${found_libraries} PARENT_SCOPE)
|
||||
# cmake-format: on
|
||||
# Exit recursive branch
|
||||
return()
|
||||
endif()
|
||||
|
||||
list(REMOVE_DUPLICATES found_libraries)
|
||||
list(APPEND ${var_FOUND_VAR} ${found_libraries})
|
||||
# cmake-format: off
|
||||
set(${var_FOUND_VAR} ${${var_FOUND_VAR}} PARENT_SCOPE)
|
||||
# cmake-format: on
|
||||
endfunction()
|
||||
|
||||
# find_qt_plugins: Find and add Qt plugin libraries associated with Qt component to target
|
||||
@@ -252,9 +226,15 @@ function(find_qt_plugins)
|
||||
message(FATAL_ERROR "'find_qt_plugins' has to be called with a valid target from the Qt or Qt6 namespace.")
|
||||
endif()
|
||||
|
||||
# cmake-format: off
|
||||
list(APPEND qt_plugins_Core platforms printsupport styles imageformats iconengines)
|
||||
# cmake-format: on
|
||||
list(
|
||||
APPEND
|
||||
qt_plugins_Core
|
||||
platforms
|
||||
printsupport
|
||||
styles
|
||||
imageformats
|
||||
iconengines
|
||||
)
|
||||
list(APPEND qt_plugins_Gui platforminputcontexts)
|
||||
list(APPEND qt_plugins_Sql sqldrivers)
|
||||
list(APPEND qt_plugins_3dRender sceneparsers geometryloaders)
|
||||
@@ -285,7 +265,9 @@ function(find_qt_plugins)
|
||||
file(
|
||||
GLOB plugin_libraries
|
||||
RELATIVE "${plugins_location}/${plugin}"
|
||||
"${plugins_location}/${plugin}/*.dylib" "${plugins_location}/${plugin}/*.dll")
|
||||
"${plugins_location}/${plugin}/*.dylib"
|
||||
"${plugins_location}/${plugin}/*.dll"
|
||||
)
|
||||
message(DEBUG "Found Qt plugin ${plugin} libraries: ${plugin_libraries}")
|
||||
foreach(plugin_library IN ITEMS ${plugin_libraries})
|
||||
set(plugin_full_path "${plugins_location}/${plugin}/${plugin_library}")
|
||||
@@ -296,9 +278,7 @@ function(find_qt_plugins)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# cmake-format: off
|
||||
set(${var_FOUND_VAR} ${plugins_list} PARENT_SCOPE)
|
||||
# cmake-format: on
|
||||
endfunction()
|
||||
|
||||
# target_export: Helper function to export target as CMake package
|
||||
@@ -319,24 +299,13 @@ function(target_export target)
|
||||
install(
|
||||
TARGETS ${target}
|
||||
EXPORT ${target}Targets
|
||||
RUNTIME DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
|
||||
COMPONENT Development
|
||||
${exclude_variant}
|
||||
LIBRARY DESTINATION "${OBS_LIBRARY_DESTINATION}"
|
||||
COMPONENT Development
|
||||
${exclude_variant}
|
||||
ARCHIVE DESTINATION "${OBS_LIBRARY_DESTINATION}"
|
||||
COMPONENT Development
|
||||
${exclude_variant}
|
||||
FRAMEWORK DESTINATION Frameworks
|
||||
COMPONENT Development
|
||||
${exclude_variant}
|
||||
INCLUDES
|
||||
DESTINATION "${include_destination}"
|
||||
PUBLIC_HEADER
|
||||
DESTINATION "${include_destination}"
|
||||
COMPONENT Development
|
||||
${exclude_variant})
|
||||
RUNTIME DESTINATION "${OBS_EXECUTABLE_DESTINATION}" COMPONENT Development ${exclude_variant}
|
||||
LIBRARY DESTINATION "${OBS_LIBRARY_DESTINATION}" COMPONENT Development ${exclude_variant}
|
||||
ARCHIVE DESTINATION "${OBS_LIBRARY_DESTINATION}" COMPONENT Development ${exclude_variant}
|
||||
FRAMEWORK DESTINATION Frameworks COMPONENT Development ${exclude_variant}
|
||||
INCLUDES DESTINATION "${include_destination}"
|
||||
PUBLIC_HEADER DESTINATION "${include_destination}" COMPONENT Development ${exclude_variant}
|
||||
)
|
||||
|
||||
get_target_property(obs_public_headers ${target} OBS_PUBLIC_HEADERS)
|
||||
|
||||
@@ -358,15 +327,12 @@ function(target_export target)
|
||||
FILES ${headers_${header_dir}}
|
||||
DESTINATION "${include_destination}/${header_dir}"
|
||||
COMPONENT Development
|
||||
${exclude_variant})
|
||||
${exclude_variant}
|
||||
)
|
||||
endforeach()
|
||||
|
||||
if(headers)
|
||||
install(
|
||||
FILES ${headers}
|
||||
DESTINATION "${include_destination}"
|
||||
COMPONENT Development
|
||||
${exclude_variant})
|
||||
install(FILES ${headers} DESTINATION "${include_destination}" COMPONENT Development ${exclude_variant})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -375,7 +341,8 @@ function(target_export target)
|
||||
FILES "${CMAKE_BINARY_DIR}/config/obsconfig.h"
|
||||
DESTINATION "${include_destination}"
|
||||
COMPONENT Development
|
||||
${exclude_variant})
|
||||
${exclude_variant}
|
||||
)
|
||||
endif()
|
||||
|
||||
get_target_property(target_type ${target} TYPE)
|
||||
@@ -386,30 +353,29 @@ function(target_export target)
|
||||
generate_export_header(${target} EXPORT_FILE_NAME "${target}_EXPORT.h")
|
||||
target_sources(${target} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/${target}_EXPORT.h>)
|
||||
|
||||
set_property(
|
||||
TARGET ${target}
|
||||
APPEND
|
||||
PROPERTY PUBLIC_HEADER "${target}_EXPORT.h")
|
||||
set_property(TARGET ${target} APPEND PROPERTY PUBLIC_HEADER "${target}_EXPORT.h")
|
||||
endif()
|
||||
|
||||
set(TARGETS_EXPORT_NAME ${target}Targets)
|
||||
message(
|
||||
DEBUG
|
||||
"Generating CMake package configuration file ${target}Config.cmake with targets file ${TARGETS_EXPORT_NAME}...")
|
||||
"Generating CMake package configuration file ${target}Config.cmake with targets file ${TARGETS_EXPORT_NAME}..."
|
||||
)
|
||||
include(CMakePackageConfigHelpers)
|
||||
configure_package_config_file(cmake/${target}Config.cmake.in ${target}Config.cmake
|
||||
INSTALL_DESTINATION "${package_destination}")
|
||||
configure_package_config_file(
|
||||
cmake/${target}Config.cmake.in
|
||||
${target}Config.cmake
|
||||
INSTALL_DESTINATION "${package_destination}"
|
||||
)
|
||||
|
||||
message(DEBUG "Generating CMake package version configuration file ${target}ConfigVersion.cmake...")
|
||||
write_basic_package_version_file(
|
||||
"${target}ConfigVersion.cmake"
|
||||
VERSION ${OBS_VERSION_CANONICAL}
|
||||
COMPATIBILITY SameMajorVersion)
|
||||
COMPATIBILITY SameMajorVersion
|
||||
)
|
||||
|
||||
export(
|
||||
EXPORT ${target}Targets
|
||||
FILE "${TARGETS_EXPORT_NAME}.cmake"
|
||||
NAMESPACE OBS::)
|
||||
export(EXPORT ${target}Targets FILE "${TARGETS_EXPORT_NAME}.cmake" NAMESPACE OBS::)
|
||||
|
||||
export(PACKAGE ${target})
|
||||
|
||||
@@ -419,19 +385,23 @@ function(target_export target)
|
||||
NAMESPACE OBS::
|
||||
DESTINATION "${package_destination}"
|
||||
COMPONENT Development
|
||||
${exclude_variant})
|
||||
${exclude_variant}
|
||||
)
|
||||
|
||||
install(
|
||||
FILES "${CMAKE_CURRENT_BINARY_DIR}/${target}Config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/${target}ConfigVersion.cmake"
|
||||
DESTINATION "${package_destination}"
|
||||
COMPONENT Development
|
||||
${exclude_variant})
|
||||
${exclude_variant}
|
||||
)
|
||||
endfunction()
|
||||
|
||||
# check_uuid: Helper function to check for valid UUID
|
||||
function(check_uuid uuid_string return_value)
|
||||
set(valid_uuid TRUE)
|
||||
# gersemi: off
|
||||
set(uuid_token_lengths 8 4 4 4 12)
|
||||
# gersemi: on
|
||||
set(token_num 0)
|
||||
|
||||
string(REPLACE "-" ";" uuid_tokens ${uuid_string})
|
||||
@@ -458,9 +428,7 @@ function(check_uuid uuid_string return_value)
|
||||
set(valid_uuid FALSE)
|
||||
endif()
|
||||
message(DEBUG "UUID ${uuid_string} valid: ${valid_uuid}")
|
||||
# cmake-format: off
|
||||
set(${return_value} ${valid_uuid} PARENT_SCOPE)
|
||||
# cmake-format: on
|
||||
endfunction()
|
||||
|
||||
# legacy_check: Check if new CMake framework was not enabled and load legacy rules instead
|
||||
|
||||
@@ -13,7 +13,8 @@ if(NOT DEFINED OBS_VERSION_OVERRIDE AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git
|
||||
ERROR_VARIABLE _git_describe_err
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
RESULT_VARIABLE _obs_version_result
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
if(_git_describe_err)
|
||||
message(FATAL_ERROR "Could not fetch OBS version tag from git.\n" ${_git_describe_err})
|
||||
@@ -24,8 +25,13 @@ if(NOT DEFINED OBS_VERSION_OVERRIDE AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git
|
||||
endif()
|
||||
elseif(DEFINED OBS_VERSION_OVERRIDE)
|
||||
if(OBS_VERSION_OVERRIDE MATCHES "([0-9]+)\\.([0-9]+)\\.([0-9]+).*")
|
||||
string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+).*" "\\1;\\2;\\3" _obs_version_canonical
|
||||
${OBS_VERSION_OVERRIDE})
|
||||
string(
|
||||
REGEX REPLACE
|
||||
"([0-9]+)\\.([0-9]+)\\.([0-9]+).*"
|
||||
"\\1;\\2;\\3"
|
||||
_obs_version_canonical
|
||||
${OBS_VERSION_OVERRIDE}
|
||||
)
|
||||
set(_obs_version ${OBS_VERSION_OVERRIDE})
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid version supplied - must be <MAJOR>.<MINOR>.<PATCH>[-(rc|beta)<NUMBER>].")
|
||||
@@ -52,15 +58,17 @@ string(REPLACE ";" "." OBS_VERSION "${_obs_version}")
|
||||
if(OBS_RELEASE_CANDIDATE GREATER 0)
|
||||
message(
|
||||
AUTHOR_WARNING
|
||||
"******************************************************************************\n"
|
||||
" + OBS-Studio - Release candidate detected, OBS_VERSION is now: ${OBS_VERSION}\n"
|
||||
"******************************************************************************")
|
||||
"******************************************************************************\n"
|
||||
" + OBS-Studio - Release candidate detected, OBS_VERSION is now: ${OBS_VERSION}\n"
|
||||
"******************************************************************************"
|
||||
)
|
||||
elseif(OBS_BETA GREATER 0)
|
||||
message(
|
||||
AUTHOR_WARNING
|
||||
"******************************************************************************\n"
|
||||
" + OBS-Studio - Beta detected, OBS_VERSION is now: ${OBS_VERSION}\n"
|
||||
"******************************************************************************")
|
||||
"******************************************************************************\n"
|
||||
" + OBS-Studio - Beta detected, OBS_VERSION is now: ${OBS_VERSION}\n"
|
||||
"******************************************************************************"
|
||||
)
|
||||
endif()
|
||||
|
||||
unset(_obs_default_version)
|
||||
|
||||
+15
-17
@@ -31,22 +31,17 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_path(
|
||||
AMF_INCLUDE_DIR
|
||||
NAMES AMF/core/Factory.h
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "AMF include directory")
|
||||
find_path(AMF_INCLUDE_DIR NAMES AMF/core/Factory.h PATHS /usr/include /usr/local/include DOC "AMF include directory")
|
||||
|
||||
if(EXISTS "${AMF_INCLUDE_DIR}/AMF/core/Version.h")
|
||||
file(STRINGS "${AMF_INCLUDE_DIR}/AMF/core/Version.h" _version_string
|
||||
REGEX "^.*VERSION_(MAJOR|MINOR|RELEASE|BUILD_NUM)[ \t]+[0-9]+[ \t]*$")
|
||||
file(
|
||||
STRINGS
|
||||
"${AMF_INCLUDE_DIR}/AMF/core/Version.h"
|
||||
_version_string
|
||||
REGEX "^.*VERSION_(MAJOR|MINOR|RELEASE|BUILD_NUM)[ \t]+[0-9]+[ \t]*$"
|
||||
)
|
||||
|
||||
string(REGEX REPLACE ".*VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" _version_major "${_version_string}")
|
||||
string(REGEX REPLACE ".*VERSION_MINOR[ \t]+([0-9]+).*" "\\1" _version_minor "${_version_string}")
|
||||
@@ -72,7 +67,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
AMF
|
||||
REQUIRED_VARS AMF_INCLUDE_DIR
|
||||
VERSION_VAR AMF_VERSION REASON_FAILURE_MESSAGE "${AMF_ERROR_REASON}")
|
||||
VERSION_VAR AMF_VERSION
|
||||
REASON_FAILURE_MESSAGE "${AMF_ERROR_REASON}"
|
||||
)
|
||||
mark_as_advanced(AMF_INCLUDE_DIR)
|
||||
unset(AMF_ERROR_REASON)
|
||||
|
||||
@@ -85,8 +82,9 @@ endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
AMF PROPERTIES
|
||||
URL "https://github.com/GPUOpen-LibrariesAndSDKs/AMF"
|
||||
DESCRIPTION
|
||||
"AMF is a light-weight, portable multimedia framework that abstracts away most of the platform and API-specific details and allows for easy implementation of multimedia applications using a variety of technologies, such as DirectX 11, OpenGL, and OpenCL and facilitates an efficient interop between them."
|
||||
AMF
|
||||
PROPERTIES
|
||||
URL "https://github.com/GPUOpen-LibrariesAndSDKs/AMF"
|
||||
DESCRIPTION
|
||||
"AMF is a light-weight, portable multimedia framework that abstracts away most of the platform and API-specific details and allows for easy implementation of multimedia applications using a variety of technologies, such as DirectX 11, OpenGL, and OpenCL and facilitates an efficient interop between them."
|
||||
)
|
||||
|
||||
@@ -31,11 +31,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -48,16 +43,26 @@ find_path(
|
||||
NAMES asio.hpp
|
||||
HINTS ${PC_Asio_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "Asio include directory")
|
||||
DOC "Asio include directory"
|
||||
)
|
||||
|
||||
if(PC_Asio_VERSION VERSION_GREATER 0)
|
||||
set(Asio_VERSION ${PC_Asio_VERSION})
|
||||
elseif(EXISTS "${Asio_INCLUDE_DIR}/asio/version.hpp")
|
||||
file(STRINGS "${Asio_INCLUDE_DIR}/asio/version.hpp" _version_string
|
||||
REGEX "#define[ \t]+ASIO_VERSION[ \t]+[0-9]+[ \t]+\\/\\/[ \t][0-9]+\\.[0-9]+\\.[0-9]+")
|
||||
file(
|
||||
STRINGS
|
||||
"${Asio_INCLUDE_DIR}/asio/version.hpp"
|
||||
_version_string
|
||||
REGEX "#define[ \t]+ASIO_VERSION[ \t]+[0-9]+[ \t]+\\/\\/[ \t][0-9]+\\.[0-9]+\\.[0-9]+"
|
||||
)
|
||||
|
||||
string(REGEX REPLACE "#define[ \t]+ASIO_VERSION[ \t]+[0-9]+[ \t]+\\/\\/[ \t]([0-9]+\\.[0-9]+\\.[0-9]+)" "\\1"
|
||||
Asio_VERSION "${_version_string}")
|
||||
string(
|
||||
REGEX REPLACE
|
||||
"#define[ \t]+ASIO_VERSION[ \t]+[0-9]+[ \t]+\\/\\/[ \t]([0-9]+\\.[0-9]+\\.[0-9]+)"
|
||||
"\\1"
|
||||
Asio_VERSION
|
||||
"${_version_string}"
|
||||
)
|
||||
else()
|
||||
if(NOT Asio_FIND_QUIETLY)
|
||||
message(AUTHOR_WARNING "Failed to find Asio version.")
|
||||
@@ -74,7 +79,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
Asio
|
||||
REQUIRED_VARS Asio_INCLUDE_DIR
|
||||
VERSION_VAR Asio_VERSION REASON_FAILURE_MESSAGE "${Asio_ERROR_REASON}")
|
||||
VERSION_VAR Asio_VERSION
|
||||
REASON_FAILURE_MESSAGE "${Asio_ERROR_REASON}"
|
||||
)
|
||||
mark_as_advanced(Asio_INCLUDE_DIR)
|
||||
unset(Asio_ERROR_REASON)
|
||||
|
||||
@@ -87,8 +94,9 @@ endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
Asio PROPERTIES
|
||||
URL "http://think-async.com/Asio"
|
||||
DESCRIPTION
|
||||
"Asio is a cross-platform C++ library for network and low-level I/O programming that provides developers with a consistent asynchronous model using a modern C++ approach."
|
||||
Asio
|
||||
PROPERTIES
|
||||
URL "http://think-async.com/Asio"
|
||||
DESCRIPTION
|
||||
"Asio is a cross-platform C++ library for network and low-level I/O programming that provides developers with a consistent asynchronous model using a modern C++ approach."
|
||||
)
|
||||
|
||||
+60
-53
@@ -48,34 +48,34 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-lint: disable=C0307
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
set(CEF_ROOT_DIR
|
||||
""
|
||||
CACHE PATH "Alternative path to Chromium Embedded Framework")
|
||||
set(CEF_ROOT_DIR "" CACHE PATH "Alternative path to Chromium Embedded Framework")
|
||||
|
||||
if(NOT DEFINED CEF_ROOT_DIR OR CEF_ROOT_DIR STREQUAL "")
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"CEF_ROOT_DIR is not set - if ENABLE_BROWSER is enabled, "
|
||||
"a CEF distribution with compiled wrapper library is required.\n"
|
||||
"Please download a CEF distribution for your appropriate architecture "
|
||||
"and specify CEF_ROOT_DIR to its location")
|
||||
"CEF_ROOT_DIR is not set - if ENABLE_BROWSER is enabled, "
|
||||
"a CEF distribution with compiled wrapper library is required.\n"
|
||||
"Please download a CEF distribution for your appropriate architecture "
|
||||
"and specify CEF_ROOT_DIR to its location"
|
||||
)
|
||||
endif()
|
||||
|
||||
find_path(
|
||||
CEF_INCLUDE_DIR "cef_version.h"
|
||||
CEF_INCLUDE_DIR
|
||||
"cef_version.h"
|
||||
HINTS "${CEF_ROOT_DIR}/include"
|
||||
DOC "Chromium Embedded Framework include directory.")
|
||||
DOC "Chromium Embedded Framework include directory."
|
||||
)
|
||||
|
||||
if(CEF_INCLUDE_DIR)
|
||||
file(STRINGS "${CEF_INCLUDE_DIR}/cef_version.h" _VERSION_STRING
|
||||
REGEX "^.*CEF_VERSION_(MAJOR|MINOR|PATCH)[ \t]+[0-9]+[ \t]*$")
|
||||
file(
|
||||
STRINGS
|
||||
"${CEF_INCLUDE_DIR}/cef_version.h"
|
||||
_VERSION_STRING
|
||||
REGEX "^.*CEF_VERSION_(MAJOR|MINOR|PATCH)[ \t]+[0-9]+[ \t]*$"
|
||||
)
|
||||
string(REGEX REPLACE ".*CEF_VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" VERSION_MAJOR "${_VERSION_STRING}")
|
||||
string(REGEX REPLACE ".*CEF_VERSION_MINOR[ \t]+([0-9]+).*" "\\1" VERSION_MINOR "${_VERSION_STRING}")
|
||||
string(REGEX REPLACE ".*CEF_VERSION_PATCH[ \t]+([0-9]+).*" "\\1" VERSION_PATCH "${_VERSION_STRING}")
|
||||
@@ -93,14 +93,16 @@ if(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
|
||||
NAMES cef.lib libcef.lib
|
||||
NO_DEFAULT_PATH
|
||||
PATHS "${CEF_ROOT_DIR}" "${CEF_ROOT_DIR}/Release"
|
||||
DOC "Chromium Embedded Framework import library location")
|
||||
DOC "Chromium Embedded Framework import library location"
|
||||
)
|
||||
|
||||
find_program(
|
||||
CEF_LIBRARY_RELEASE
|
||||
NAMES cef.dll libcef.dll
|
||||
NO_DEFAULT_PATH
|
||||
PATHS "${CEF_ROOT_DIR}" "${CEF_ROOT_DIR}/Release"
|
||||
DOC "Chromium Embedded Framework library location")
|
||||
DOC "Chromium Embedded Framework library location"
|
||||
)
|
||||
|
||||
if(NOT CEF_LIBRARY_RELEASE)
|
||||
set(CEF_LIBRARY_RELEASE "${CEF_IMPLIB_RELEASE}")
|
||||
@@ -110,53 +112,68 @@ if(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
|
||||
CEF_LIBRARY_WRAPPER_RELEASE
|
||||
NAMES cef_dll_wrapper libcef_dll_wrapper
|
||||
NO_DEFAULT_PATH
|
||||
PATHS "${CEF_ROOT_DIR}/build/libcef_dll/Release" "${CEF_ROOT_DIR}/build/libcef_dll_wrapper/Release"
|
||||
"${CEF_ROOT_DIR}/build/libcef_dll" "${CEF_ROOT_DIR}/build/libcef_dll_wrapper"
|
||||
DOC "Chromium Embedded Framework static library wrapper.")
|
||||
PATHS
|
||||
"${CEF_ROOT_DIR}/build/libcef_dll/Release"
|
||||
"${CEF_ROOT_DIR}/build/libcef_dll_wrapper/Release"
|
||||
"${CEF_ROOT_DIR}/build/libcef_dll"
|
||||
"${CEF_ROOT_DIR}/build/libcef_dll_wrapper"
|
||||
DOC "Chromium Embedded Framework static library wrapper."
|
||||
)
|
||||
|
||||
find_library(
|
||||
CEF_LIBRARY_WRAPPER_DEBUG
|
||||
NAMES cef_dll_wrapper libcef_dll_wrapper
|
||||
NO_DEFAULT_PATH
|
||||
PATHS "${CEF_ROOT_DIR}/build/libcef_dll/Debug" "${CEF_ROOT_DIR}/build/libcef_dll_wrapper/Debug"
|
||||
DOC "Chromium Embedded Framework static library wrapper (debug).")
|
||||
DOC "Chromium Embedded Framework static library wrapper (debug)."
|
||||
)
|
||||
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL Darwin)
|
||||
find_library(
|
||||
CEF_LIBRARY_RELEASE
|
||||
NAMES "Chromium Embedded Framework"
|
||||
NO_DEFAULT_PATH
|
||||
PATHS "${CEF_ROOT_DIR}" "${CEF_ROOT_DIR}/Release"
|
||||
DOC "Chromium Embedded Framework")
|
||||
DOC "Chromium Embedded Framework"
|
||||
)
|
||||
|
||||
find_library(
|
||||
CEF_LIBRARY_WRAPPER_RELEASE
|
||||
NAMES cef_dll_wrapper libcef_dll_wrapper
|
||||
NO_DEFAULT_PATH
|
||||
PATHS "${CEF_ROOT_DIR}/build/libcef_dll/Release" "${CEF_ROOT_DIR}/build/libcef_dll_wrapper/Release"
|
||||
"${CEF_ROOT_DIR}/build/libcef_dll" "${CEF_ROOT_DIR}/build/libcef_dll_wrapper"
|
||||
DOC "Chromium Embedded Framework static library wrapper.")
|
||||
PATHS
|
||||
"${CEF_ROOT_DIR}/build/libcef_dll/Release"
|
||||
"${CEF_ROOT_DIR}/build/libcef_dll_wrapper/Release"
|
||||
"${CEF_ROOT_DIR}/build/libcef_dll"
|
||||
"${CEF_ROOT_DIR}/build/libcef_dll_wrapper"
|
||||
DOC "Chromium Embedded Framework static library wrapper."
|
||||
)
|
||||
|
||||
find_library(
|
||||
CEF_LIBRARY_WRAPPER_DEBUG
|
||||
NAMES cef_dll_wrapper libcef_dll_wrapper
|
||||
NO_DEFAULT_PATH
|
||||
PATHS "${CEF_ROOT_DIR}/build/libcef_dll/Debug" "${CEF_ROOT_DIR}/build/libcef_dll_wrapper/Debug"
|
||||
DOC "Chromium Embedded Framework static library wrapper (debug).")
|
||||
DOC "Chromium Embedded Framework static library wrapper (debug)."
|
||||
)
|
||||
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL Linux)
|
||||
find_library(
|
||||
CEF_LIBRARY_RELEASE
|
||||
NAMES libcef.so
|
||||
NO_DEFAULT_PATH
|
||||
PATHS "${CEF_ROOT_DIR}" "${CEF_ROOT_DIR}/Release"
|
||||
DOC "Chromium Embedded Framework")
|
||||
DOC "Chromium Embedded Framework"
|
||||
)
|
||||
|
||||
find_library(
|
||||
CEF_LIBRARY_WRAPPER_RELEASE
|
||||
NAMES cef_dll_wrapper.a libcef_dll_wrapper.a
|
||||
NO_DEFAULT_PATH
|
||||
PATHS "${CEF_ROOT_DIR}/libcef_dll_wrapper" "${CEF_ROOT_DIR}/build/libcef_dll"
|
||||
"${CEF_ROOT_DIR}/build/libcef_dll_wrapper"
|
||||
DOC "Chromium Embedded Framework static library wrapper.")
|
||||
PATHS
|
||||
"${CEF_ROOT_DIR}/libcef_dll_wrapper"
|
||||
"${CEF_ROOT_DIR}/build/libcef_dll"
|
||||
"${CEF_ROOT_DIR}/build/libcef_dll_wrapper"
|
||||
DOC "Chromium Embedded Framework static library wrapper."
|
||||
)
|
||||
endif()
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
@@ -165,8 +182,9 @@ select_library_configurations(CEF)
|
||||
find_package_handle_standard_args(
|
||||
CEF
|
||||
REQUIRED_VARS CEF_LIBRARY_RELEASE CEF_LIBRARY_WRAPPER_RELEASE CEF_INCLUDE_DIR
|
||||
VERSION_VAR CEF_VERSION REASON_FAILURE_MESSAGE
|
||||
"Ensure that location of pre-compiled Chromium Embedded Framework is set as CEF_ROOT_DIR.")
|
||||
VERSION_VAR CEF_VERSION
|
||||
REASON_FAILURE_MESSAGE "Ensure that location of pre-compiled Chromium Embedded Framework is set as CEF_ROOT_DIR."
|
||||
)
|
||||
mark_as_advanced(CEF_LIBRARY CEF_LIBRARY_WRAPPER_RELEASE CEF_LIBRARY_WRAPPER_DEBUG CEF_INCLUDE_DIR)
|
||||
|
||||
if(NOT TARGET CEF::Wrapper)
|
||||
@@ -177,10 +195,7 @@ if(NOT TARGET CEF::Wrapper)
|
||||
add_library(CEF::Wrapper INTERFACE IMPORTED)
|
||||
set_property(TARGET CEF::Wrapper PROPERTY IMPORTED_LIBNAME_RELEASE "${CEF_LIBRARY_WRAPPER_RELEASE}")
|
||||
endif()
|
||||
set_property(
|
||||
TARGET CEF::Wrapper
|
||||
APPEND
|
||||
PROPERTY IMPORTED_CONFIGURATIONS "Release")
|
||||
set_property(TARGET CEF::Wrapper APPEND PROPERTY IMPORTED_CONFIGURATIONS "Release")
|
||||
|
||||
if(CEF_LIBRARY_WRAPPER_DEBUG)
|
||||
if(IS_ABSOLUTE "${CEF_LIBRARY_WRAPPER_DEBUG}")
|
||||
@@ -188,16 +203,10 @@ if(NOT TARGET CEF::Wrapper)
|
||||
else()
|
||||
set_property(TARGET CEF::Wrapper PROPERTY IMPORTED_LIBNAME_DEBUG "${CEF_LIBRARY_WRAPPER_DEBUG}")
|
||||
endif()
|
||||
set_property(
|
||||
TARGET CEF::Wrapper
|
||||
APPEND
|
||||
PROPERTY IMPORTED_CONFIGURATIONS "Debug")
|
||||
set_property(TARGET CEF::Wrapper APPEND PROPERTY IMPORTED_CONFIGURATIONS "Debug")
|
||||
endif()
|
||||
|
||||
set_property(
|
||||
TARGET CEF::Wrapper
|
||||
APPEND
|
||||
PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${CEF_INCLUDE_DIR}" "${CEF_ROOT_DIR}")
|
||||
set_property(TARGET CEF::Wrapper APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${CEF_INCLUDE_DIR}" "${CEF_ROOT_DIR}")
|
||||
endif()
|
||||
|
||||
if(NOT TARGET CEF::Library)
|
||||
@@ -218,17 +227,15 @@ if(NOT TARGET CEF::Library)
|
||||
set_property(TARGET CEF::Library PROPERTY IMPORTED_LIBNAME_RELEASE "${CEF_LIBRARY_RELEASE}")
|
||||
endif()
|
||||
|
||||
set_property(
|
||||
TARGET CEF::Library
|
||||
APPEND
|
||||
PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${CEF_INCLUDE_DIR}" "${CEF_ROOT_DIR}")
|
||||
set_property(TARGET CEF::Library APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${CEF_INCLUDE_DIR}" "${CEF_ROOT_DIR}")
|
||||
set_property(TARGET CEF::Library PROPERTY IMPORTED_CONFIGURATIONS "Release")
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
CEF PROPERTIES
|
||||
URL "https://bitbucket.org/chromiumembedded/cef/"
|
||||
DESCRIPTION
|
||||
"Chromium Embedded Framework (CEF). A simple framework for embedding Chromium-based browsers in other applications."
|
||||
CEF
|
||||
PROPERTIES
|
||||
URL "https://bitbucket.org/chromiumembedded/cef/"
|
||||
DESCRIPTION
|
||||
"Chromium Embedded Framework (CEF). A simple framework for embedding Chromium-based browsers in other applications."
|
||||
)
|
||||
|
||||
@@ -36,10 +36,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# bmake-lint: disable=C0103
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -47,26 +43,14 @@ if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PC_Detours QUIET detours)
|
||||
endif()
|
||||
|
||||
find_path(
|
||||
Detours_INCLUDE_DIR
|
||||
NAMES detours.h
|
||||
HINTS ${PC_Detours_INCLUDE_DIRS}
|
||||
DOC "Detours include directory")
|
||||
find_path(Detours_INCLUDE_DIR NAMES detours.h HINTS ${PC_Detours_INCLUDE_DIRS} DOC "Detours include directory")
|
||||
|
||||
find_library(
|
||||
Detours_IMPLIB
|
||||
NAMES detours
|
||||
HINTS ${PC_Detours_LIBRARY_DIRS}
|
||||
DOC "Detours location")
|
||||
find_library(Detours_IMPLIB NAMES detours HINTS ${PC_Detours_LIBRARY_DIRS} DOC "Detours location")
|
||||
|
||||
cmake_path(GET Detours_IMPLIB PARENT_PATH _implib_path)
|
||||
cmake_path(SET _bin_path NORMALIZE "${_implib_path}/../bin")
|
||||
|
||||
find_program(
|
||||
Detours_LIBRARY
|
||||
NAMES detours.dll
|
||||
HINTS ${_implib_path} ${_bin_path}
|
||||
DOC "Detours DLL location")
|
||||
find_program(Detours_LIBRARY NAMES detours.dll HINTS ${_implib_path} ${_bin_path} DOC "Detours DLL location")
|
||||
|
||||
if(NOT Detours_LIBRARY)
|
||||
set(Detours_LIBRARY "${Detours_IMPLIB}")
|
||||
@@ -86,7 +70,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
Detours
|
||||
REQUIRED_VARS Detours_LIBRARY Detours_INCLUDE_DIR
|
||||
VERSION_VAR Detours_VERSION REASON_FAILURE_MESSAGE "Ensure that obs-deps is provided as part of CMAKE_PREFIX_PATH.")
|
||||
VERSION_VAR Detours_VERSION
|
||||
REASON_FAILURE_MESSAGE "Ensure that obs-deps is provided as part of CMAKE_PREFIX_PATH."
|
||||
)
|
||||
mark_as_advanced(Detours_INCLUDE_DIR Detours_LIBRARY)
|
||||
|
||||
if(Detours_FOUND)
|
||||
@@ -111,14 +97,18 @@ if(Detours_FOUND)
|
||||
|
||||
set_target_properties(
|
||||
Detours::Detours
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_Detours_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Detours_INCLUDE_DIR}"
|
||||
VERSION ${Detours_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_Detours_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Detours_INCLUDE_DIR}"
|
||||
VERSION ${Detours_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
Detours PROPERTIES
|
||||
URL "https://github.com/microsoft/detours"
|
||||
DESCRIPTION "Detours is a software package for monitoring and instrumenting API calls on Windows.")
|
||||
Detours
|
||||
PROPERTIES
|
||||
URL "https://github.com/microsoft/detours"
|
||||
DESCRIPTION "Detours is a software package for monitoring and instrumenting API calls on Windows."
|
||||
)
|
||||
|
||||
@@ -100,16 +100,18 @@ The following cache variables may also be set:
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
set(_DEFAULT_COMPONENTS
|
||||
avcodec
|
||||
avdevice
|
||||
avformat
|
||||
avfilter
|
||||
avresample
|
||||
avutil
|
||||
postproc
|
||||
swscale
|
||||
swresample)
|
||||
set(
|
||||
_DEFAULT_COMPONENTS
|
||||
avcodec
|
||||
avdevice
|
||||
avformat
|
||||
avfilter
|
||||
avresample
|
||||
avutil
|
||||
postproc
|
||||
swscale
|
||||
swresample
|
||||
)
|
||||
|
||||
set(component_avcodec libavcodec avcodec avcodec.h)
|
||||
set(component_avdevice libavdevice avdevice avdevice.h)
|
||||
@@ -143,7 +145,8 @@ macro(FFmpeg_find_component component)
|
||||
NAMES ${component_libname}/${component_header} ${component_libname}/version.h
|
||||
HINTS ${PC_FFmpeg_${component}_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "FFmpeg component ${component_name} include directory")
|
||||
DOC "FFmpeg component ${component_name} include directory"
|
||||
)
|
||||
|
||||
ffmpeg_check_version()
|
||||
|
||||
@@ -151,7 +154,8 @@ macro(FFmpeg_find_component component)
|
||||
find_library(
|
||||
FFmpeg_${component}_IMPLIB
|
||||
NAMES ${component_libname} ${component_name}
|
||||
DOC "FFmpeg component ${component_name} import library location")
|
||||
DOC "FFmpeg component ${component_name} import library location"
|
||||
)
|
||||
|
||||
ffmpeg_find_dll()
|
||||
else()
|
||||
@@ -160,7 +164,8 @@ macro(FFmpeg_find_component component)
|
||||
NAMES ${component_libname} ${component_name}
|
||||
HINTS ${PC_FFmpeg_${component}_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "FFmpeg component ${component_name} location")
|
||||
DOC "FFmpeg component ${component_name} location"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(FFmpeg_${component}_LIBRARY AND FFmpeg_${component}_INCLUDE_DIR)
|
||||
@@ -183,7 +188,8 @@ macro(FFmpeg_find_dll)
|
||||
FFmpeg_${component}_LIBRARY
|
||||
NAMES ${component_name}-${_dll_version}.dll
|
||||
HINTS ${_implib_path} ${_bin_path}
|
||||
DOC "FFmpeg component ${component_name} DLL location")
|
||||
DOC "FFmpeg component ${component_name} DLL location"
|
||||
)
|
||||
|
||||
if(NOT FFmpeg_${component}_LIBRARY)
|
||||
set(FFmpeg_${component}_LIBRARY "${FFmpeg_${component}_IMPLIB}")
|
||||
@@ -200,17 +206,29 @@ macro(FFmpeg_check_version)
|
||||
set(FFmpeg_${component}_VERSION ${PC_FFmpeg_${component}_VERSION})
|
||||
elseif(EXISTS "${FFmpeg_${component}_INCLUDE_DIR}/${component_libname}/version.h")
|
||||
if(EXISTS "${FFmpeg_${component}_INCLUDE_DIR}/${component_libname}/version_major.h")
|
||||
file(STRINGS "${FFmpeg_${component}_INCLUDE_DIR}/${component_libname}/version_major.h" _version_string
|
||||
REGEX "^.*VERSION_MAJOR[ \t]+[0-9]+[ \t]*$")
|
||||
file(
|
||||
STRINGS
|
||||
"${FFmpeg_${component}_INCLUDE_DIR}/${component_libname}/version_major.h"
|
||||
_version_string
|
||||
REGEX "^.*VERSION_MAJOR[ \t]+[0-9]+[ \t]*$"
|
||||
)
|
||||
string(REGEX REPLACE ".*VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" _version_major "${_version_string}")
|
||||
|
||||
file(STRINGS "${FFmpeg_${component}_INCLUDE_DIR}/${component_libname}/version.h" _version_string
|
||||
REGEX "^.*VERSION_(MINOR|MICRO)[ \t]+[0-9]+[ \t]*$")
|
||||
file(
|
||||
STRINGS
|
||||
"${FFmpeg_${component}_INCLUDE_DIR}/${component_libname}/version.h"
|
||||
_version_string
|
||||
REGEX "^.*VERSION_(MINOR|MICRO)[ \t]+[0-9]+[ \t]*$"
|
||||
)
|
||||
string(REGEX REPLACE ".*VERSION_MINOR[ \t]+([0-9]+).*" "\\1" _version_minor "${_version_string}")
|
||||
string(REGEX REPLACE ".*VERSION_MICRO[ \t]+([0-9]+).*" "\\1" _version_patch "${_version_string}")
|
||||
else()
|
||||
file(STRINGS "${FFmpeg_${component}_INCLUDE_DIR}/${component_libname}/version.h" _version_string
|
||||
REGEX "^.*VERSION_(MAJOR|MINOR|MICRO)[ \t]+[0-9]+[ \t]*$")
|
||||
file(
|
||||
STRINGS
|
||||
"${FFmpeg_${component}_INCLUDE_DIR}/${component_libname}/version.h"
|
||||
_version_string
|
||||
REGEX "^.*VERSION_(MAJOR|MINOR|MICRO)[ \t]+[0-9]+[ \t]*$"
|
||||
)
|
||||
string(REGEX REPLACE ".*VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" _version_major "${_version_string}")
|
||||
string(REGEX REPLACE ".*VERSION_MINOR[ \t]+([0-9]+).*" "\\1" _version_minor "${_version_string}")
|
||||
string(REGEX REPLACE ".*VERSION_MICRO[ \t]+([0-9]+).*" "\\1" _version_patch "${_version_string}")
|
||||
@@ -234,7 +252,8 @@ macro(FFmpeg_set_soname)
|
||||
execute_process(
|
||||
COMMAND sh -c "otool -D '${FFmpeg_${component}_LIBRARY}' | grep -v '${FFmpeg_${component}_LIBRARY}'"
|
||||
OUTPUT_VARIABLE _output
|
||||
RESULT_VARIABLE _result)
|
||||
RESULT_VARIABLE _result
|
||||
)
|
||||
|
||||
if(_result EQUAL 0 AND _output MATCHES "^@rpath/")
|
||||
set_property(TARGET FFmpeg::${component} PROPERTY IMPORTED_SONAME "${_output}")
|
||||
@@ -243,7 +262,8 @@ macro(FFmpeg_set_soname)
|
||||
execute_process(
|
||||
COMMAND sh -c "objdump -p '${FFmpeg_${component}_LIBRARY}' | grep SONAME"
|
||||
OUTPUT_VARIABLE _output
|
||||
RESULT_VARIABLE _result)
|
||||
RESULT_VARIABLE _result
|
||||
)
|
||||
|
||||
if(_result EQUAL 0)
|
||||
string(REGEX REPLACE "[ \t]+SONAME[ \t]+([^ \t]+)" "\\1" _soname "${_output}")
|
||||
@@ -276,8 +296,12 @@ if(NOT FFmpeg_avutil_FOUND)
|
||||
endif()
|
||||
|
||||
if(EXISTS "${FFmpeg_avutil_INCLUDE_DIR}/libavutil/ffversion.h")
|
||||
file(STRINGS "${FFmpeg_avutil_INCLUDE_DIR}/libavutil/ffversion.h" _version_string
|
||||
REGEX "^.*FFMPEG_VERSION[ \t]+\"n?[0-9a-z\\~.-]+\"[ \t]*$")
|
||||
file(
|
||||
STRINGS
|
||||
"${FFmpeg_avutil_INCLUDE_DIR}/libavutil/ffversion.h"
|
||||
_version_string
|
||||
REGEX "^.*FFMPEG_VERSION[ \t]+\"n?[0-9a-z\\~.-]+\"[ \t]*$"
|
||||
)
|
||||
string(REGEX REPLACE ".*FFMPEG_VERSION[ \t]+\"n?([0-9]+\\.[0-9]).*\".*" "\\1" FFmpeg_VERSION "${_version_string}")
|
||||
endif()
|
||||
|
||||
@@ -295,7 +319,9 @@ find_package_handle_standard_args(
|
||||
FFmpeg
|
||||
REQUIRED_VARS FFmpeg_LIBRARIES FFmpeg_INCLUDE_DIRS
|
||||
VERSION_VAR FFmpeg_VERSION
|
||||
HANDLE_COMPONENTS REASON_FAILURE_MESSAGE "${FFmpeg_ERROR_REASON}")
|
||||
HANDLE_COMPONENTS
|
||||
REASON_FAILURE_MESSAGE "${FFmpeg_ERROR_REASON}"
|
||||
)
|
||||
|
||||
if(FFmpeg_FOUND AND NOT TARGET FFmpeg::FFmpeg)
|
||||
add_library(FFmpeg::FFmpeg INTERFACE IMPORTED)
|
||||
@@ -317,29 +343,29 @@ foreach(component IN LISTS FFmpeg_FIND_COMPONENTS)
|
||||
endif()
|
||||
|
||||
set_property(TARGET FFmpeg::${component} PROPERTY IMPORTED_LOCATION "${FFmpeg_${component}_LIBRARY}")
|
||||
|
||||
else()
|
||||
add_library(FFmpeg::${component} INTERFACE IMPORTED)
|
||||
set_property(TARGET FFmpeg::${component} PROPERTY IMPORTED_LIBNAME "${FFmpeg_${component}_LIBRARY}")
|
||||
endif()
|
||||
set_target_properties(
|
||||
FFmpeg::${component}
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_FFmpeg_${component}_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${FFmpeg_${component}_INCLUDE_DIR}"
|
||||
VERSION ${FFmpeg_${component}_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_FFmpeg_${component}_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${FFmpeg_${component}_INCLUDE_DIR}"
|
||||
VERSION ${FFmpeg_${component}_VERSION}
|
||||
)
|
||||
|
||||
get_target_property(_ffmpeg_interface_libraries FFmpeg::FFmpeg INTERFACE_LINK_LIBRARIES)
|
||||
if(NOT FFmpeg::${component} IN_LIST _ffmpeg_interface_libraries)
|
||||
set_property(
|
||||
TARGET FFmpeg::FFmpeg
|
||||
APPEND
|
||||
PROPERTY INTERFACE_LINK_LIBRARIES FFmpeg::${component})
|
||||
set_property(TARGET FFmpeg::FFmpeg APPEND PROPERTY INTERFACE_LINK_LIBRARIES FFmpeg::${component})
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
FFmpeg PROPERTIES
|
||||
URL "https://www.ffmpeg.org"
|
||||
DESCRIPTION "A complete, cross-platform solution to record, convert and stream audio and video.")
|
||||
FFmpeg
|
||||
PROPERTIES
|
||||
URL "https://www.ffmpeg.org"
|
||||
DESCRIPTION "A complete, cross-platform solution to record, convert and stream audio and video."
|
||||
)
|
||||
|
||||
@@ -31,11 +31,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -48,13 +43,18 @@ find_path(
|
||||
NAMES ffnvcodec/nvEncodeAPI.h
|
||||
HINTS ${PC_FFnvcodec_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "FFnvcodec include directory")
|
||||
DOC "FFnvcodec include directory"
|
||||
)
|
||||
|
||||
if(PC_FFnvcodec_VERSION VERSION_GREATER 0)
|
||||
set(FFnvcodec_VERSION ${PC_FFnvcodec_VERSION})
|
||||
elseif(EXISTS "${FFnvcodec_INCLUDE_DIR}/ffnvcodec/nvEncodeAPI.h")
|
||||
file(STRINGS "${FFnvcodec_INCLUDE_DIR}/ffnvcodec/nvEncodeAPI.h" _version_string
|
||||
REGEX "^.*NVENCAPI_(MAJOR|MINOR)_VERSION[ \t]+[0-9]+[ \t]*$")
|
||||
file(
|
||||
STRINGS
|
||||
"${FFnvcodec_INCLUDE_DIR}/ffnvcodec/nvEncodeAPI.h"
|
||||
_version_string
|
||||
REGEX "^.*NVENCAPI_(MAJOR|MINOR)_VERSION[ \t]+[0-9]+[ \t]*$"
|
||||
)
|
||||
|
||||
string(REGEX REPLACE ".*MAJOR_VERSION[ \t]+([0-9]+).*" "\\1" _version_major "${_version_string}")
|
||||
string(REGEX REPLACE ".*MINOR_VERSION[ \t]+([0-9]+).*" "\\1" _version_minor "${_version_string}")
|
||||
@@ -78,7 +78,10 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
FFnvcodec
|
||||
REQUIRED_VARS FFnvcodec_INCLUDE_DIR
|
||||
VERSION_VAR FFnvcodec_VERSION HANDLE_VERSION_RANGE REASON_FAILURE_MESSAGE "${FFnvcodec_ERROR_REASON}")
|
||||
VERSION_VAR FFnvcodec_VERSION
|
||||
HANDLE_VERSION_RANGE
|
||||
REASON_FAILURE_MESSAGE "${FFnvcodec_ERROR_REASON}"
|
||||
)
|
||||
mark_as_advanced(FFnvcodec_INCLUDE_DIR)
|
||||
unset(FFnvcodec_ERROR_REASON)
|
||||
|
||||
@@ -91,6 +94,8 @@ endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
FFnvcodec PROPERTIES
|
||||
URL "https://github.com/FFmpeg/nv-codec-headers/"
|
||||
DESCRIPTION "FFmpeg version of headers required to interface with NVIDIA's codec APIs.")
|
||||
FFnvcodec
|
||||
PROPERTIES
|
||||
URL "https://github.com/FFmpeg/nv-codec-headers/"
|
||||
DESCRIPTION "FFmpeg version of headers required to interface with NVIDIA's codec APIs."
|
||||
)
|
||||
|
||||
+21
-17
@@ -36,11 +36,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -55,7 +50,8 @@ find_path(
|
||||
HINTS ${PC_Gio_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
PATH_SUFFIXES glib-2.0
|
||||
DOC "gio-2.0 include directory")
|
||||
DOC "gio-2.0 include directory"
|
||||
)
|
||||
|
||||
find_path(
|
||||
GioUnix_INCLUDE_DIR
|
||||
@@ -63,21 +59,24 @@ find_path(
|
||||
HINTS ${PC_GioUnix_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
PATH_SUFFIXES gio-unix-2.0
|
||||
DOC "gio-unix-2.0 include directory")
|
||||
DOC "gio-unix-2.0 include directory"
|
||||
)
|
||||
|
||||
find_library(
|
||||
Gio_LIBRARY
|
||||
NAMES libgio-2.0 gio-2.0 gio-unix-2.0
|
||||
HINTS ${PC_Gio_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "gio-2.0 location")
|
||||
DOC "gio-2.0 location"
|
||||
)
|
||||
|
||||
find_path(
|
||||
Glib_INCLUDE_DIR
|
||||
NAMES glibconfig.h
|
||||
HINTS ${PC_Gio_INCLUDE_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
PATH_SUFFIXES glib-2.0/include)
|
||||
PATH_SUFFIXES glib-2.0/include
|
||||
)
|
||||
|
||||
if(PC_Gio_VERSION VERSION_GREATER 0)
|
||||
set(Gio_VERSION ${PC_Gio_VERSION})
|
||||
@@ -91,7 +90,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
Gio
|
||||
REQUIRED_VARS Gio_LIBRARY Gio_INCLUDE_DIR GioUnix_INCLUDE_DIR Glib_INCLUDE_DIR
|
||||
VERSION_VAR Gio_VERSION REASON_FAILURE_MESSAGE "Ensure that glib is installed on the system.")
|
||||
VERSION_VAR Gio_VERSION
|
||||
REASON_FAILURE_MESSAGE "Ensure that glib is installed on the system."
|
||||
)
|
||||
mark_as_advanced(Gio_INCLUDE_DIR Gio_LIBRARY Glib_INCLUDE_DIR)
|
||||
|
||||
if(Gio_FOUND)
|
||||
@@ -106,16 +107,19 @@ if(Gio_FOUND)
|
||||
|
||||
set_target_properties(
|
||||
gio::gio
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_Gio_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Gio_INCLUDE_DIR};${GioUnix_INCLUDE_DIR};${Glib_INCLUDE_DIR}"
|
||||
VERSION ${Gio_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_Gio_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Gio_INCLUDE_DIR};${GioUnix_INCLUDE_DIR};${Glib_INCLUDE_DIR}"
|
||||
VERSION ${Gio_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
Gio PROPERTIES
|
||||
URL "https://docs.gtk.org/gio"
|
||||
DESCRIPTION
|
||||
"A library providing useful classes for general purpose I/O, networking, IPC, settings, and other high level application functionality."
|
||||
Gio
|
||||
PROPERTIES
|
||||
URL "https://docs.gtk.org/gio"
|
||||
DESCRIPTION
|
||||
"A library providing useful classes for general purpose I/O, networking, IPC, settings, and other high level application functionality."
|
||||
)
|
||||
|
||||
@@ -36,11 +36,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -53,14 +48,10 @@ find_path(
|
||||
NAMES jack/jack.h
|
||||
HINTS ${PC_Jack_INCLUDE_DIR}
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "Jack include directory")
|
||||
DOC "Jack include directory"
|
||||
)
|
||||
|
||||
find_library(
|
||||
Jack_LIBRARY
|
||||
NAMES jack
|
||||
HINTS ${PC_Jack_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "Jack location")
|
||||
find_library(Jack_LIBRARY NAMES jack HINTS ${PC_Jack_LIBRARY_DIRS} PATHS /usr/lib /usr/local/lib DOC "Jack location")
|
||||
|
||||
if(PC_Jack_VERSION VERSION_GREATER 0)
|
||||
set(Jack_VERSION ${PC_Jack_VERSION})
|
||||
@@ -74,7 +65,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
Jack
|
||||
REQUIRED_VARS Jack_LIBRARY Jack_INCLUDE_DIR
|
||||
VERSION_VAR Jack_VERSION REASON_FAILURE_MESSAGE "Ensure that Jack is installed on the system.")
|
||||
VERSION_VAR Jack_VERSION
|
||||
REASON_FAILURE_MESSAGE "Ensure that Jack is installed on the system."
|
||||
)
|
||||
mark_as_advanced(Jack_INCLUDE_DIR Jack_LIBRARY)
|
||||
|
||||
if(Jack_FOUND)
|
||||
@@ -89,16 +82,19 @@ if(Jack_FOUND)
|
||||
|
||||
set_target_properties(
|
||||
Jack::Jack
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_Jack_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Jack_INCLUDE_DIR}"
|
||||
VERSION ${Jack_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_Jack_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Jack_INCLUDE_DIR}"
|
||||
VERSION ${Jack_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
Jack PROPERTIES
|
||||
URL "https://www.jackaudio.org"
|
||||
DESCRIPTION
|
||||
"JACK Audio Connection Kit (or JACK) is a professional sound server API and pair of daemon implementations to provide real-time, low-latency connections for both audio and MIDI data between applications."
|
||||
Jack
|
||||
PROPERTIES
|
||||
URL "https://www.jackaudio.org"
|
||||
DESCRIPTION
|
||||
"JACK Audio Connection Kit (or JACK) is a professional sound server API and pair of daemon implementations to provide real-time, low-latency connections for both audio and MIDI data between applications."
|
||||
)
|
||||
|
||||
@@ -42,12 +42,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-lint: disable=C0307
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -60,14 +54,16 @@ find_path(
|
||||
NAMES libajantv2
|
||||
HINTS ${PC_LibAJANTV2_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "LibAJANTV2 (new) include directory")
|
||||
DOC "LibAJANTV2 (new) include directory"
|
||||
)
|
||||
if(${_LIBAJANTV2_NEW_INCLUDE_DIR} STREQUAL "_LIBAJANTV2_NEW_INCLUDE_DIR-NOTFOUND")
|
||||
find_path(
|
||||
_LIBAJANTV2_OLD_INCLUDE_DIR
|
||||
NAMES ajalibraries
|
||||
HINTS ${PC_LibAJANTV2_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "LibAJANTV2 (old) include directory")
|
||||
DOC "LibAJANTV2 (old) include directory"
|
||||
)
|
||||
if(NOT ${_LIBAJANTV2_OLD_INCLUDE_DIR} STREQUAL "_LIBAJANTV2_OLD_INCLUDE_DIR-NOTFOUND")
|
||||
set(LibAJANTV2_INCLUDE_DIR ${_LIBAJANTV2_OLD_INCLUDE_DIR}/ajalibraries)
|
||||
if(NOT LibAJANTV2_FIND_QUIETLY)
|
||||
@@ -86,14 +82,16 @@ find_library(
|
||||
NAMES ajantv2 libajantv2
|
||||
HINTS ${PC_LibAJANTV2_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "LibAJANTV2 location")
|
||||
DOC "LibAJANTV2 location"
|
||||
)
|
||||
|
||||
find_library(
|
||||
LibAJANTV2_LIBRARY_DEBUG
|
||||
NAMES ajantv2d libajantv2d
|
||||
HINTS ${PC_LibAJANTV2_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "LibAJANTV2 debug location.")
|
||||
DOC "LibAJANTV2 debug location."
|
||||
)
|
||||
|
||||
if(PC_LibAJANTV2_VERSION VERSION_GREATER 0)
|
||||
set(LibAJANTV2_VERSION ${PC_LibAJANTV2_VERSION})
|
||||
@@ -116,7 +114,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
LibAJANTV2
|
||||
REQUIRED_VARS LibAJANTV2_LIBRARY LibAJANTV2_INCLUDE_DIR
|
||||
VERSION_VAR LibAJANTV2_VERSION REASON_FAILURE_MESSAGE ${LibAJANTV2_ERROR_REASON})
|
||||
VERSION_VAR LibAJANTV2_VERSION
|
||||
REASON_FAILURE_MESSAGE ${LibAJANTV2_ERROR_REASON}
|
||||
)
|
||||
mark_as_advanced(LibAJANTV2_LIBRARY LibAJANTV2_INCLUDE_DIR)
|
||||
unset(LibAJANTV2_ERROR_REASON)
|
||||
|
||||
@@ -128,7 +128,8 @@ if(LibAJANTV2_FOUND)
|
||||
${LibAJANTV2_INCLUDE_DIR}/ajaanc
|
||||
${LibAJANTV2_INCLUDE_DIR}/ajabase
|
||||
${LibAJANTV2_INCLUDE_DIR}/ajantv2
|
||||
${LibAJANTV2_INCLUDE_DIR}/ajantv2/includes)
|
||||
${LibAJANTV2_INCLUDE_DIR}/ajantv2/includes
|
||||
)
|
||||
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
|
||||
list(APPEND LibAJANTV2_INCLUDE_DIRS ${LibAJANTV2_INCLUDE_DIR}/ajantv2/src/win)
|
||||
elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin")
|
||||
@@ -151,10 +152,12 @@ if(LibAJANTV2_FOUND)
|
||||
|
||||
set_target_properties(
|
||||
AJA::LibAJANTV2
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_LibAJANTV2_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LibAJANTV2_INCLUDE_DIR}"
|
||||
VERSION ${LibAJANTV2_VERSION}
|
||||
IMPORTED_CONFIGURATIONS Release)
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_LibAJANTV2_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LibAJANTV2_INCLUDE_DIR}"
|
||||
VERSION ${LibAJANTV2_VERSION}
|
||||
IMPORTED_CONFIGURATIONS Release
|
||||
)
|
||||
|
||||
if(LibAJANTV2_LIBRARY_DEBUG)
|
||||
if(IS_ABSOLUTE "${LibAJANTV2_LIBRARY_DEBUG}")
|
||||
@@ -162,10 +165,7 @@ if(LibAJANTV2_FOUND)
|
||||
else()
|
||||
set_property(TARGET AJA::LibAJANTV2 PROPERTY IMPORTED_LIBNAME_DEBUG "${LibAJANTV2_LIBRARY_DEBUG}")
|
||||
endif()
|
||||
set_property(
|
||||
TARGET AJA::LibAJANTV2
|
||||
APPEND
|
||||
PROPERTY IMPORTED_CONFIGURATIONS Debug)
|
||||
set_property(TARGET AJA::LibAJANTV2 APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug)
|
||||
endif()
|
||||
|
||||
set_target_properties(AJA::LibAJANTV2 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LibAJANTV2_INCLUDE_DIRS}")
|
||||
@@ -173,29 +173,36 @@ if(LibAJANTV2_FOUND)
|
||||
set_property(
|
||||
TARGET AJA::LibAJANTV2
|
||||
APPEND
|
||||
PROPERTY INTERFACE_LINK_LIBRARIES
|
||||
$<$<PLATFORM_ID:Windows>:netapi32.lib>
|
||||
$<$<PLATFORM_ID:Windows>:setupapi.lib>
|
||||
$<$<PLATFORM_ID:Windows>:shlwapi.lib>
|
||||
$<$<PLATFORM_ID:Windows>:wbemuuid.lib>
|
||||
$<$<PLATFORM_ID:Windows>:winmm.lib>
|
||||
$<$<PLATFORM_ID:Windows>:ws2_32.lib>
|
||||
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,AppKit.framework>>"
|
||||
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,CoreFoundation.framework>>"
|
||||
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,IOKit.framework>>")
|
||||
PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES
|
||||
$<$<PLATFORM_ID:Windows>:netapi32.lib>
|
||||
$<$<PLATFORM_ID:Windows>:setupapi.lib>
|
||||
$<$<PLATFORM_ID:Windows>:shlwapi.lib>
|
||||
$<$<PLATFORM_ID:Windows>:wbemuuid.lib>
|
||||
$<$<PLATFORM_ID:Windows>:winmm.lib>
|
||||
$<$<PLATFORM_ID:Windows>:ws2_32.lib>
|
||||
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,AppKit.framework>>"
|
||||
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,CoreFoundation.framework>>"
|
||||
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,IOKit.framework>>"
|
||||
)
|
||||
set_property(
|
||||
TARGET AJA::LibAJANTV2
|
||||
APPEND
|
||||
PROPERTY INTERFACE_COMPILE_DEFINITIONS "$<$<BOOL:${OS_WINDOWS}>:AJA_WINDOWS;_WINDOWS;WIN32;MSWindows>"
|
||||
"$<$<AND:$<BOOL:${OS_WINDOWS}>,$<CONFIG:DEBUG>>:_DEBUG;_NDEBUG>" "$<$<BOOL:${OS_MACOS}>:AJAMac;AJA_MAC>"
|
||||
"$<$<BOOL:${OS_LINUX}>:AJA_LINUX;AJALinux>")
|
||||
PROPERTY
|
||||
INTERFACE_COMPILE_DEFINITIONS
|
||||
"$<$<BOOL:${OS_WINDOWS}>:AJA_WINDOWS;_WINDOWS;WIN32;MSWindows>"
|
||||
"$<$<AND:$<BOOL:${OS_WINDOWS}>,$<CONFIG:DEBUG>>:_DEBUG;_NDEBUG>"
|
||||
"$<$<BOOL:${OS_MACOS}>:AJAMac;AJA_MAC>"
|
||||
"$<$<BOOL:${OS_LINUX}>:AJA_LINUX;AJALinux>"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
LibAJANTV2 PROPERTIES
|
||||
URL "https://www.aja.com"
|
||||
DESCRIPTION
|
||||
"AJA NTV2 SDK - AJA simplifies professional digital video workflows with a line of award-winning products designed and manufactured in Grass Valley, CA."
|
||||
LibAJANTV2
|
||||
PROPERTIES
|
||||
URL "https://www.aja.com"
|
||||
DESCRIPTION
|
||||
"AJA NTV2 SDK - AJA simplifies professional digital video workflows with a line of award-winning products designed and manufactured in Grass Valley, CA."
|
||||
)
|
||||
|
||||
@@ -36,10 +36,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -52,14 +48,16 @@ find_path(
|
||||
NAMES uuid/uuid.h
|
||||
HINTS ${PC_LibUUID_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "LibUUID include directory")
|
||||
DOC "LibUUID include directory"
|
||||
)
|
||||
|
||||
find_library(
|
||||
LibUUID_LIBRARY
|
||||
NAMES uuid
|
||||
HINTS ${PC_LibUUID_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "LibUUID location")
|
||||
DOC "LibUUID location"
|
||||
)
|
||||
|
||||
if(PC_LibUUID_VERSION VERSION_GREATER 0)
|
||||
set(LibUUID_VERSION ${PC_LibUUID_VERSION})
|
||||
@@ -73,7 +71,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
LibUUID
|
||||
REQUIRED_VARS LibUUID_LIBRARY LibUUID_INCLUDE_DIR
|
||||
VERSION_VAR LibUUID_VERSION REASON_FAILURE_MESSAGE "Ensure that e2fsprogs is installed on the system.")
|
||||
VERSION_VAR LibUUID_VERSION
|
||||
REASON_FAILURE_MESSAGE "Ensure that e2fsprogs is installed on the system."
|
||||
)
|
||||
mark_as_advanced(LibUUID_INCLUDE_DIR LibUUID_LIBRARY)
|
||||
|
||||
if(LibUUID_FOUND)
|
||||
@@ -88,16 +88,19 @@ if(LibUUID_FOUND)
|
||||
|
||||
set_target_properties(
|
||||
LibUUID::LibUUID
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_LibUUID_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LibUUID_INCLUDE_DIR}"
|
||||
VERSION ${LibUUID_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_LibUUID_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LibUUID_INCLUDE_DIR}"
|
||||
VERSION ${LibUUID_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
LibUUID PROPERTIES
|
||||
URL "http://e2fsprogs.sourceforge.net/"
|
||||
DESCRIPTION
|
||||
"The libuuid library is used to generate unique identifiers for objects that may be accessible beyond the local system."
|
||||
LibUUID
|
||||
PROPERTIES
|
||||
URL "http://e2fsprogs.sourceforge.net/"
|
||||
DESCRIPTION
|
||||
"The libuuid library is used to generate unique identifiers for objects that may be accessible beyond the local system."
|
||||
)
|
||||
|
||||
@@ -36,11 +36,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -54,20 +49,26 @@ find_path(
|
||||
HINTS ${PC_LibVLC_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
PATH_SUFFIXES vlc include/vlc include
|
||||
DOC "LibVLC include directory")
|
||||
DOC "LibVLC include directory"
|
||||
)
|
||||
|
||||
find_library(
|
||||
LibVLC_LIBRARY
|
||||
NAMES vlc libvlc
|
||||
HINTS ${PC_LibVLC_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "LibVLC location")
|
||||
DOC "LibVLC location"
|
||||
)
|
||||
|
||||
if(PC_LibVLC_VERSION VERSION_GREATER 0)
|
||||
set(LibVLC_VERSION ${PC_LibVLC_VERSION})
|
||||
elseif(EXISTS "${LibVLC_INCLUDE_DIR}/libvlc_version.h")
|
||||
file(STRINGS "${LibVLC_INCLUDE_DIR}/libvlc_version.h" _VERSION_STRING
|
||||
REGEX "^.*LIBVLC_VERSION_(MAJOR|MINOR|PATCH)[ \t]+[0-9]+[ \t]*$")
|
||||
file(
|
||||
STRINGS
|
||||
"${LibVLC_INCLUDE_DIR}/libvlc_version.h"
|
||||
_VERSION_STRING
|
||||
REGEX "^.*LIBVLC_VERSION_(MAJOR|MINOR|PATCH)[ \t]+[0-9]+[ \t]*$"
|
||||
)
|
||||
string(REGEX REPLACE ".*LIBVLC_VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" VERSION_MAJOR "${_VERSION_STRING}")
|
||||
string(REGEX REPLACE ".*LIBVLC_VERSION_MINOR[ \t]+([0-9]+).*" "\\1" VERSION_MINOR "${_VERSION_STRING}")
|
||||
string(REGEX REPLACE ".*LIBVLC_VERSION_REVISION[ \t]+([0-9]+).*" "\\1" VERSION_REVISION "${_VERSION_STRING}")
|
||||
@@ -82,7 +83,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
LibVLC
|
||||
REQUIRED_VARS LibVLC_LIBRARY LibVLC_INCLUDE_DIR
|
||||
VERSION_VAR LibVLC_VERSION REASON_FAILURE_MESSAGE "Ensure that libvlc-dev (vlc on BSD) is installed on the system.")
|
||||
VERSION_VAR LibVLC_VERSION
|
||||
REASON_FAILURE_MESSAGE "Ensure that libvlc-dev (vlc on BSD) is installed on the system."
|
||||
)
|
||||
mark_as_advanced(LibVLC_INCLUDE_DIR LibVLC_LIBRARY)
|
||||
|
||||
if(LibVLC_FOUND)
|
||||
@@ -97,15 +100,19 @@ if(LibVLC_FOUND)
|
||||
|
||||
set_target_properties(
|
||||
VLC::LibVLC
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_LibVLC_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LibVLC_INCLUDE_DIR}"
|
||||
VERSION ${LibVLC_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_LibVLC_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LibVLC_INCLUDE_DIR}"
|
||||
VERSION ${LibVLC_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
LibVLC PROPERTIES
|
||||
URL "https://www.videolan.org/vlc/libvlc.html"
|
||||
DESCRIPTION
|
||||
"libVLC is the core engine and the interface to the multimedia framework on which VLC media player is based.")
|
||||
LibVLC
|
||||
PROPERTIES
|
||||
URL "https://www.videolan.org/vlc/libvlc.html"
|
||||
DESCRIPTION
|
||||
"libVLC is the core engine and the interface to the multimedia framework on which VLC media player is based."
|
||||
)
|
||||
|
||||
@@ -36,11 +36,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -54,14 +49,16 @@ find_path(
|
||||
HINTS ${PC_Libdrm_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
PATH_SUFFIXES libdrm
|
||||
DOC "Libdrm include directory")
|
||||
DOC "Libdrm include directory"
|
||||
)
|
||||
|
||||
find_library(
|
||||
Libdrm_LIBRARY
|
||||
NAMES drm libdrm
|
||||
HINTS ${PC_Libdrm_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "Libdrm location")
|
||||
DOC "Libdrm location"
|
||||
)
|
||||
|
||||
if(PC_Libdrm_VERSION VERSION_GREATER 0)
|
||||
set(Libdrm_VERSION ${PC_Libdrm_VERSION})
|
||||
@@ -75,7 +72,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
Libdrm
|
||||
REQUIRED_VARS Libdrm_LIBRARY Libdrm_INCLUDE_DIR
|
||||
VERSION_VAR Libdrm_VERSION REASON_FAILURE_MESSAGE "Ensure that libdrm is installed on the system.")
|
||||
VERSION_VAR Libdrm_VERSION
|
||||
REASON_FAILURE_MESSAGE "Ensure that libdrm is installed on the system."
|
||||
)
|
||||
mark_as_advanced(Libdrm_INCLUDE_DIR Libdrm_LIBRARY)
|
||||
|
||||
if(Libdrm_FOUND)
|
||||
@@ -90,16 +89,19 @@ if(Libdrm_FOUND)
|
||||
|
||||
set_target_properties(
|
||||
Libdrm::Libdrm
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_Libdrm_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Libdrm_INCLUDE_DIR}"
|
||||
VERSION ${Libdrm_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_Libdrm_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Libdrm_INCLUDE_DIR}"
|
||||
VERSION ${Libdrm_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
Libdrm PROPERTIES
|
||||
URL "https://gitlab.freedesktop.org/mesa/drm"
|
||||
DESCRIPTION
|
||||
"A low-level library, typically used by graphics drivers such as the Mesa drivers, the X drivers, libva and similar projects."
|
||||
Libdrm
|
||||
PROPERTIES
|
||||
URL "https://gitlab.freedesktop.org/mesa/drm"
|
||||
DESCRIPTION
|
||||
"A low-level library, typically used by graphics drivers such as the Mesa drivers, the X drivers, libva and similar projects."
|
||||
)
|
||||
|
||||
@@ -36,10 +36,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -52,14 +48,16 @@ find_path(
|
||||
NAMES fdk-aac/aacenc_lib.h
|
||||
HINTS ${PC_Libfdk_INCLUDE_DIRS}
|
||||
PATHS /usr/include/ /usr/local/include
|
||||
DOC "Libfdk include directory")
|
||||
DOC "Libfdk include directory"
|
||||
)
|
||||
|
||||
find_library(
|
||||
Libfdk_LIBRARY
|
||||
NAMES fdk-aac Libfdk-aac
|
||||
HINTS ${PC_Libfdk_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "Libfdk location")
|
||||
DOC "Libfdk location"
|
||||
)
|
||||
|
||||
if(PC_Libfdk_VERSION VERSION_GREATER 0)
|
||||
set(Libfdk_VERSION ${PC_Libfdk_VERSION})
|
||||
@@ -73,7 +71,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
Libfdk
|
||||
REQUIRED_VARS Libfdk_LIBRARY Libfdk_INCLUDE_DIR
|
||||
VERSION_VAR Libfdk_VERSION REASON_FAILURE_MESSAGE "Ensure that Libfdk is installed on the system.")
|
||||
VERSION_VAR Libfdk_VERSION
|
||||
REASON_FAILURE_MESSAGE "Ensure that Libfdk is installed on the system."
|
||||
)
|
||||
mark_as_advanced(Libfdk_INCLUDE_DIR Libfdk_LIBRARY)
|
||||
|
||||
if(Libfdk_FOUND)
|
||||
@@ -88,14 +88,18 @@ if(Libfdk_FOUND)
|
||||
|
||||
set_target_properties(
|
||||
Libfdk::Libfdk
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_Libfdk_CFLAFGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Libfdk_INCLUDE_DIR}"
|
||||
VERSION ${Libfdk_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_Libfdk_CFLAFGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Libfdk_INCLUDE_DIR}"
|
||||
VERSION ${Libfdk_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
Libfdk PROPERTIES
|
||||
URL "https://github.com/mstorsjo/fdk-aac"
|
||||
DESCRIPTION "A standalone library of the Fraunhofer FDK AAC code from Android.")
|
||||
Libfdk
|
||||
PROPERTIES
|
||||
URL "https://github.com/mstorsjo/fdk-aac"
|
||||
DESCRIPTION "A standalone library of the Fraunhofer FDK AAC code from Android."
|
||||
)
|
||||
|
||||
@@ -36,10 +36,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -53,14 +49,16 @@ find_path(
|
||||
HINTS ${PC_Libpci_INCLUDE_DIRS}
|
||||
PATHS /usr/include/ /usr/local/include
|
||||
PATH_SUFFIXES pci
|
||||
DOC "Libpci include directory")
|
||||
DOC "Libpci include directory"
|
||||
)
|
||||
|
||||
find_library(
|
||||
Libpci_LIBRARY
|
||||
NAMES libpci pci
|
||||
HINTS ${PC_Libpci_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "Libpci location")
|
||||
DOC "Libpci location"
|
||||
)
|
||||
|
||||
if(PC_Libpci_VERSION VERSION_GREATER 0)
|
||||
set(Libpci_VERSION ${PC_Libpci_VERSION})
|
||||
@@ -77,7 +75,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
Libpci
|
||||
REQUIRED_VARS Libpci_LIBRARY Libpci_INCLUDE_DIR
|
||||
VERSION_VAR Libpci_VERSION REASON_FAILURE_MESSAGE "Ensure that libpci is installed on the system.")
|
||||
VERSION_VAR Libpci_VERSION
|
||||
REASON_FAILURE_MESSAGE "Ensure that libpci is installed on the system."
|
||||
)
|
||||
mark_as_advanced(Libpci_INCLUDE_DIR Libpci_LIBRARY)
|
||||
|
||||
if(Libpci_FOUND)
|
||||
@@ -92,14 +92,18 @@ if(Libpci_FOUND)
|
||||
|
||||
set_target_properties(
|
||||
Libpci::pci
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_Libpci_CFLAFGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Libpci_INCLUDE_DIR}"
|
||||
VERSION ${Libpci_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_Libpci_CFLAFGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Libpci_INCLUDE_DIR}"
|
||||
VERSION ${Libpci_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
Libpci PROPERTIES
|
||||
URL "https://mj.ucw.cz/sw/pciutils"
|
||||
DESCRIPTION "Offers access to the PCI configuration space on a variety of operating systems.")
|
||||
Libpci
|
||||
PROPERTIES
|
||||
URL "https://mj.ucw.cz/sw/pciutils"
|
||||
DESCRIPTION "Offers access to the PCI configuration space on a variety of operating systems."
|
||||
)
|
||||
|
||||
@@ -36,10 +36,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -53,7 +49,8 @@ macro(Librist_set_soname)
|
||||
execute_process(
|
||||
COMMAND sh -c "otool -D '${Librist_LIBRARY}' | grep -v '${Librist_LIBRARY}'"
|
||||
OUTPUT_VARIABLE _output
|
||||
RESULT_VARIABLE _result)
|
||||
RESULT_VARIABLE _result
|
||||
)
|
||||
|
||||
if(_result EQUAL 0 AND _output MATCHES "^@rpath/")
|
||||
set_property(TARGET Librist::Librist PROPERTY IMPORTED_SONAME "${_output}")
|
||||
@@ -62,7 +59,8 @@ macro(Librist_set_soname)
|
||||
execute_process(
|
||||
COMMAND sh -c "objdump -p '${Librist_LIBRARY}' | grep SONAME"
|
||||
OUTPUT_VARIABLE _output
|
||||
RESULT_VARIABLE _result)
|
||||
RESULT_VARIABLE _result
|
||||
)
|
||||
|
||||
if(_result EQUAL 0)
|
||||
string(REGEX REPLACE "[ \t]+SONAME[ \t]+([^ \t]+)" "\\1" _soname "${_output}")
|
||||
@@ -79,7 +77,8 @@ find_path(
|
||||
NAMES librist.h librist/librist.h
|
||||
HINTS ${PC_Librist_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "Librist include directory")
|
||||
DOC "Librist include directory"
|
||||
)
|
||||
|
||||
if(PC_Librist_VERSION VERSION_GREATER 0)
|
||||
set(Librist_VERSION ${PC_Librist_VERSION})
|
||||
@@ -101,7 +100,8 @@ find_library(
|
||||
NAMES librist rist
|
||||
HINTS ${PC_Librist_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "Librist location")
|
||||
DOC "Librist location"
|
||||
)
|
||||
|
||||
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin|Windows")
|
||||
set(Librist_ERROR_REASON "Ensure that obs-deps is provided as part of CMAKE_PREFIX_PATH.")
|
||||
@@ -112,7 +112,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
Librist
|
||||
REQUIRED_VARS Librist_LIBRARY Librist_INCLUDE_DIR
|
||||
VERSION_VAR Librist_VERSION REASON_FAILURE_MESSAGE "${Librist_ERROR_REASON}")
|
||||
VERSION_VAR Librist_VERSION
|
||||
REASON_FAILURE_MESSAGE "${Librist_ERROR_REASON}"
|
||||
)
|
||||
mark_as_advanced(Librist_INCLUDE_DIR Librist_LIBRARY)
|
||||
unset(Librist_ERROR_REASON)
|
||||
|
||||
@@ -129,14 +131,18 @@ if(Librist_FOUND)
|
||||
librist_set_soname()
|
||||
set_target_properties(
|
||||
Librist::Librist
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_Librist_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Librist_INCLUDE_DIR}"
|
||||
VERSION ${Librist_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_Librist_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Librist_INCLUDE_DIR}"
|
||||
VERSION ${Librist_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
Librist PROPERTIES
|
||||
URL "https://code.videolan.org/rist/librist"
|
||||
DESCRIPTION "A library that can be used to easily add the RIST protocol to your application.")
|
||||
Librist
|
||||
PROPERTIES
|
||||
URL "https://code.videolan.org/rist/librist"
|
||||
DESCRIPTION "A library that can be used to easily add the RIST protocol to your application."
|
||||
)
|
||||
|
||||
@@ -36,11 +36,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0307
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -54,7 +49,8 @@ macro(librnnoise_set_soname)
|
||||
execute_process(
|
||||
COMMAND sh -c "otool -D '${Librnnoise_LIBRARY}' | grep -v '${Librnnoise_LIBRARY}'"
|
||||
OUTPUT_VARIABLE _output
|
||||
RESULT_VARIABLE _result)
|
||||
RESULT_VARIABLE _result
|
||||
)
|
||||
|
||||
if(_result EQUAL 0 AND _output MATCHES "^@rpath/")
|
||||
set_property(TARGET Librnnoise::Librnnoise PROPERTY IMPORTED_SONAME "${_output}")
|
||||
@@ -63,7 +59,8 @@ macro(librnnoise_set_soname)
|
||||
execute_process(
|
||||
COMMAND sh -c "objdump -p '${Librnnoise_LIBRARY}' | grep SONAME"
|
||||
OUTPUT_VARIABLE _output
|
||||
RESULT_VARIABLE _result)
|
||||
RESULT_VARIABLE _result
|
||||
)
|
||||
|
||||
if(_result EQUAL 0)
|
||||
string(REGEX REPLACE "[ \t]+SONAME[ \t]+([^ \t]+)" "\\1" _soname "${_output}")
|
||||
@@ -80,7 +77,8 @@ find_path(
|
||||
NAMES rnnoise.h
|
||||
HINTS ${PC_Librnnoise_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "Librnnoise include directory")
|
||||
DOC "Librnnoise include directory"
|
||||
)
|
||||
|
||||
if(PC_Librnnoise_VERSION VERSION_GREATER 0)
|
||||
set(Librnnoise_VERSION ${PC_Librnnoise_VERSION})
|
||||
@@ -96,7 +94,8 @@ find_library(
|
||||
NAMES rnnoise librnnoise
|
||||
HINTS ${PC_Librnnoise_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "Librnnoise location")
|
||||
DOC "Librnnoise location"
|
||||
)
|
||||
|
||||
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin|Windows")
|
||||
set(Librnnoise_ERROR_REASON "Ensure that obs-deps is provided as part of CMAKE_PREFIX_PATH.")
|
||||
@@ -107,7 +106,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
Librnnoise
|
||||
REQUIRED_VARS Librnnoise_LIBRARY Librnnoise_INCLUDE_DIR
|
||||
VERSION_VAR Librnnoise_VERSION REASON_FAILURE_MESSAGE "${Librnnoise_ERROR_REASON}")
|
||||
VERSION_VAR Librnnoise_VERSION
|
||||
REASON_FAILURE_MESSAGE "${Librnnoise_ERROR_REASON}"
|
||||
)
|
||||
mark_as_advanced(Librnnoise_INCLUDE_DIR Librnnoise_LIBRARY)
|
||||
unset(Librnnoise_ERROR_REASON)
|
||||
|
||||
@@ -124,14 +125,18 @@ if(Librnnoise_FOUND)
|
||||
|
||||
set_target_properties(
|
||||
Librnnoise::Librnnoise
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_Librnnoise_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Librnnoise_INCLUDE_DIR}"
|
||||
VERSION ${Librnnoise_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_Librnnoise_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Librnnoise_INCLUDE_DIR}"
|
||||
VERSION ${Librnnoise_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
Librnnoise PROPERTIES
|
||||
URL "https://gitlab.xiph.org/xiph/rnnoise"
|
||||
DESCRIPTION "Recurrent neural network for audio noise reduction.")
|
||||
Librnnoise
|
||||
PROPERTIES
|
||||
URL "https://gitlab.xiph.org/xiph/rnnoise"
|
||||
DESCRIPTION "Recurrent neural network for audio noise reduction."
|
||||
)
|
||||
|
||||
@@ -36,11 +36,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0307
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -54,7 +49,8 @@ macro(libspeexdsp_set_soname)
|
||||
execute_process(
|
||||
COMMAND sh -c "otool -D '${Libspeexdsp_LIBRARY}' | grep -v '${Libspeexdsp_LIBRARY}'"
|
||||
OUTPUT_VARIABLE _output
|
||||
RESULT_VARIABLE _result)
|
||||
RESULT_VARIABLE _result
|
||||
)
|
||||
|
||||
if(_result EQUAL 0 AND _output MATCHES "^@rpath/")
|
||||
set_property(TARGET SpeexDSP::Libspeexdsp PROPERTY IMPORTED_SONAME "${_output}")
|
||||
@@ -63,7 +59,8 @@ macro(libspeexdsp_set_soname)
|
||||
execute_process(
|
||||
COMMAND sh -c "objdump -p '${Libspeexdsp_LIBRARY}' | grep SONAME"
|
||||
OUTPUT_VARIABLE _output
|
||||
RESULT_VARIABLE _result)
|
||||
RESULT_VARIABLE _result
|
||||
)
|
||||
|
||||
if(_result EQUAL 0)
|
||||
string(REGEX REPLACE "[ \t]+SONAME[ \t]+([^ \t]+)" "\\1" _soname "${_output}")
|
||||
@@ -80,7 +77,8 @@ find_path(
|
||||
NAMES speex/speex_preprocess.h
|
||||
HINTS ${PC_Libspeexdsp_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "Libspeexdsp include directory")
|
||||
DOC "Libspeexdsp include directory"
|
||||
)
|
||||
|
||||
if(PC_Libspeexdsp_VERSION VERSION_GREATER 0)
|
||||
set(Libspeexdsp_VERSION ${PC_Libspeexdsp_VERSION})
|
||||
@@ -96,7 +94,8 @@ find_library(
|
||||
NAMES speexdsp libspeexdsp
|
||||
HINTS ${PC_Libspeexdsp_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "Libspeexdsp location")
|
||||
DOC "Libspeexdsp location"
|
||||
)
|
||||
|
||||
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin|Windows")
|
||||
set(Libspeexdsp_ERROR_REASON "Ensure that obs-deps is provided as part of CMAKE_PREFIX_PATH.")
|
||||
@@ -107,7 +106,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
Libspeexdsp
|
||||
REQUIRED_VARS Libspeexdsp_LIBRARY Libspeexdsp_INCLUDE_DIR
|
||||
VERSION_VAR Libspeexdsp_VERSION REASON_FAILURE_MESSAGE "${Libspeexdsp_ERROR_REASON}")
|
||||
VERSION_VAR Libspeexdsp_VERSION
|
||||
REASON_FAILURE_MESSAGE "${Libspeexdsp_ERROR_REASON}"
|
||||
)
|
||||
mark_as_advanced(Libspeexdsp_INCLUDE_DIR Libspeexdsp_LIBRARY)
|
||||
unset(Libspeexdsp_ERROR_REASON)
|
||||
|
||||
@@ -124,14 +125,16 @@ if(Libspeexdsp_FOUND)
|
||||
libspeexdsp_set_soname()
|
||||
set_target_properties(
|
||||
SpeexDSP::Libspeexdsp
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_Libspeexdsp_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Libspeexdsp_INCLUDE_DIR}"
|
||||
VERSION ${Libspeexdsp_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_Libspeexdsp_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Libspeexdsp_INCLUDE_DIR}"
|
||||
VERSION ${Libspeexdsp_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
Libspeexdsp PROPERTIES
|
||||
URL "https://gitlab.xiph.org/xiph/speexdsp"
|
||||
DESCRIPTION "DSP library derived from speex.")
|
||||
Libspeexdsp
|
||||
PROPERTIES URL "https://gitlab.xiph.org/xiph/speexdsp" DESCRIPTION "DSP library derived from speex."
|
||||
)
|
||||
|
||||
@@ -36,11 +36,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -54,7 +49,8 @@ macro(libsrt_set_soname)
|
||||
execute_process(
|
||||
COMMAND sh -c "otool -D '${Libsrt_LIBRARY}' | grep -v '${Libsrt_LIBRARY}'"
|
||||
OUTPUT_VARIABLE _output
|
||||
RESULT_VARIABLE _result)
|
||||
RESULT_VARIABLE _result
|
||||
)
|
||||
|
||||
if(_result EQUAL 0 AND _output MATCHES "^@rpath/")
|
||||
set_property(TARGET Libsrt::Libsrt PROPERTY IMPORTED_SONAME "${_output}")
|
||||
@@ -63,7 +59,8 @@ macro(libsrt_set_soname)
|
||||
execute_process(
|
||||
COMMAND sh -c "objdump -p '${Libsrt_LIBRARY}' | grep SONAME"
|
||||
OUTPUT_VARIABLE _output
|
||||
RESULT_VARIABLE _result)
|
||||
RESULT_VARIABLE _result
|
||||
)
|
||||
|
||||
if(_result EQUAL 0)
|
||||
string(REGEX REPLACE "[ \t]+SONAME[ \t]+([^ \t]+)" "\\1" _soname "${_output}")
|
||||
@@ -80,7 +77,8 @@ find_path(
|
||||
NAMES srt.h srt/srt.h
|
||||
HINTS ${PC_Libsrt_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "Libsrt include directory")
|
||||
DOC "Libsrt include directory"
|
||||
)
|
||||
|
||||
if(PC_Libsrt_VERSION VERSION_GREATER 0)
|
||||
set(Libsrt_VERSION ${PC_Libsrt_VERSION})
|
||||
@@ -99,7 +97,8 @@ find_library(
|
||||
NAMES srt libsrt
|
||||
HINTS ${PC_Libsrt_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "Libsrt location")
|
||||
DOC "Libsrt location"
|
||||
)
|
||||
|
||||
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin|Windows")
|
||||
set(Libsrt_ERROR_REASON "Ensure that obs-deps is provided as part of CMAKE_PREFIX_PATH.")
|
||||
@@ -110,7 +109,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
Libsrt
|
||||
REQUIRED_VARS Libsrt_LIBRARY Libsrt_INCLUDE_DIR
|
||||
VERSION_VAR Libsrt_VERSION REASON_FAILURE_MESSAGE "${Libsrt_ERROR_REASON}")
|
||||
VERSION_VAR Libsrt_VERSION
|
||||
REASON_FAILURE_MESSAGE "${Libsrt_ERROR_REASON}"
|
||||
)
|
||||
mark_as_advanced(Libsrt_INCLUDE_DIR Libsrt_LIBRARY)
|
||||
unset(Libsrt_ERROR_REASON)
|
||||
|
||||
@@ -125,15 +126,20 @@ if(Libsrt_FOUND)
|
||||
set_property(TARGET Libsrt::Libsrt PROPERTY IMPORTED_LIBNAME "${Libsrt_LIBRARY}")
|
||||
endif()
|
||||
|
||||
set_target_properties(Libsrt::Libsrt PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_Libsrt_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Libsrt_INCLUDE_DIR}")
|
||||
set_target_properties(
|
||||
Libsrt::Libsrt
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_Libsrt_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Libsrt_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
Libsrt PROPERTIES
|
||||
URL "https://www.srtalliance.org"
|
||||
DESCRIPTION
|
||||
"Secure Reliable Transport (SRT) is a transport protocol for ultra low (sub-second) latency live video and audio streaming, as well as for generic bulk data transfer."
|
||||
Libsrt
|
||||
PROPERTIES
|
||||
URL "https://www.srtalliance.org"
|
||||
DESCRIPTION
|
||||
"Secure Reliable Transport (SRT) is a transport protocol for ultra low (sub-second) latency live video and audio streaming, as well as for generic bulk data transfer."
|
||||
)
|
||||
|
||||
@@ -36,10 +36,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -52,14 +48,16 @@ find_path(
|
||||
NAMES libudev.h
|
||||
HINTS ${PC_Libudev_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "Libudev include directory")
|
||||
DOC "Libudev include directory"
|
||||
)
|
||||
|
||||
find_library(
|
||||
Libudev_LIBRARY
|
||||
NAMES udev libudev
|
||||
HINTS ${PC_Libudev_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "Libudev location")
|
||||
DOC "Libudev location"
|
||||
)
|
||||
|
||||
if(PC_Libudev_VERSION VERSION_GREATER 0)
|
||||
set(Libudev_VERSION ${PC_Libudev_VERSION})
|
||||
@@ -73,7 +71,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
Libudev
|
||||
REQUIRED_VARS Libudev_LIBRARY Libudev_INCLUDE_DIR
|
||||
VERSION_VAR Libudev_VERSION REASON_FAILURE_MESSAGE "Ensure that Libudev is installed on the system.")
|
||||
VERSION_VAR Libudev_VERSION
|
||||
REASON_FAILURE_MESSAGE "Ensure that Libudev is installed on the system."
|
||||
)
|
||||
mark_as_advanced(Libudev_INCLUDE_DIR Libudev_LIBRARY)
|
||||
|
||||
if(Libudev_FOUND)
|
||||
@@ -88,14 +88,18 @@ if(Libudev_FOUND)
|
||||
|
||||
set_target_properties(
|
||||
Libudev::Libudev
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_Libudev_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Libudev_INCLUDE_DIR}"
|
||||
VERSION ${Libudev_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_Libudev_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Libudev_INCLUDE_DIR}"
|
||||
VERSION ${Libudev_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
Libudev PROPERTIES
|
||||
URL "https://www.freedesktop.org/wiki/Software/systemd/"
|
||||
DESCRIPTION "API for enumerating and introspecting local devices.")
|
||||
Libudev
|
||||
PROPERTIES
|
||||
URL "https://www.freedesktop.org/wiki/Software/systemd/"
|
||||
DESCRIPTION "API for enumerating and introspecting local devices."
|
||||
)
|
||||
|
||||
@@ -36,10 +36,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -52,14 +48,16 @@ find_path(
|
||||
NAMES libv4l2.h
|
||||
HINTS ${PC_Libv4l2_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "Libv4l2 include directory")
|
||||
DOC "Libv4l2 include directory"
|
||||
)
|
||||
|
||||
find_library(
|
||||
Libv4l2_LIBRARY
|
||||
NAMES v4l2
|
||||
HINTS ${PC_Libv4l2_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "Libv4l2 location")
|
||||
DOC "Libv4l2 location"
|
||||
)
|
||||
|
||||
if(PC_Libv4l2_VERSION VERSION_GREATER 0)
|
||||
set(Libv4l2_VERSION ${PC_Libv4l2_VERSION})
|
||||
@@ -73,7 +71,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
Libv4l2
|
||||
REQUIRED_VARS Libv4l2_LIBRARY Libv4l2_INCLUDE_DIR
|
||||
VERSION_VAR Libv4l2_VERSION REASON_FAILURE_MESSAGE "Ensure that v4l-utils is installed on the system.")
|
||||
VERSION_VAR Libv4l2_VERSION
|
||||
REASON_FAILURE_MESSAGE "Ensure that v4l-utils is installed on the system."
|
||||
)
|
||||
mark_as_advanced(Libv4l2_INCLUDE_DIR Libv4l2_LIBRARY)
|
||||
|
||||
if(Libv4l2_FOUND)
|
||||
@@ -88,14 +88,18 @@ if(Libv4l2_FOUND)
|
||||
|
||||
set_target_properties(
|
||||
Libv4l2::Libv4l2
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_Libv4l2_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Libv4l2_INCLUDE_DIR}"
|
||||
VERSION ${Libv4l2_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_Libv4l2_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Libv4l2_INCLUDE_DIR}"
|
||||
VERSION ${Libv4l2_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
Lib4l2 PROPERTIES
|
||||
URL "https://linuxtv.org/wiki/index.php/V4l-utils"
|
||||
DESCRIPTION "The v4l-utils are a series of packages for handling media devices.")
|
||||
Lib4l2
|
||||
PROPERTIES
|
||||
URL "https://linuxtv.org/wiki/index.php/V4l-utils"
|
||||
DESCRIPTION "The v4l-utils are a series of packages for handling media devices."
|
||||
)
|
||||
|
||||
@@ -42,11 +42,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -61,27 +56,34 @@ find_path(
|
||||
HINTS ${PC_Libva_INCLUDE_DIRS}
|
||||
PATHS /usr/include/ /usr/local/include
|
||||
PATH_SUFFIXES va
|
||||
DOC "Libva include directory")
|
||||
DOC "Libva include directory"
|
||||
)
|
||||
|
||||
find_library(
|
||||
Libva_LIBRARY
|
||||
NAMES libva va
|
||||
HINTS ${PC_Libva_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "Libva location")
|
||||
DOC "Libva location"
|
||||
)
|
||||
|
||||
find_library(
|
||||
LibvaDrm_LIBRARY
|
||||
NAMES libva-drm va-drm
|
||||
HINTS ${PC_LibvaDrm_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "Libva-drm location")
|
||||
DOC "Libva-drm location"
|
||||
)
|
||||
|
||||
if(PC_Libva_VERSION VERSION_GREATER 0)
|
||||
set(Libva_VERSION ${PC_Libva_VERSION})
|
||||
elseif(EXISTS "${Libva_INCLUDE_DIR}/va_version.h")
|
||||
file(STRINGS "${Libva_INCLUDE_DIR}/va_version.h" _VERSION_STRING
|
||||
REGEX "^.*(MAJOR|MINOR|MICRO)_VERSION[ \t]+[0-9]+[ \t]*$")
|
||||
file(
|
||||
STRINGS
|
||||
"${Libva_INCLUDE_DIR}/va_version.h"
|
||||
_VERSION_STRING
|
||||
REGEX "^.*(MAJOR|MINOR|MICRO)_VERSION[ \t]+[0-9]+[ \t]*$"
|
||||
)
|
||||
string(REGEX REPLACE ".*MAJOR_VERSION[ \t]+([0-9]+).*" "\\1" VERSION_MAJOR "${_VERSION_STRING}")
|
||||
string(REGEX REPLACE ".*MINOR_VERSION[ \t]+([0-9]+).*" "\\1" VERSION_MINOR "${_VERSION_STRING}")
|
||||
string(REGEX REPLACE ".*MICRO_VERSION[ \t]+([0-9]+).*" "\\1" VERSION_MICRO "${_VERSION_STRING}")
|
||||
@@ -97,7 +99,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
Libva
|
||||
REQUIRED_VARS Libva_LIBRARY Libva_INCLUDE_DIR
|
||||
VERSION_VAR Libva_VERSION REASON_FAILURE_MESSAGE "Ensure that libva is installed on the system.")
|
||||
VERSION_VAR Libva_VERSION
|
||||
REASON_FAILURE_MESSAGE "Ensure that libva is installed on the system."
|
||||
)
|
||||
mark_as_advanced(Libva_INCLUDE_DIR Libva_LIBRARY)
|
||||
|
||||
if(Libva_FOUND)
|
||||
@@ -112,9 +116,11 @@ if(Libva_FOUND)
|
||||
|
||||
set_target_properties(
|
||||
Libva::va
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_Libva_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Libva_INCLUDE_DIR}"
|
||||
VERSION ${Libva_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_Libva_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Libva_INCLUDE_DIR}"
|
||||
VERSION ${Libva_VERSION}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(LibvaDrm_LIBRARY)
|
||||
@@ -129,17 +135,20 @@ if(Libva_FOUND)
|
||||
|
||||
set_target_properties(
|
||||
Libva::drm
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_LibvaDrm_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Libva_INCLUDE_DIR}"
|
||||
VERSION ${Libva_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_LibvaDrm_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Libva_INCLUDE_DIR}"
|
||||
VERSION ${Libva_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
Libva PROPERTIES
|
||||
URL "https://01.org/intel-media-for-linux"
|
||||
DESCRIPTION
|
||||
"An implementation for VA-API (Video Acceleration API) - an open-source library which provides access to graphics hardware acceleration capabilities."
|
||||
Libva
|
||||
PROPERTIES
|
||||
URL "https://01.org/intel-media-for-linux"
|
||||
DESCRIPTION
|
||||
"An implementation for VA-API (Video Acceleration API) - an open-source library which provides access to graphics hardware acceleration capabilities."
|
||||
)
|
||||
|
||||
@@ -36,11 +36,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -54,7 +49,8 @@ macro(Libx264_set_soname)
|
||||
execute_process(
|
||||
COMMAND sh -c "otool -D '${Libx264_LIBRARY}' | grep -v '${Libx264_LIBRARY}'"
|
||||
OUTPUT_VARIABLE _output
|
||||
RESULT_VARIABLE _result)
|
||||
RESULT_VARIABLE _result
|
||||
)
|
||||
|
||||
if(_result EQUAL 0 AND _output MATCHES "^@rpath/")
|
||||
set_property(TARGET Libx264::Libx264 PROPERTY IMPORTED_SONAME "${_output}")
|
||||
@@ -63,7 +59,8 @@ macro(Libx264_set_soname)
|
||||
execute_process(
|
||||
COMMAND sh -c "objdump -p '${Libx264_LIBRARY}' | grep SONAME"
|
||||
OUTPUT_VARIABLE _output
|
||||
RESULT_VARIABLE _result)
|
||||
RESULT_VARIABLE _result
|
||||
)
|
||||
|
||||
if(_result EQUAL 0)
|
||||
string(REGEX REPLACE "[ \t]+SONAME[ \t]+([^ \t]+)" "\\1" _soname "${_output}")
|
||||
@@ -86,7 +83,8 @@ macro(Libx264_find_dll)
|
||||
Libx264_LIBRARY
|
||||
NAMES libx264-${_dll_version}.dll x264-${_dll_version}.dll libx264.dll x264.dll
|
||||
HINTS ${_implib_path} ${_bin_path}
|
||||
DOC "Libx264 DLL location")
|
||||
DOC "Libx264 DLL location"
|
||||
)
|
||||
|
||||
if(NOT Libx264_LIBRARY)
|
||||
set(Libx264_LIBRARY "${Libx264_IMPLIB}")
|
||||
@@ -101,7 +99,8 @@ find_path(
|
||||
NAMES x264.h
|
||||
HINTS ${PC_Libx264_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "Libx264 include directory")
|
||||
DOC "Libx264 include directory"
|
||||
)
|
||||
|
||||
if(PC_Libx264_VERSION VERSION_GREATER 0)
|
||||
set(Libx264_VERSION ${PC_Libx264_VERSION})
|
||||
@@ -116,10 +115,7 @@ else()
|
||||
endif()
|
||||
|
||||
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
|
||||
find_library(
|
||||
Libx264_IMPLIB
|
||||
NAMES x264 libx264
|
||||
DOC "Libx264 import library location")
|
||||
find_library(Libx264_IMPLIB NAMES x264 libx264 DOC "Libx264 import library location")
|
||||
|
||||
libx264_find_dll()
|
||||
else()
|
||||
@@ -128,7 +124,8 @@ else()
|
||||
NAMES x264 libx264
|
||||
HINTS ${PC_Libx264_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "Libx264 location")
|
||||
DOC "Libx264 location"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin|Windows")
|
||||
@@ -140,7 +137,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
Libx264
|
||||
REQUIRED_VARS Libx264_LIBRARY Libx264_INCLUDE_DIR
|
||||
VERSION_VAR Libx264_VERSION REASON_FAILURE_MESSAGE "${Libx264_ERROR_REASON}")
|
||||
VERSION_VAR Libx264_VERSION
|
||||
REASON_FAILURE_MESSAGE "${Libx264_ERROR_REASON}"
|
||||
)
|
||||
mark_as_advanced(Libx264_INCLUDE_DIR Libx264_LIBRARY Libx264_IMPLIB)
|
||||
unset(Libx264_ERROR_REASON)
|
||||
|
||||
@@ -166,16 +165,19 @@ if(Libx264_FOUND)
|
||||
libx264_set_soname()
|
||||
set_target_properties(
|
||||
Libx264::Libx264
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_Libx264_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Libx264_INCLUDE_DIR}"
|
||||
VERSION ${Libx264_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_Libx264_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Libx264_INCLUDE_DIR}"
|
||||
VERSION ${Libx264_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
Libx264 PROPERTIES
|
||||
URL "https://www.videolan.org/developers/x264.html"
|
||||
DESCRIPTION
|
||||
"x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC compression format."
|
||||
Libx264
|
||||
PROPERTIES
|
||||
URL "https://www.videolan.org/developers/x264.html"
|
||||
DESCRIPTION
|
||||
"x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC compression format."
|
||||
)
|
||||
|
||||
@@ -36,10 +36,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -53,7 +49,8 @@ macro(Luajit_set_soname)
|
||||
execute_process(
|
||||
COMMAND sh -c "otool -D '${Luajit_LIBRARY}' | grep -v '${Luajit_LIBRARY}'"
|
||||
OUTPUT_VARIABLE _output
|
||||
RESULT_VARIABLE _result)
|
||||
RESULT_VARIABLE _result
|
||||
)
|
||||
|
||||
if(_result EQUAL 0 AND _output MATCHES "^@rpath/")
|
||||
set_property(TARGET Luajit::Luajit PROPERTY IMPORTED_SONAME "${_output}")
|
||||
@@ -62,7 +59,8 @@ macro(Luajit_set_soname)
|
||||
execute_process(
|
||||
COMMAND sh -c "objdump -p '${Luajit_LIBRARY}' | grep SONAME"
|
||||
OUTPUT_VARIABLE _output
|
||||
RESULT_VARIABLE _result)
|
||||
RESULT_VARIABLE _result
|
||||
)
|
||||
|
||||
if(_result EQUAL 0)
|
||||
string(REGEX REPLACE "[ \t]+SONAME[ \t]+([^ \t]+)" "\\1" _soname "${_output}")
|
||||
@@ -80,7 +78,8 @@ find_path(
|
||||
HINTS ${PC_Luajit_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
PATH_SUFFIXES luajit-2.1 luajit-2.0 luajit
|
||||
DOC "Luajit include directory")
|
||||
DOC "Luajit include directory"
|
||||
)
|
||||
|
||||
if(PC_Luajit_VERSION VERSION_GREATER 0)
|
||||
set(Luajit_VERSION ${PC_Luajit_VERSION})
|
||||
@@ -98,7 +97,8 @@ find_library(
|
||||
NAMES luajit luajit-51 luajit-5.1 lua51
|
||||
HINTS ${PC_Luajit_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "Luajit location")
|
||||
DOC "Luajit location"
|
||||
)
|
||||
|
||||
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin|Windows")
|
||||
set(Luajit_ERROR_REASON "Ensure that obs-deps is provided as part of CMAKE_PREFIX_PATH.")
|
||||
@@ -109,7 +109,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
Luajit
|
||||
REQUIRED_VARS Luajit_LIBRARY Luajit_INCLUDE_DIR
|
||||
VERSION_VAR Luajit_VERSION REASON_FAILURE_MESSAGE "${Luajit_ERROR_REASON}")
|
||||
VERSION_VAR Luajit_VERSION
|
||||
REASON_FAILURE_MESSAGE "${Luajit_ERROR_REASON}"
|
||||
)
|
||||
mark_as_advanced(Luajit_INCLUDE_DIR Luajit_LIBRARY)
|
||||
unset(Luajit_ERROR_REASON)
|
||||
|
||||
@@ -126,14 +128,18 @@ if(Luajit_FOUND)
|
||||
luajit_set_soname()
|
||||
set_target_properties(
|
||||
Luajit::Luajit
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_Luajit_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Luajit_INCLUDE_DIR}"
|
||||
VERSION ${Luajit_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_Luajit_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Luajit_INCLUDE_DIR}"
|
||||
VERSION ${Luajit_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
Luajit PROPERTIES
|
||||
URL "https://luajit.org/luajit.html"
|
||||
DESCRIPTION "LuaJIT is a Just-In-Time Compiler (JIT) for the Lua programming language.")
|
||||
Luajit
|
||||
PROPERTIES
|
||||
URL "https://luajit.org/luajit.html"
|
||||
DESCRIPTION "LuaJIT is a Just-In-Time Compiler (JIT) for the Lua programming language."
|
||||
)
|
||||
|
||||
@@ -61,12 +61,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-lint: disable=C0307
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -80,7 +74,8 @@ macro(MbedTLS_set_soname component)
|
||||
execute_process(
|
||||
COMMAND sh -c "otool -D '${Mbed${component}_LIBRARY}' | grep -v '${Mbed${component}_LIBRARY}'"
|
||||
OUTPUT_VARIABLE _output
|
||||
RESULT_VARIABLE _result)
|
||||
RESULT_VARIABLE _result
|
||||
)
|
||||
|
||||
if(_result EQUAL 0 AND _output MATCHES "^@rpath/")
|
||||
set_property(TARGET MbedTLS::Mbed${component} PROPERTY IMPORTED_SONAME "${_output}")
|
||||
@@ -89,7 +84,8 @@ macro(MbedTLS_set_soname component)
|
||||
execute_process(
|
||||
COMMAND sh -c "objdump -p '${Mbed${component}_LIBRARY}' | grep SONAME"
|
||||
OUTPUT_VARIABLE _output
|
||||
RESULT_VARIABLE _result)
|
||||
RESULT_VARIABLE _result
|
||||
)
|
||||
|
||||
if(_result EQUAL 0)
|
||||
string(REGEX REPLACE "[ \t]+SONAME[ \t]+([^ \t]+)" "\\1" _soname "${_output}")
|
||||
@@ -106,20 +102,39 @@ find_path(
|
||||
NAMES mbedtls/ssl.h
|
||||
HINTS "${PC_MbedTLS_INCLUDE_DIRS}"
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "MbedTLS include directory")
|
||||
DOC "MbedTLS include directory"
|
||||
)
|
||||
|
||||
if(PC_MbedTLS_VERSION VERSION_GREATER 0)
|
||||
set(MbedTLS_VERSION ${PC_MbedTLS_VERSION})
|
||||
elseif(EXISTS "${MbedTLS_INCLUDE_DIR}/mbedtls/build_info.h")
|
||||
file(STRINGS "${MbedTLS_INCLUDE_DIR}/mbedtls/build_info.h" _VERSION_STRING
|
||||
REGEX "#define[ \t]+MBEDTLS_VERSION_STRING[ \t]+.+")
|
||||
string(REGEX REPLACE ".*#define[ \t]+MBEDTLS_VERSION_STRING[ \t]+\"(.+)\".*" "\\1" MbedTLS_VERSION
|
||||
"${_VERSION_STRING}")
|
||||
file(
|
||||
STRINGS
|
||||
"${MbedTLS_INCLUDE_DIR}/mbedtls/build_info.h"
|
||||
_VERSION_STRING
|
||||
REGEX "#define[ \t]+MBEDTLS_VERSION_STRING[ \t]+.+"
|
||||
)
|
||||
string(
|
||||
REGEX REPLACE
|
||||
".*#define[ \t]+MBEDTLS_VERSION_STRING[ \t]+\"(.+)\".*"
|
||||
"\\1"
|
||||
MbedTLS_VERSION
|
||||
"${_VERSION_STRING}"
|
||||
)
|
||||
elseif(EXISTS "${MbedTLS_INCLUDE_DIR}/mbedtls/version.h")
|
||||
file(STRINGS "${MbedTLS_INCLUDE_DIR}/mbedtls/version.h" _VERSION_STRING
|
||||
REGEX "#define[ \t]+MBEDTLS_VERSION_STRING[ \t]+.+")
|
||||
string(REGEX REPLACE ".*#define[ \t]+MBEDTLS_VERSION_STRING[ \t]+\"(.+)\".*" "\\1" MbedTLS_VERSION
|
||||
"${_VERSION_STRING}")
|
||||
file(
|
||||
STRINGS
|
||||
"${MbedTLS_INCLUDE_DIR}/mbedtls/version.h"
|
||||
_VERSION_STRING
|
||||
REGEX "#define[ \t]+MBEDTLS_VERSION_STRING[ \t]+.+"
|
||||
)
|
||||
string(
|
||||
REGEX REPLACE
|
||||
".*#define[ \t]+MBEDTLS_VERSION_STRING[ \t]+\"(.+)\".*"
|
||||
"\\1"
|
||||
MbedTLS_VERSION
|
||||
"${_VERSION_STRING}"
|
||||
)
|
||||
else()
|
||||
if(NOT MbedTLS_FIND_QUIETLY)
|
||||
message(AUTHOR_WARNING "Failed to find MbedTLS version.")
|
||||
@@ -132,25 +147,26 @@ find_library(
|
||||
NAMES libmbedtls mbedtls
|
||||
HINTS "${PC_MbedTLS_LIBRARY_DIRS}"
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "MbedTLS location")
|
||||
DOC "MbedTLS location"
|
||||
)
|
||||
|
||||
find_library(
|
||||
MbedCrypto_LIBRARY
|
||||
NAMES libmbedcrypto mbedcrypto
|
||||
HINTS "${PC_MbedTLS_LIBRARY_DIRS}"
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "MbedCrypto location")
|
||||
DOC "MbedCrypto location"
|
||||
)
|
||||
|
||||
find_library(
|
||||
MbedX509_LIBRARY
|
||||
NAMES libmbedx509 mbedx509
|
||||
HINTS "${PC_MbedTLS_LIBRARY_DIRS}"
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "MbedX509 location")
|
||||
DOC "MbedX509 location"
|
||||
)
|
||||
|
||||
if(MbedTLS_LIBRARY
|
||||
AND NOT MbedCrypto_LIBRARY
|
||||
AND NOT MbedX509_LIBRARY)
|
||||
if(MbedTLS_LIBRARY AND NOT MbedCrypto_LIBRARY AND NOT MbedX509_LIBRARY)
|
||||
set(CMAKE_REQUIRED_LIBRARIES "${MbedTLS_LIBRARY}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${MbedTLS_INCLUDE_DIR}")
|
||||
|
||||
@@ -170,14 +186,18 @@ if(MbedTLS_INCLUDES_X509 AND MbedTLS_INCLUDES_CRYPTO)
|
||||
find_package_handle_standard_args(
|
||||
MbedTLS
|
||||
REQUIRED_VARS MbedTLS_LIBRARY MbedTLS_INCLUDE_DIR
|
||||
VERSION_VAR MbedTLS_VERSION REASON_FAILURE_MESSAGE "${MbedTLS_ERROR_REASON}")
|
||||
VERSION_VAR MbedTLS_VERSION
|
||||
REASON_FAILURE_MESSAGE "${MbedTLS_ERROR_REASON}"
|
||||
)
|
||||
mark_as_advanced(MbedTLS_LIBRARY MbedTLS_INCLUDE_DIR)
|
||||
list(APPEND _COMPONENTS TLS)
|
||||
else()
|
||||
find_package_handle_standard_args(
|
||||
MbedTLS
|
||||
REQUIRED_VARS MbedTLS_LIBRARY MbedCrypto_LIBRARY MbedX509_LIBRARY MbedTLS_INCLUDE_DIR
|
||||
VERSION_VAR MbedTLS_VERSION REASON_FAILURE_MESSAGE "${MbedTLS_ERROR_REASON}")
|
||||
VERSION_VAR MbedTLS_VERSION
|
||||
REASON_FAILURE_MESSAGE "${MbedTLS_ERROR_REASON}"
|
||||
)
|
||||
mark_as_advanced(MbedTLS_LIBRARY MbedCrypto_LIBRARY MbedX509_LIBRARY MbedTLS_INCLUDE_DIR)
|
||||
list(APPEND _COMPONENTS TLS Crypto X509)
|
||||
endif()
|
||||
@@ -197,10 +217,12 @@ if(MbedTLS_FOUND)
|
||||
mbedtls_set_soname(${component})
|
||||
set_target_properties(
|
||||
MbedTLS::MbedTLS
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_MbedTLS_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${MbedTLS_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_OPTIONS "$<$<AND:$<PLATFORM_ID:Windows>,$<CONFIG:DEBUG>>:/NODEFAULTLIB:MSVCRT>"
|
||||
VERSION ${MbedTLS_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_MbedTLS_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${MbedTLS_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_OPTIONS "$<$<AND:$<PLATFORM_ID:Windows>,$<CONFIG:DEBUG>>:/NODEFAULTLIB:MSVCRT>"
|
||||
VERSION ${MbedTLS_VERSION}
|
||||
)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
@@ -214,8 +236,9 @@ endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
MbedTLS PROPERTIES
|
||||
URL "https://www.trustedfirmware.org/projects/mbed-tls"
|
||||
DESCRIPTION
|
||||
"A C library implementing cryptographic primitives, X.509 certificate manipulation, and the SSL/TLS and DTLS protocols."
|
||||
MbedTLS
|
||||
PROPERTIES
|
||||
URL "https://www.trustedfirmware.org/projects/mbed-tls"
|
||||
DESCRIPTION
|
||||
"A C library implementing cryptographic primitives, X.509 certificate manipulation, and the SSL/TLS and DTLS protocols."
|
||||
)
|
||||
|
||||
@@ -34,10 +34,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_path(
|
||||
@@ -45,14 +41,17 @@ find_path(
|
||||
NAMES sys/soundcard.h
|
||||
HINTS ${PC_OSS_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "OSS include directory")
|
||||
DOC "OSS include directory"
|
||||
)
|
||||
|
||||
set(OSS_VERSION ${CMAKE_HOST_SYSTEM_VERSION})
|
||||
|
||||
find_package_handle_standard_args(
|
||||
OSS
|
||||
REQUIRED_VARS OSS_INCLUDE_DIR
|
||||
VERSION_VAR OSS_VERSION REASON_FAILURE_MESSAGE "Ensure that OSS is installed on the system.")
|
||||
VERSION_VAR OSS_VERSION
|
||||
REASON_FAILURE_MESSAGE "Ensure that OSS is installed on the system."
|
||||
)
|
||||
mark_as_advanced(OSS_INCLUDE_DIR OSS_LIBRARY)
|
||||
|
||||
if(OSS_FOUND)
|
||||
|
||||
@@ -36,10 +36,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -54,7 +50,8 @@ find_path(
|
||||
HINTS ${PC_PipeWire_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES pipewire-0.3
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "PipeWire include directory")
|
||||
DOC "PipeWire include directory"
|
||||
)
|
||||
|
||||
find_path(
|
||||
Libspa_INCLUDE_DIR
|
||||
@@ -62,20 +59,26 @@ find_path(
|
||||
HINTS ${PC_Libspa_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES spa-0.2
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "Libspa include directory")
|
||||
DOC "Libspa include directory"
|
||||
)
|
||||
|
||||
find_library(
|
||||
PipeWire_LIBRARY
|
||||
NAMES pipewire-0.3
|
||||
HINTS ${PC_PipeWire_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "PipeWire location")
|
||||
DOC "PipeWire location"
|
||||
)
|
||||
|
||||
if(PC_PipeWire_VERSION VERSION_GREATER 0)
|
||||
set(PipeWire_VERSION ${PC_PipeWire_VERSION})
|
||||
elseif(EXISTS "${PipeWire_INCLUDE_DIR}/pipewire/version.h")
|
||||
file(STRINGS "${PipeWire_INCLUDE_DIR}/pipewire/version.h" _version_string
|
||||
REGEX "^.*PW_(MAJOR|MINOR|MICRO)[ \t]+[0-9]+[ \t]*$")
|
||||
file(
|
||||
STRINGS
|
||||
"${PipeWire_INCLUDE_DIR}/pipewire/version.h"
|
||||
_version_string
|
||||
REGEX "^.*PW_(MAJOR|MINOR|MICRO)[ \t]+[0-9]+[ \t]*$"
|
||||
)
|
||||
string(REGEX REPLACE ".*PW_MAJOR[ \t]+([0-9]+).*" "\\1" _version_major "${_version_string}")
|
||||
string(REGEX REPLACE ".*PW_MINOR[ \t]+([0-9]+).*" "\\1" _version_minor "${_version_string}")
|
||||
string(REGEX REPLACE ".*PW_MICRO[ \t]+([0-9]+).*" "\\1" _version_micro "${_version_string}")
|
||||
@@ -94,7 +97,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
PipeWire
|
||||
REQUIRED_VARS PipeWire_LIBRARY PipeWire_INCLUDE_DIR Libspa_INCLUDE_DIR
|
||||
VERSION_VAR PipeWire_VERSION REASON_FAILURE_MESSAGE "Ensure that PipeWire is installed on the system.")
|
||||
VERSION_VAR PipeWire_VERSION
|
||||
REASON_FAILURE_MESSAGE "Ensure that PipeWire is installed on the system."
|
||||
)
|
||||
mark_as_advanced(PipeWire_LIBRARY PipeWire_INCLUDE_DIR)
|
||||
|
||||
if(PipeWire_FOUND)
|
||||
@@ -109,14 +114,16 @@ if(PipeWire_FOUND)
|
||||
|
||||
set_target_properties(
|
||||
PipeWire::PipeWire
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_PipeWire_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${PipeWire_INCLUDE_DIR};${Libspa_INCLUDE_DIR}"
|
||||
VERSION ${PipeWire_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_PipeWire_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${PipeWire_INCLUDE_DIR};${Libspa_INCLUDE_DIR}"
|
||||
VERSION ${PipeWire_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
PipeWire PROPERTIES
|
||||
URL "https://www.pipewire.org"
|
||||
DESCRIPTION "PipeWire - multimedia processing")
|
||||
PipeWire
|
||||
PROPERTIES URL "https://www.pipewire.org" DESCRIPTION "PipeWire - multimedia processing"
|
||||
)
|
||||
|
||||
@@ -36,11 +36,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -53,22 +48,33 @@ find_path(
|
||||
NAMES pulse/pulseaudio.h
|
||||
HINTS ${PC_PulseAudio_INCLUDE_DIRS}
|
||||
PATHS /usr/include/ /usr/local/include
|
||||
DOC "PulseAudio include directory")
|
||||
DOC "PulseAudio include directory"
|
||||
)
|
||||
|
||||
find_library(
|
||||
PulseAudio_LIBRARY
|
||||
NAMES pulse
|
||||
HINTS ${PC_PulseAudio_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "PulseAudio location")
|
||||
DOC "PulseAudio location"
|
||||
)
|
||||
|
||||
if(PC_PulseAudio_VERSION VERSION_GREATER 0)
|
||||
set(PulseAudio_VERSION ${PC_PulseAudio_VERSION})
|
||||
elseif(EXISTS "${PulseAudio_INCLUDE_DIR}/version.h")
|
||||
file(STRINGS "${PulseAudio_INCLUDE_DIR}/version.h" _VERSION_STRING
|
||||
REGEX "^.*pa_get_headers_version\\(\\)[\t ]+\\(\".*\"\\)[ \t]*$")
|
||||
string(REGEX REPLACE ".*pa_get_headers_version\\(\\)[\t ]+\\(\"([^\"]*)\"\\).*" "\\1" PulseAudio_VERSION
|
||||
"${_VERSION_STRING}")
|
||||
file(
|
||||
STRINGS
|
||||
"${PulseAudio_INCLUDE_DIR}/version.h"
|
||||
_VERSION_STRING
|
||||
REGEX "^.*pa_get_headers_version\\(\\)[\t ]+\\(\".*\"\\)[ \t]*$"
|
||||
)
|
||||
string(
|
||||
REGEX REPLACE
|
||||
".*pa_get_headers_version\\(\\)[\t ]+\\(\"([^\"]*)\"\\).*"
|
||||
"\\1"
|
||||
PulseAudio_VERSION
|
||||
"${_VERSION_STRING}"
|
||||
)
|
||||
else()
|
||||
if(NOT PulseAudio_FIND_QUIETLY)
|
||||
message(AUTHOR_WARNING "Failed to find PulseAudio version.")
|
||||
@@ -79,7 +85,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
PulseAudio
|
||||
REQUIRED_VARS PulseAudio_INCLUDE_DIR PulseAudio_LIBRARY
|
||||
VERSION_VAR PulseAudio_VERSION REASON_FAILURE_MESSAGE "Ensure that PulseAudio is installed on the system.")
|
||||
VERSION_VAR PulseAudio_VERSION
|
||||
REASON_FAILURE_MESSAGE "Ensure that PulseAudio is installed on the system."
|
||||
)
|
||||
mark_as_advanced(PulseAudio_INCLUDE_DIR PulseAudio_LIBRARY)
|
||||
|
||||
if(PulseAudio_FOUND)
|
||||
@@ -94,15 +102,19 @@ if(PulseAudio_FOUND)
|
||||
|
||||
set_target_properties(
|
||||
PulseAudio::PulseAudio
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_PulseAudio_CFLAFGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${PulseAudio_INCLUDE_DIR}"
|
||||
VERSION ${PulseAudio_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_PulseAudio_CFLAFGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${PulseAudio_INCLUDE_DIR}"
|
||||
VERSION ${PulseAudio_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
PulseAudio PROPERTIES
|
||||
URL "https://www.freedesktop.org/wiki/Software/PulseAudio/"
|
||||
DESCRIPTION
|
||||
"PulseAudio is a sound server system for POSIX OSes, meaning that it is a proxy for your sound applications.")
|
||||
PulseAudio
|
||||
PROPERTIES
|
||||
URL "https://www.freedesktop.org/wiki/Software/PulseAudio/"
|
||||
DESCRIPTION
|
||||
"PulseAudio is a sound server system for POSIX OSes, meaning that it is a proxy for your sound applications."
|
||||
)
|
||||
|
||||
@@ -36,10 +36,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -52,14 +48,16 @@ find_path(
|
||||
NAMES sndio.h
|
||||
HINTS ${PC_Sndio_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "Sndio include directory")
|
||||
DOC "Sndio include directory"
|
||||
)
|
||||
|
||||
find_library(
|
||||
Sndio_LIBRARY
|
||||
NAMES sndio
|
||||
HINTS ${PC_Sndio_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "Sndio location")
|
||||
DOC "Sndio location"
|
||||
)
|
||||
|
||||
if(PC_Sndio_VERSION VERSION_GREATER 0)
|
||||
set(Sndio_VERSION ${PC_Sndio_VERSION})
|
||||
@@ -73,7 +71,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
Sndio
|
||||
REQUIRED_VARS Sndio_LIBRARY Sndio_INCLUDE_DIR
|
||||
VERSION_VAR Sndio_VERSION REASON_FAILURE_MESSAGE "Ensure that Sndio is installed on the system.")
|
||||
VERSION_VAR Sndio_VERSION
|
||||
REASON_FAILURE_MESSAGE "Ensure that Sndio is installed on the system."
|
||||
)
|
||||
mark_as_advanced(Sndio_INCLUDE_DIR Sndio_LIBRARY)
|
||||
|
||||
if(Sndio_FOUND)
|
||||
@@ -88,14 +88,18 @@ if(Sndio_FOUND)
|
||||
|
||||
set_target_properties(
|
||||
Sndio::Sndio
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_Sndio_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Sndio_INCLUDE_DIR}"
|
||||
VERSION ${Sndio_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_Sndio_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Sndio_INCLUDE_DIR}"
|
||||
VERSION ${Sndio_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
Sndio PROPERTIES
|
||||
URL "https://www.sndio.org"
|
||||
DESCRIPTION "Sndio is a small audio and MIDI framework part of the OpenBSD project and ported to FreeBSD.")
|
||||
Sndio
|
||||
PROPERTIES
|
||||
URL "https://www.sndio.org"
|
||||
DESCRIPTION "Sndio is a small audio and MIDI framework part of the OpenBSD project and ported to FreeBSD."
|
||||
)
|
||||
|
||||
@@ -36,10 +36,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -52,14 +48,16 @@ find_path(
|
||||
NAMES sys/sysinfo.h
|
||||
HINTS ${PC_Sysinfo_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "Sysinfo include directory")
|
||||
DOC "Sysinfo include directory"
|
||||
)
|
||||
|
||||
find_library(
|
||||
Sysinfo_LIBRARY
|
||||
NAMES sysinfo libsysinfo
|
||||
HINTS ${PC_Sysinfo_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "Sysinfo location")
|
||||
DOC "Sysinfo location"
|
||||
)
|
||||
|
||||
if(PC_Sysinfo_VERSION VERSION_GREATER 0)
|
||||
set(Sysinfo_VERSION ${PC_Sysinfo_VERSION})
|
||||
@@ -73,7 +71,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
Sysinfo
|
||||
REQUIRED_VARS Sysinfo_LIBRARY Sysinfo_INCLUDE_DIR
|
||||
VERSION_VAR Sysinfo_VERSION REASON_FAILURE_MESSAGE "Ensure that Sysinfo is installed on the system.")
|
||||
VERSION_VAR Sysinfo_VERSION
|
||||
REASON_FAILURE_MESSAGE "Ensure that Sysinfo is installed on the system."
|
||||
)
|
||||
mark_as_advanced(Sysinfo_INCLUDE_DIR Sysinfo_LIBRARY)
|
||||
|
||||
if(Sysinfo_FOUND)
|
||||
@@ -88,8 +88,10 @@ if(Sysinfo_FOUND)
|
||||
|
||||
set_target_properties(
|
||||
Sysinfo::Sysinfo
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_Sysinfo_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Sysinfo_INCLUDE_DIR}"
|
||||
VERSION ${Sysinfo_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_Sysinfo_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Sysinfo_INCLUDE_DIR}"
|
||||
VERSION ${Sysinfo_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -31,25 +31,25 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_path(
|
||||
Uthash_INCLUDE_DIR
|
||||
NAMES uthash.h
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "uthash include directory")
|
||||
find_path(Uthash_INCLUDE_DIR NAMES uthash.h PATHS /usr/include /usr/local/include DOC "uthash include directory")
|
||||
|
||||
if(EXISTS "${Uthash_INCLUDE_DIR}/uthash.h")
|
||||
file(STRINGS "${Uthash_INCLUDE_DIR}/uthash.h" _version_string
|
||||
REGEX "#define[ \t]+UTHASH_VERSION[ \t]+[0-9]+\\.[0-9]+\\.[0-9]+")
|
||||
file(
|
||||
STRINGS
|
||||
"${Uthash_INCLUDE_DIR}/uthash.h"
|
||||
_version_string
|
||||
REGEX "#define[ \t]+UTHASH_VERSION[ \t]+[0-9]+\\.[0-9]+\\.[0-9]+"
|
||||
)
|
||||
|
||||
string(REGEX REPLACE "#define[ \t]+UTHASH_VERSION[ \t]+([0-9]+\\.[0-9]+\\.[0-9]+)" "\\1" Uthash_VERSION
|
||||
"${_version_string}")
|
||||
string(
|
||||
REGEX REPLACE
|
||||
"#define[ \t]+UTHASH_VERSION[ \t]+([0-9]+\\.[0-9]+\\.[0-9]+)"
|
||||
"\\1"
|
||||
Uthash_VERSION
|
||||
"${_version_string}"
|
||||
)
|
||||
else()
|
||||
if(NOT Uthash_FIND_QUIETLY)
|
||||
message(AUTHOR_WARNING "Failed to find uthash version.")
|
||||
@@ -66,7 +66,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
Uthash
|
||||
REQUIRED_VARS Uthash_INCLUDE_DIR
|
||||
VERSION_VAR Uthash_VERSION REASON_FAILURE_MESSAGE "${Uthash_ERROR_REASON}")
|
||||
VERSION_VAR Uthash_VERSION
|
||||
REASON_FAILURE_MESSAGE "${Uthash_ERROR_REASON}"
|
||||
)
|
||||
mark_as_advanced(Uthash_INCLUDE_DIR)
|
||||
unset(Uthash_ERROR_REASON)
|
||||
|
||||
@@ -79,6 +81,6 @@ endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
Uthash PROPERTIES
|
||||
URL "https://troydhanson.github.io/uthash"
|
||||
DESCRIPTION "A hash table for C structures")
|
||||
Uthash
|
||||
PROPERTIES URL "https://troydhanson.github.io/uthash" DESCRIPTION "A hash table for C structures"
|
||||
)
|
||||
|
||||
+20
-20
@@ -37,11 +37,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-format: on
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_search_module(_VPL QUIET vpl)
|
||||
@@ -52,21 +47,24 @@ find_path(
|
||||
NAMES vpl/mfxstructures.h
|
||||
HINTS ${_VPL_INCLUDE_DIRS} ${_VPL_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include /opt/local/include /sw/include
|
||||
DOC "VPL include directory")
|
||||
DOC "VPL include directory"
|
||||
)
|
||||
|
||||
find_library(
|
||||
VPL_LIBRARY_RELEASE
|
||||
NAMES ${_VPL_LIBRARIES} ${_VPL_LIBRARIES} vpl
|
||||
HINTS ${_VPL_LIBRARY_DIRS} ${_VPL_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib /opt/local/lib /sw/lib
|
||||
DOC "VPL library location")
|
||||
DOC "VPL library location"
|
||||
)
|
||||
|
||||
find_library(
|
||||
VPL_LIBRARY_DEBUG
|
||||
NAMES ${_VPL_LIBRARIES} ${_VPL_LIBRARIES} vpld
|
||||
HINTS ${_VPL_LIBRARY_DIRS} ${_VPL_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib /opt/local/lib /sw/lib
|
||||
DOC "VPL debug library location")
|
||||
DOC "VPL debug library location"
|
||||
)
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(VPL)
|
||||
@@ -75,7 +73,9 @@ include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(
|
||||
VPL
|
||||
REQUIRED_VARS VPL_LIBRARY VPL_INCLUDE_DIR
|
||||
VERSION_VAR VPL_VERSION REASON_FAILURE_MESSAGE "${VPL_ERROR_REASON}")
|
||||
VERSION_VAR VPL_VERSION
|
||||
REASON_FAILURE_MESSAGE "${VPL_ERROR_REASON}"
|
||||
)
|
||||
mark_as_advanced(VPL_INCLUDE_DIR VPL_LIBRARY)
|
||||
unset(VPL_ERROR_REASON)
|
||||
|
||||
@@ -116,9 +116,11 @@ if(VPL_FOUND)
|
||||
|
||||
set_target_properties(
|
||||
VPL::VPL
|
||||
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${VPL_INCLUDE_DIRS}"
|
||||
VERSION ${VPL_VERSION}
|
||||
IMPORTED_CONFIGURATIONS Release)
|
||||
PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${VPL_INCLUDE_DIRS}"
|
||||
VERSION ${VPL_VERSION}
|
||||
IMPORTED_CONFIGURATIONS Release
|
||||
)
|
||||
|
||||
if(VPL_LIBRARY_DEBUG)
|
||||
if(IS_ABSOLUTE "${VPL_LIBRARY_DEBUG}")
|
||||
@@ -126,18 +128,16 @@ if(VPL_FOUND)
|
||||
else()
|
||||
set_target_properties(VPL::VPL PROPERTIES IMPORTED_LIBNAME_DEBUG "${VPL_LIBRARY_DEBUG}")
|
||||
endif()
|
||||
set_property(
|
||||
TARGET VPL::VPL
|
||||
APPEND
|
||||
PROPERTY IMPORTED_CONFIGURATIONS Debug)
|
||||
set_property(TARGET VPL::VPL APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
VPL PROPERTIES
|
||||
URL "https://github.com/oneapi-src/oneVPL"
|
||||
DESCRIPTION
|
||||
"Intel® oneAPI Video Processing Library (oneVPL) supports AI visual inference, media delivery, cloud gaming, and virtual desktop infrastructure use cases by providing access to hardware accelerated video decode, encode, and frame processing capabilities on Intel® GPUs."
|
||||
VPL
|
||||
PROPERTIES
|
||||
URL "https://github.com/oneapi-src/oneVPL"
|
||||
DESCRIPTION
|
||||
"Intel® oneAPI Video Processing Library (oneVPL) supports AI visual inference, media delivery, cloud gaming, and virtual desktop infrastructure use cases by providing access to hardware accelerated video decode, encode, and frame processing capabilities on Intel® GPUs."
|
||||
)
|
||||
|
||||
@@ -66,11 +66,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -97,14 +92,16 @@ macro(Wayland_find_component component)
|
||||
NAMES ${COMPONENT_LIBRARY}.h
|
||||
HINTS ${PC_Wayland_${COMPONENT_NAME}_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "Wayland ${COMPONENT_NAME} include directory")
|
||||
DOC "Wayland ${COMPONENT_NAME} include directory"
|
||||
)
|
||||
|
||||
find_library(
|
||||
Wayland_${COMPONENT_NAME}_LIBRARY
|
||||
NAMES ${COMPONENT_LIBRARY}
|
||||
HINTS ${PC_Wayland_${COMPONENT_NAME}_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "Wayland ${COMPONENT_NAME} location")
|
||||
DOC "Wayland ${COMPONENT_NAME} location"
|
||||
)
|
||||
|
||||
if(PC_Wayland_${COMPONENT_NAME}_VERSION VERSION_GREATER 0)
|
||||
set(Wayland_${COMPONENT_NAME}_VERSION ${PC_Wayland_${COMPONENT_NAME}_VERSION})
|
||||
@@ -124,8 +121,10 @@ macro(Wayland_find_component component)
|
||||
|
||||
if(IS_ABSOLUTE "${Wayland_${COMPONENT_NAME}_LIBRARY}")
|
||||
add_library(Wayland::${COMPONENT_NAME} UNKNOWN IMPORTED)
|
||||
set_property(TARGET Wayland::${COMPONENT_NAME} PROPERTY IMPORTED_LOCATION
|
||||
"${Wayland_${COMPONENT_NAME}_LIBRARY}")
|
||||
set_property(
|
||||
TARGET Wayland::${COMPONENT_NAME}
|
||||
PROPERTY IMPORTED_LOCATION "${Wayland_${COMPONENT_NAME}_LIBRARY}"
|
||||
)
|
||||
else()
|
||||
add_library(Wayland::${COMPONENT_NAME} INTERFACE IMPORTED)
|
||||
set_property(TARGET Wayland::${COMPONENT_NAME} PROPERTY IMPORTED_LIBNAME "${Wayland_${COMPONENT_NAME}_LIBRARY}")
|
||||
@@ -133,9 +132,11 @@ macro(Wayland_find_component component)
|
||||
|
||||
set_target_properties(
|
||||
Wayland::${COMPONENT_NAME}
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_Wayland_${COMPONENT_NAME}_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Wayland_${COMPONENT_NAME}_INCLUDE_DIR}"
|
||||
VERSION ${Wayland_${COMPONENT_NAME}_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_Wayland_${COMPONENT_NAME}_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Wayland_${COMPONENT_NAME}_INCLUDE_DIR}"
|
||||
VERSION ${Wayland_${COMPONENT_NAME}_VERSION}
|
||||
)
|
||||
list(APPEND Wayland_COMPONENTS Wayland::${COMPONENT_NAME})
|
||||
list(APPEND Wayland_INCLUDE_DIRS ${Wayland_${COMPONENT_NAME}_INCLUDE_DIR})
|
||||
list(APPEND Wayland_LIBRARIES ${Wayland_${COMPONENT_NAME}_LIBRARY})
|
||||
@@ -163,15 +164,18 @@ find_package_handle_standard_args(
|
||||
Wayland
|
||||
REQUIRED_VARS Wayland_LIBRARIES Wayland_INCLUDE_DIRS
|
||||
VERSION_VAR Wayland_VERSION
|
||||
HANDLE_COMPONENTS REASON_FAILURE_MESSAGE "Ensure that Wayland is installed on the system.")
|
||||
HANDLE_COMPONENTS
|
||||
REASON_FAILURE_MESSAGE "Ensure that Wayland is installed on the system."
|
||||
)
|
||||
|
||||
unset(_Wayland_DEFAULT_COMPONENTS)
|
||||
unset(_Wayland_LIBRARIES)
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
Wayland PROPERTIES
|
||||
URL "https://wayland.freedesktop.org"
|
||||
DESCRIPTION
|
||||
"A replacement for the X11 window system protocol and architecture with the aim to be easier to develop, extend, and maintain."
|
||||
Wayland
|
||||
PROPERTIES
|
||||
URL "https://wayland.freedesktop.org"
|
||||
DESCRIPTION
|
||||
"A replacement for the X11 window system protocol and architecture with the aim to be easier to develop, extend, and maintain."
|
||||
)
|
||||
|
||||
@@ -31,22 +31,22 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_path(
|
||||
Websocketpp_INCLUDE_DIR
|
||||
NAMES websocketpp/client.hpp
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "WebSocket++ include directory")
|
||||
DOC "WebSocket++ include directory"
|
||||
)
|
||||
|
||||
if(EXISTS "${Websocketpp_INCLUDE_DIR}/websocketpp/version.hpp")
|
||||
file(STRINGS "${Websocketpp_INCLUDE_DIR}/websocketpp/version.hpp" _version_string
|
||||
REGEX "^.*(major|minor|patch)_version[ \t]+=[ \t]+[0-9]+")
|
||||
file(
|
||||
STRINGS
|
||||
"${Websocketpp_INCLUDE_DIR}/websocketpp/version.hpp"
|
||||
_version_string
|
||||
REGEX "^.*(major|minor|patch)_version[ \t]+=[ \t]+[0-9]+"
|
||||
)
|
||||
|
||||
string(REGEX REPLACE ".*major_version[ \t]+=[ \t]+([0-9]+).*" "\\1" _version_major "${_version_string}")
|
||||
string(REGEX REPLACE ".*minor_version[ \t]+=[ \t]+([0-9]+).*" "\\1" _version_minor "${_version_string}")
|
||||
@@ -72,20 +72,26 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
Websocketpp
|
||||
REQUIRED_VARS Websocketpp_INCLUDE_DIR
|
||||
VERSION_VAR Websocketpp_VERSION REASON_FAILURE_MESSAGE "${Websocketpp_ERROR_REASON}")
|
||||
VERSION_VAR Websocketpp_VERSION
|
||||
REASON_FAILURE_MESSAGE "${Websocketpp_ERROR_REASON}"
|
||||
)
|
||||
mark_as_advanced(Websocketpp_INCLUDE_DIR)
|
||||
unset(Websocketpp_ERROR_REASON)
|
||||
|
||||
if(Websocketpp_FOUND)
|
||||
if(NOT TARGET Websocketpp::Websocketpp)
|
||||
add_library(Websocketpp::Websocketpp INTERFACE IMPORTED)
|
||||
set_target_properties(Websocketpp::Websocketpp PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
|
||||
"${Websocketpp_INCLUDE_DIR}")
|
||||
set_target_properties(
|
||||
Websocketpp::Websocketpp
|
||||
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${Websocketpp_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
Websocketpp PROPERTIES
|
||||
URL "https://www.zaphoyd.com/websocketpp/"
|
||||
DESCRIPTION "WebSocket++ is a header only C++ library that implements RFC6455 The WebSocket Protocol.")
|
||||
Websocketpp
|
||||
PROPERTIES
|
||||
URL "https://www.zaphoyd.com/websocketpp/"
|
||||
DESCRIPTION "WebSocket++ is a header only C++ library that implements RFC6455 The WebSocket Protocol."
|
||||
)
|
||||
|
||||
@@ -36,11 +36,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -53,14 +48,16 @@ find_path(
|
||||
NAMES X11/Xlib-xcb.h
|
||||
HINTS ${PC_X11-xcb_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "X11-xcb include directory")
|
||||
DOC "X11-xcb include directory"
|
||||
)
|
||||
|
||||
find_library(
|
||||
X11-xcb_LIBRARY
|
||||
NAMES X11-xcb
|
||||
HINTS ${PC_x11-xcb-LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "X11-xcb location")
|
||||
DOC "X11-xcb location"
|
||||
)
|
||||
|
||||
if(PC_X11-xcb_VERSION VERSION_GREATER 0)
|
||||
set(X11-xcb_VERSION ${PC_X11-xcb_VERSION})
|
||||
@@ -74,7 +71,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
X11-xcb
|
||||
REQUIRED_VARS X11-xcb_LIBRARY X11-xcb_INCLUDE_DIR
|
||||
VERSION_VAR X11-xcb_VERSION REASON_FAILURE_MESSAGE "Ensure that X11-xcb is installed on the system.")
|
||||
VERSION_VAR X11-xcb_VERSION
|
||||
REASON_FAILURE_MESSAGE "Ensure that X11-xcb is installed on the system."
|
||||
)
|
||||
mark_as_advanced(X11-xcb_INCLUDE_DIR X11-xcb_LIBRARY)
|
||||
|
||||
if(X11-xcb_FOUND)
|
||||
@@ -89,16 +88,19 @@ if(X11-xcb_FOUND)
|
||||
|
||||
set_target_properties(
|
||||
X11::x11-xcb
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_X11-xcb_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${X11-xcb_INCLUDE_DIR}"
|
||||
VERSION ${X11-xcb_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_X11-xcb_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${X11-xcb_INCLUDE_DIR}"
|
||||
VERSION ${X11-xcb_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
X11-xcb PROPERTIES
|
||||
URL "https://www.X.org"
|
||||
DESCRIPTION
|
||||
"Provides functions needed by clients which take advantage of Xlib/XCB to mix calls to both Xlib and XCB over the same X connection."
|
||||
X11-xcb
|
||||
PROPERTIES
|
||||
URL "https://www.X.org"
|
||||
DESCRIPTION
|
||||
"Provides functions needed by clients which take advantage of Xlib/XCB to mix calls to both Xlib and XCB over the same X connection."
|
||||
)
|
||||
|
||||
+21
-18
@@ -134,12 +134,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-lint: disable=R0915
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -167,7 +161,8 @@ list(
|
||||
xcb-xtest
|
||||
xcb-xv
|
||||
xcb-xinput
|
||||
xcb-xinerama)
|
||||
xcb-xinerama
|
||||
)
|
||||
list(
|
||||
APPEND
|
||||
_Xcb_HEADERS
|
||||
@@ -191,7 +186,8 @@ list(
|
||||
xtest.h
|
||||
xv.h
|
||||
xinput.h
|
||||
xinerama.h)
|
||||
xinerama.h
|
||||
)
|
||||
|
||||
if(NOT Xcb_FIND_COMPONENTS)
|
||||
set(Xcb_FIND_COMPONENTS ${_Xcb_DEFAULT_COMPONENTS})
|
||||
@@ -212,14 +208,16 @@ macro(Xcb_find_component component)
|
||||
NAMES "xcb/${COMPONENT_HEADER}"
|
||||
HINTS ${PC_Xcb_${COMPONENT_NAME}_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
DOC "XCB component ${COMPONENT_NAME} include directory")
|
||||
DOC "XCB component ${COMPONENT_NAME} include directory"
|
||||
)
|
||||
|
||||
find_library(
|
||||
Xcb_${COMPONENT_NAME}_LIBRARY
|
||||
NAMES "${COMPONENT_NAME}"
|
||||
HINTS ${PC_Xcb_${COMPONENT_NAME}_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "XCB component ${COMPONENT_NAME} location")
|
||||
DOC "XCB component ${COMPONENT_NAME} location"
|
||||
)
|
||||
|
||||
if(PC_Xcb_${COMPONENT_NAME}_VERSION VERSION_GREATER 0)
|
||||
set(Xcb_${COMPONENT_NAME}_VERSION ${PC_Xcb_${COMPONENT_NAME}_VERSION})
|
||||
@@ -247,9 +245,11 @@ macro(Xcb_find_component component)
|
||||
|
||||
set_target_properties(
|
||||
xcb::${COMPONENT_NAME}
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_Xcb_${COMPONENT_NAME}_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Xcb_${COMPONENT_NAME}_INCLUDE_DIR}"
|
||||
VERSION ${Xcb_${COMPONENT_NAME}_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_Xcb_${COMPONENT_NAME}_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Xcb_${COMPONENT_NAME}_INCLUDE_DIR}"
|
||||
VERSION ${Xcb_${COMPONENT_NAME}_VERSION}
|
||||
)
|
||||
list(APPEND Xcb_COMPONENTS xcb::${COMPONENT_NAME})
|
||||
list(APPEND Xcb_LIBRARIES ${Xcb_${COMPONENT_NAME}_LIBRARY})
|
||||
list(APPEND Xcb_INCLUDE_DIRS ${Xcb_${COMPONENT_NAME}_INCLUDE_DIR})
|
||||
@@ -288,15 +288,18 @@ find_package_handle_standard_args(
|
||||
Xcb
|
||||
REQUIRED_VARS Xcb_LIBRARIES Xcb_INCLUDE_DIRS
|
||||
VERSION_VAR Xcb_VERSION
|
||||
HANDLE_COMPONENTS REASON_FAILURE_MESSAGE "Ensure xcb is installed on the system.")
|
||||
HANDLE_COMPONENTS
|
||||
REASON_FAILURE_MESSAGE "Ensure xcb is installed on the system."
|
||||
)
|
||||
|
||||
unset(_Xcb_DEFAULT_COMPONENTS)
|
||||
unset(_Xcb_HEADERS)
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
Xcb PROPERTIES
|
||||
URL "https://xcb.freedesktop.org"
|
||||
DESCRIPTION
|
||||
"A replacement for Xlib featuring a small footprint, latency hiding, direct access to the protocol, improved threading support, and extensibility."
|
||||
Xcb
|
||||
PROPERTIES
|
||||
URL "https://xcb.freedesktop.org"
|
||||
DESCRIPTION
|
||||
"A replacement for Xlib featuring a small footprint, latency hiding, direct access to the protocol, improved threading support, and extensibility."
|
||||
)
|
||||
|
||||
@@ -36,11 +36,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -54,14 +49,16 @@ find_path(
|
||||
HINTS ${PC_Xkbcommon_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
PATH_SUFFIXES xkbcommon
|
||||
DOC "xkbcommon include directory")
|
||||
DOC "xkbcommon include directory"
|
||||
)
|
||||
|
||||
find_library(
|
||||
Xkbcommon_LIBRARY
|
||||
NAMES xkbcommon libxkbcommon
|
||||
HINTS ${PC_Xkbcommon_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "xkbcommon location")
|
||||
DOC "xkbcommon location"
|
||||
)
|
||||
|
||||
if(PC_Xkbcommon_VERSION VERSION_GREATER 0)
|
||||
set(Xkbcommon_VERSION ${PC_Xkbcommon_VERSION})
|
||||
@@ -75,7 +72,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
Xkbcommon
|
||||
REQUIRED_VARS Xkbcommon_LIBRARY Xkbcommon_INCLUDE_DIR
|
||||
VERSION_VAR Xkbcommon_VERSION REASON_FAILURE_MESSAGE "Ensure that xkbcommon is installed on the system.")
|
||||
VERSION_VAR Xkbcommon_VERSION
|
||||
REASON_FAILURE_MESSAGE "Ensure that xkbcommon is installed on the system."
|
||||
)
|
||||
mark_as_advanced(Xkbcommon_INCLUDE_DIR Xkbcommon_LIBRARY)
|
||||
|
||||
if(Xkbcommon_FOUND)
|
||||
@@ -90,16 +89,19 @@ if(Xkbcommon_FOUND)
|
||||
|
||||
set_target_properties(
|
||||
xkbcommon::xkbcommon
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_Xkbcommon_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Xkbcommon_INCLUDE_DIR}"
|
||||
VERSION ${Xkbcommon_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_Xkbcommon_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Xkbcommon_INCLUDE_DIR}"
|
||||
VERSION ${Xkbcommon_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
Xkbcommon PROPERTIES
|
||||
URL "https://www.xkbcommon.org"
|
||||
DESCRIPTION
|
||||
"A library for handling of keyboard descriptions, including loading them from disk, parsing them and handling their state."
|
||||
Xkbcommon
|
||||
PROPERTIES
|
||||
URL "https://www.xkbcommon.org"
|
||||
DESCRIPTION
|
||||
"A library for handling of keyboard descriptions, including loading them from disk, parsing them and handling their state."
|
||||
)
|
||||
|
||||
@@ -36,10 +36,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -53,7 +49,8 @@ macro(jansson_set_soname)
|
||||
execute_process(
|
||||
COMMAND sh -c "otool -D '${jansson_LIBRARY}' | grep -v '${jansson_LIBRARY}'"
|
||||
OUTPUT_VARIABLE _output
|
||||
RESULT_VARIABLE _result)
|
||||
RESULT_VARIABLE _result
|
||||
)
|
||||
|
||||
if(_result EQUAL 0 AND _output MATCHES "^@rpath/")
|
||||
set_property(TARGET jansson::jansson PROPERTY IMPORTED_SONAME "${_output}")
|
||||
@@ -62,7 +59,8 @@ macro(jansson_set_soname)
|
||||
execute_process(
|
||||
COMMAND sh -c "objdump -p '${jansson_LIBRARY}' | grep SONAME"
|
||||
OUTPUT_VARIABLE _output
|
||||
RESULT_VARIABLE _result)
|
||||
RESULT_VARIABLE _result
|
||||
)
|
||||
|
||||
if(_result EQUAL 0)
|
||||
string(REGEX REPLACE "[ \t]+SONAME[ \t]+([^ \t]+)" "\\1" _soname "${_output}")
|
||||
@@ -80,7 +78,8 @@ find_path(
|
||||
HINTS ${PC_jansson_INCLUDE_DIR}
|
||||
PATHS /usr/include /usr/local/include
|
||||
PATH_SUFFIXES jansson-2.1
|
||||
DOC "jansson include directory")
|
||||
DOC "jansson include directory"
|
||||
)
|
||||
|
||||
if(PC_jansson_VERSION VERSION_GREATER 0)
|
||||
set(jansson_VERSION ${PC_jansson_VERSION})
|
||||
@@ -99,7 +98,8 @@ find_library(
|
||||
NAMES jansson
|
||||
HINTS ${PC_jansson_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "jansson location")
|
||||
DOC "jansson location"
|
||||
)
|
||||
|
||||
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin|Windows")
|
||||
set(jansson_ERROR_REASON "Ensure that obs-deps is provided as part of CMAKE_PREFIX_PATH.")
|
||||
@@ -110,7 +110,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
jansson
|
||||
REQUIRED_VARS jansson_LIBRARY jansson_INCLUDE_DIR
|
||||
VERSION_VAR jansson_VERSION REASON_FAILURE_MESSAGE "${jansson_ERROR_REASON}")
|
||||
VERSION_VAR jansson_VERSION
|
||||
REASON_FAILURE_MESSAGE "${jansson_ERROR_REASON}"
|
||||
)
|
||||
mark_as_advanced(jansson_INCLUDE_DIR jansson_LIBRARY)
|
||||
unset(jansson_ERROR_REASON)
|
||||
|
||||
@@ -127,14 +129,18 @@ if(jansson_FOUND)
|
||||
jansson_set_soname()
|
||||
set_target_properties(
|
||||
jansson::jansson
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_jansson_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${jansson_INCLUDE_DIR}"
|
||||
VERSION ${jansson_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_jansson_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${jansson_INCLUDE_DIR}"
|
||||
VERSION ${jansson_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
jansson PROPERTIES
|
||||
URL "https://www.digip.org/jansson/"
|
||||
DESCRIPTION "A C library for encoding, decoding, and manipulating JSON data.")
|
||||
jansson
|
||||
PROPERTIES
|
||||
URL "https://www.digip.org/jansson/"
|
||||
DESCRIPTION "A C library for encoding, decoding, and manipulating JSON data."
|
||||
)
|
||||
|
||||
@@ -33,11 +33,6 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
@@ -51,7 +46,8 @@ macro(qrcodegencpp_set_soname)
|
||||
execute_process(
|
||||
COMMAND sh -c "otool -D '${qrcodegencpp_LIBRARY}' | grep -v '${qrcodegencpp_LIBRARY}'"
|
||||
OUTPUT_VARIABLE _output
|
||||
RESULT_VARIABLE _result)
|
||||
RESULT_VARIABLE _result
|
||||
)
|
||||
|
||||
if(_result EQUAL 0 AND _output MATCHES "^@rpath/")
|
||||
set_property(TARGET qrcodegencpp::qrcodegencpp PROPERTY IMPORTED_SONAME "${_output}")
|
||||
@@ -60,7 +56,8 @@ macro(qrcodegencpp_set_soname)
|
||||
execute_process(
|
||||
COMMAND sh -c "${CMAKE_OBJDUMP} -p '${qrcodegencpp_LIBRARY}' | grep SONAME"
|
||||
OUTPUT_VARIABLE _output
|
||||
RESULT_VARIABLE _result)
|
||||
RESULT_VARIABLE _result
|
||||
)
|
||||
|
||||
if(_result EQUAL 0)
|
||||
string(REGEX REPLACE "[ \t]+SONAME[ \t]+([^ \t]+)" "\\1" _soname "${_output}")
|
||||
@@ -83,7 +80,8 @@ macro(qrcodegencpp_find_dll)
|
||||
qrcodegencpp_LIBRARY
|
||||
NAMES qrcodegencpp.dll
|
||||
HINTS ${_implib_path} ${_bin_path}
|
||||
DOC "qrcodegencpp DLL location")
|
||||
DOC "qrcodegencpp DLL location"
|
||||
)
|
||||
|
||||
if(NOT qrcodegencpp_LIBRARY)
|
||||
set(qrcodegencpp_LIBRARY "${qrcodegencpp_IMPLIB}")
|
||||
@@ -99,7 +97,8 @@ find_path(
|
||||
HINTS ${PC_qrcodegencpp_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include
|
||||
PATH_SUFFIXES qrcodegencpp qrcodegen
|
||||
DOC "qrcodegencpp include directory")
|
||||
DOC "qrcodegencpp include directory"
|
||||
)
|
||||
|
||||
if(PC_qrcodegencpp_VERSION VERSION_GREATER 0)
|
||||
set(qrcodegencpp_VERSION ${PC_qrcodegencpp_VERSION})
|
||||
@@ -111,10 +110,7 @@ else()
|
||||
endif()
|
||||
|
||||
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
|
||||
find_library(
|
||||
qrcodegencpp_IMPLIB
|
||||
NAMES qrcodegencpp qrcodegencpp
|
||||
DOC "qrcodegencpp import library location")
|
||||
find_library(qrcodegencpp_IMPLIB NAMES qrcodegencpp qrcodegencpp DOC "qrcodegencpp import library location")
|
||||
|
||||
qrcodegencpp_find_dll()
|
||||
else()
|
||||
@@ -123,7 +119,8 @@ else()
|
||||
NAMES qrcodegencpp qrcodegencpp
|
||||
HINTS ${PC_qrcodegencpp_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
DOC "qrcodegencpp location")
|
||||
DOC "qrcodegencpp location"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin|Windows")
|
||||
@@ -135,7 +132,9 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
qrcodegencpp
|
||||
REQUIRED_VARS qrcodegencpp_LIBRARY qrcodegencpp_INCLUDE_DIR
|
||||
VERSION_VAR qrcodegencpp_VERSION REASON_FAILURE_MESSAGE "${qrcodegencpp_ERROR_REASON}")
|
||||
VERSION_VAR qrcodegencpp_VERSION
|
||||
REASON_FAILURE_MESSAGE "${qrcodegencpp_ERROR_REASON}"
|
||||
)
|
||||
mark_as_advanced(qrcodegencpp_INCLUDE_DIR qrcodegencpp_LIBRARY qrcodegencpp_IMPLIB)
|
||||
unset(qrcodegencpp_ERROR_REASON)
|
||||
|
||||
@@ -161,14 +160,18 @@ if(qrcodegencpp_FOUND)
|
||||
qrcodegencpp_set_soname()
|
||||
set_target_properties(
|
||||
qrcodegencpp::qrcodegencpp
|
||||
PROPERTIES INTERFACE_COMPILE_OPTIONS "${PC_qrcodegencpp_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${qrcodegencpp_INCLUDE_DIR}"
|
||||
VERSION ${qrcodegencpp_VERSION})
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_qrcodegencpp_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${qrcodegencpp_INCLUDE_DIR}"
|
||||
VERSION ${qrcodegencpp_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
qrcodegencpp PROPERTIES
|
||||
URL "https://www.nayuki.io/page/qr-code-generator-library"
|
||||
DESCRIPTION "This project aims to be the best, clearest library for generating QR Codes in C++.")
|
||||
qrcodegencpp
|
||||
PROPERTIES
|
||||
URL "https://www.nayuki.io/page/qr-code-generator-library"
|
||||
DESCRIPTION "This project aims to be the best, clearest library for generating QR Codes in C++."
|
||||
)
|
||||
|
||||
@@ -9,36 +9,37 @@ option(ENABLE_COMPILER_TRACE "Enable Clang time-trace (requires Clang and Ninja)
|
||||
mark_as_advanced(ENABLE_COMPILER_TRACE)
|
||||
|
||||
# gcc options for C
|
||||
set(_obs_gcc_c_options
|
||||
# cmake-format: sortable
|
||||
$<$<BOOL:${OBS_COMPILE_DEPRECATION_AS_WARNING}>:-Wno-error=deprecated-declarations>
|
||||
-fno-strict-aliasing
|
||||
-fopenmp-simd
|
||||
-Wdeprecated-declarations
|
||||
-Wempty-body
|
||||
-Wenum-conversion
|
||||
-Werror=return-type
|
||||
-Wextra
|
||||
-Wformat
|
||||
-Wformat-security
|
||||
-Wno-conversion
|
||||
-Wno-float-conversion
|
||||
-Wno-implicit-fallthrough
|
||||
-Wno-missing-braces
|
||||
-Wno-missing-field-initializers
|
||||
-Wno-shadow
|
||||
-Wno-sign-conversion
|
||||
-Wno-trigraphs
|
||||
-Wno-unknown-pragmas
|
||||
-Wno-unused-function
|
||||
-Wno-unused-label
|
||||
-Wparentheses
|
||||
-Wuninitialized
|
||||
-Wunreachable-code
|
||||
-Wunused-parameter
|
||||
-Wunused-value
|
||||
-Wunused-variable
|
||||
-Wvla)
|
||||
set(
|
||||
_obs_gcc_c_options
|
||||
$<$<BOOL:${OBS_COMPILE_DEPRECATION_AS_WARNING}>:-Wno-error=deprecated-declarations>
|
||||
-fno-strict-aliasing
|
||||
-fopenmp-simd
|
||||
-Wdeprecated-declarations
|
||||
-Wempty-body
|
||||
-Wenum-conversion
|
||||
-Werror=return-type
|
||||
-Wextra
|
||||
-Wformat
|
||||
-Wformat-security
|
||||
-Wno-conversion
|
||||
-Wno-float-conversion
|
||||
-Wno-implicit-fallthrough
|
||||
-Wno-missing-braces
|
||||
-Wno-missing-field-initializers
|
||||
-Wno-shadow
|
||||
-Wno-sign-conversion
|
||||
-Wno-trigraphs
|
||||
-Wno-unknown-pragmas
|
||||
-Wno-unused-function
|
||||
-Wno-unused-label
|
||||
-Wparentheses
|
||||
-Wuninitialized
|
||||
-Wunreachable-code
|
||||
-Wunused-parameter
|
||||
-Wunused-value
|
||||
-Wunused-variable
|
||||
-Wvla
|
||||
)
|
||||
|
||||
add_compile_options(
|
||||
-fopenmp-simd
|
||||
@@ -47,12 +48,15 @@ add_compile_options(
|
||||
"$<$<COMPILE_LANG_AND_ID:CXX,GNU>:${_obs_gcc_c_options}>"
|
||||
"$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Winvalid-offsetof;-Wno-overloaded-virtual>"
|
||||
"$<$<COMPILE_LANG_AND_ID:C,Clang>:${_obs_clang_c_options}>"
|
||||
"$<$<COMPILE_LANG_AND_ID:CXX,Clang>:${_obs_clang_cxx_options}>")
|
||||
"$<$<COMPILE_LANG_AND_ID:CXX,Clang>:${_obs_clang_cxx_options}>"
|
||||
)
|
||||
|
||||
# Add support for color diagnostics and CMake switch for warnings as errors to CMake < 3.24
|
||||
if(CMAKE_VERSION VERSION_LESS 3.24.0)
|
||||
add_compile_options($<$<COMPILE_LANG_AND_ID:C,Clang>:-fcolor-diagnostics>
|
||||
$<$<COMPILE_LANG_AND_ID:CXX,Clang>:-fcolor-diagnostics>)
|
||||
add_compile_options(
|
||||
$<$<COMPILE_LANG_AND_ID:C,Clang>:-fcolor-diagnostics>
|
||||
$<$<COMPILE_LANG_AND_ID:CXX,Clang>:-fcolor-diagnostics>
|
||||
)
|
||||
if(CMAKE_COMPILE_WARNING_AS_ERROR)
|
||||
add_compile_options(-Werror)
|
||||
endif()
|
||||
@@ -82,9 +86,7 @@ endif()
|
||||
if(ENABLE_COMPILER_TRACE AND CMAKE_GENERATOR STREQUAL "Ninja")
|
||||
add_compile_options($<$<COMPILE_LANG_AND_ID:C,Clang>:-ftime-trace> $<$<COMPILE_LANG_AND_ID:CXX,Clang>:-ftime-trace>)
|
||||
else()
|
||||
set(ENABLE_COMPILER_TRACE
|
||||
OFF
|
||||
CACHE STRING "Enable Clang time-trace (required Clang and Ninja)" FORCE)
|
||||
set(ENABLE_COMPILER_TRACE OFF CACHE STRING "Enable Clang time-trace (required Clang and Ninja)" FORCE)
|
||||
endif()
|
||||
|
||||
add_compile_definitions($<$<CONFIG:DEBUG>:DEBUG> $<$<CONFIG:DEBUG>:_DEBUG> SIMDE_ENABLE_OPENMP)
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
# OBS CMake Linux CPack configuration module
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-format: on
|
||||
|
||||
include_guard(GLOBAL)
|
||||
|
||||
include(cpackconfig_common)
|
||||
@@ -35,35 +31,36 @@ elseif(OS_FREEBSD)
|
||||
set(CPACK_FREEBSD_PACKAGE_MAINTAINER "${OBS_COMPANY_NAME}")
|
||||
set(CPACK_FREEBSD_PACKAGE_LICENSE "GPLv2")
|
||||
|
||||
set(CPACK_FREEBSD_PACKAGE_DEPS
|
||||
# cmake-format: sortable
|
||||
"audio/alsa-lib"
|
||||
"audio/fdk-aac"
|
||||
"audio/jack"
|
||||
"audio/pulseaudio"
|
||||
"audio/sndio"
|
||||
"devel/jansson"
|
||||
"devel/libpci"
|
||||
"devel/libsysinfo"
|
||||
"devel/nlohmann-json"
|
||||
"devel/qt6-base"
|
||||
"devel/qt6-svg"
|
||||
"devel/swig"
|
||||
"devel/websocketpp"
|
||||
"ftp/curl"
|
||||
"graphics/mesa-libs"
|
||||
"graphics/qr-code-generator"
|
||||
"lang/luajit"
|
||||
"lang/python39"
|
||||
"misc/e2fsprogs-libuuid"
|
||||
"multimedia/ffmpeg"
|
||||
"multimedia/librist"
|
||||
"multimedia/pipewire"
|
||||
"multimedia/v4l_compat"
|
||||
"multimedia/vlc"
|
||||
"net/asio"
|
||||
"www/libdatachannel"
|
||||
"www/srt")
|
||||
set(
|
||||
CPACK_FREEBSD_PACKAGE_DEPS
|
||||
"audio/alsa-lib"
|
||||
"audio/fdk-aac"
|
||||
"audio/jack"
|
||||
"audio/pulseaudio"
|
||||
"audio/sndio"
|
||||
"devel/jansson"
|
||||
"devel/libpci"
|
||||
"devel/libsysinfo"
|
||||
"devel/nlohmann-json"
|
||||
"devel/qt6-base"
|
||||
"devel/qt6-svg"
|
||||
"devel/swig"
|
||||
"devel/websocketpp"
|
||||
"ftp/curl"
|
||||
"graphics/mesa-libs"
|
||||
"graphics/qr-code-generator"
|
||||
"lang/luajit"
|
||||
"lang/python39"
|
||||
"misc/e2fsprogs-libuuid"
|
||||
"multimedia/ffmpeg"
|
||||
"multimedia/librist"
|
||||
"multimedia/pipewire"
|
||||
"multimedia/v4l_compat"
|
||||
"multimedia/vlc"
|
||||
"net/asio"
|
||||
"www/libdatachannel"
|
||||
"www/srt"
|
||||
)
|
||||
endif()
|
||||
|
||||
include(CPack)
|
||||
|
||||
+98
-72
@@ -1,9 +1,5 @@
|
||||
# OBS CMake Linux helper functions module
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-format: on
|
||||
|
||||
include_guard(GLOBAL)
|
||||
|
||||
include(helpers_common)
|
||||
@@ -31,10 +27,12 @@ function(set_target_properties_obs target)
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E make_directory "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE:${target}>"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}"
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE:${target}>"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}"
|
||||
COMMENT "Copy ${target} to binary directory"
|
||||
VERBATIM)
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
if(target STREQUAL obs-studio)
|
||||
get_property(obs_executables GLOBAL PROPERTY _OBS_EXECUTABLES)
|
||||
@@ -42,7 +40,8 @@ function(set_target_properties_obs target)
|
||||
add_dependencies(${target} ${obs_executables} ${obs_modules})
|
||||
|
||||
target_add_resource(${target} "${CMAKE_CURRENT_SOURCE_DIR}/../AUTHORS"
|
||||
"${OBS_DATA_DESTINATION}/obs-studio/authors")
|
||||
"${OBS_DATA_DESTINATION}/obs-studio/authors"
|
||||
)
|
||||
elseif(target STREQUAL browser-helper)
|
||||
set_property(GLOBAL APPEND PROPERTY _OBS_EXECUTABLES ${target})
|
||||
return()
|
||||
@@ -50,39 +49,47 @@ function(set_target_properties_obs target)
|
||||
set_property(GLOBAL APPEND PROPERTY _OBS_EXECUTABLES ${target})
|
||||
endif()
|
||||
|
||||
set_target_properties(${target} PROPERTIES BUILD_RPATH "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_LIBRARY_DESTINATION}"
|
||||
INSTALL_RPATH "${OBS_EXECUTABLE_RPATH}")
|
||||
set_target_properties(
|
||||
${target}
|
||||
PROPERTIES
|
||||
BUILD_RPATH "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_LIBRARY_DESTINATION}"
|
||||
INSTALL_RPATH "${OBS_EXECUTABLE_RPATH}"
|
||||
)
|
||||
elseif(target_type STREQUAL SHARED_LIBRARY)
|
||||
set_target_properties(
|
||||
${target}
|
||||
PROPERTIES VERSION ${OBS_VERSION_CANONICAL}
|
||||
SOVERSION ${OBS_VERSION_MAJOR}
|
||||
BUILD_RPATH "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_LIBRARY_DESTINATION}"
|
||||
INSTALL_RPATH "${OBS_LIBRARY_RPATH}")
|
||||
PROPERTIES
|
||||
VERSION ${OBS_VERSION_CANONICAL}
|
||||
SOVERSION ${OBS_VERSION_MAJOR}
|
||||
BUILD_RPATH "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_LIBRARY_DESTINATION}"
|
||||
INSTALL_RPATH "${OBS_LIBRARY_RPATH}"
|
||||
)
|
||||
|
||||
install(
|
||||
TARGETS ${target}
|
||||
LIBRARY DESTINATION "${OBS_LIBRARY_DESTINATION}" COMPONENT Runtime
|
||||
PUBLIC_HEADER
|
||||
DESTINATION "${OBS_INCLUDE_DESTINATION}"
|
||||
COMPONENT Development
|
||||
EXCLUDE_FROM_ALL)
|
||||
PUBLIC_HEADER DESTINATION "${OBS_INCLUDE_DESTINATION}" COMPONENT Development EXCLUDE_FROM_ALL
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E make_directory "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_LIBRARY_DESTINATION}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE:${target}>"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_LIBRARY_DESTINATION}/"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_SONAME_FILE:${target}>"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_LIBRARY_DESTINATION}/"
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE:${target}>"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_LIBRARY_DESTINATION}/"
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_SONAME_FILE:${target}>"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_LIBRARY_DESTINATION}/"
|
||||
COMMENT "Copy ${target} to library directory (${OBS_LIBRARY_DESTINATION})"
|
||||
VERBATIM)
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
if(target STREQUAL libobs OR target STREQUAL obs-frontend-api)
|
||||
install(
|
||||
FILES "$<TARGET_FILE_DIR:${target}>/$<TARGET_FILE_PREFIX:${target}>$<TARGET_FILE_BASE_NAME:${target}>.so.0"
|
||||
DESTINATION "${OBS_LIBRARY_DESTINATION}")
|
||||
DESTINATION "${OBS_LIBRARY_DESTINATION}"
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
@@ -95,19 +102,21 @@ function(set_target_properties_obs target)
|
||||
"${CMAKE_COMMAND}" -E copy_if_different
|
||||
"$<TARGET_FILE_DIR:${target}>/$<TARGET_FILE_PREFIX:${target}>$<TARGET_FILE_BASE_NAME:${target}>.so.0"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_LIBRARY_DESTINATION}"
|
||||
COMMENT "Create symlink for legacy ${target}")
|
||||
COMMENT "Create symlink for legacy ${target}"
|
||||
)
|
||||
endif()
|
||||
|
||||
elseif(target_type STREQUAL MODULE_LIBRARY)
|
||||
if(target STREQUAL obs-browser)
|
||||
set_target_properties(${target} PROPERTIES VERSION 0 SOVERSION ${OBS_VERSION_MAJOR})
|
||||
else()
|
||||
set_target_properties(
|
||||
${target}
|
||||
PROPERTIES VERSION 0
|
||||
SOVERSION ${OBS_VERSION_MAJOR}
|
||||
BUILD_RPATH "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_LIBRARY_DESTINATION}"
|
||||
INSTALL_RPATH "${OBS_MODULE_RPATH}")
|
||||
PROPERTIES
|
||||
VERSION 0
|
||||
SOVERSION ${OBS_VERSION_MAJOR}
|
||||
BUILD_RPATH "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_LIBRARY_DESTINATION}"
|
||||
INSTALL_RPATH "${OBS_MODULE_RPATH}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(${target} STREQUAL obspython OR ${target} STREQUAL obslua)
|
||||
@@ -119,32 +128,36 @@ function(set_target_properties_obs target)
|
||||
|
||||
install(
|
||||
TARGETS ${target}
|
||||
LIBRARY DESTINATION "${plugin_destination}"
|
||||
COMPONENT Runtime
|
||||
NAMELINK_COMPONENT Development)
|
||||
LIBRARY DESTINATION "${plugin_destination}" COMPONENT Runtime NAMELINK_COMPONENT Development
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E make_directory "${OBS_OUTPUT_DIR}/$<CONFIG>/${plugin_destination}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE:${target}>"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${plugin_destination}"
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE:${target}>"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${plugin_destination}"
|
||||
COMMENT "Copy ${target} to plugin directory (${plugin_destination})"
|
||||
VERBATIM)
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
if(${target} STREQUAL obspython)
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E make_directory "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_SCRIPT_PLUGIN_DESTINATION}/"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE_DIR:obspython>/obspython.py"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_SCRIPT_PLUGIN_DESTINATION}/"
|
||||
COMMENT "Add obspython import module")
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE_DIR:obspython>/obspython.py"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_SCRIPT_PLUGIN_DESTINATION}/"
|
||||
COMMENT "Add obspython import module"
|
||||
)
|
||||
|
||||
install(
|
||||
FILES "$<TARGET_FILE_DIR:obspython>/obspython.py"
|
||||
DESTINATION "${OBS_SCRIPT_PLUGIN_DESTINATION}"
|
||||
COMPONENT Runtime)
|
||||
COMPONENT Runtime
|
||||
)
|
||||
elseif(${target} STREQUAL obs-browser)
|
||||
message(DEBUG "Add Chromium Embedded Framework to project for obs-browser plugin...")
|
||||
if(TARGET CEF::Library)
|
||||
@@ -167,32 +180,37 @@ function(set_target_properties_obs target)
|
||||
"${CMAKE_COMMAND}" -E copy_if_different "${cef_root_location}/Resources/chrome_100_percent.pak"
|
||||
"${cef_root_location}/Resources/chrome_200_percent.pak" "${cef_root_location}/Resources/icudtl.dat"
|
||||
"${cef_root_location}/Resources/resources.pak" "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_PLUGIN_DESTINATION}/"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_directory "${cef_root_location}/Resources/locales"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_PLUGIN_DESTINATION}/locales"
|
||||
COMMENT "Add Chromium Embedded Framwork to library directory")
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -E copy_directory "${cef_root_location}/Resources/locales"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_PLUGIN_DESTINATION}/locales"
|
||||
COMMENT "Add Chromium Embedded Framwork to library directory"
|
||||
)
|
||||
|
||||
install(
|
||||
FILES "${imported_location}"
|
||||
"${cef_location}/chrome-sandbox"
|
||||
"${cef_location}/libEGL.so"
|
||||
"${cef_location}/libGLESv2.so"
|
||||
"${cef_location}/libvk_swiftshader.so"
|
||||
"${cef_location}/libvulkan.so.1"
|
||||
"${cef_location}/snapshot_blob.bin"
|
||||
"${cef_location}/v8_context_snapshot.bin"
|
||||
"${cef_location}/vk_swiftshader_icd.json"
|
||||
"${cef_root_location}/Resources/chrome_100_percent.pak"
|
||||
"${cef_root_location}/Resources/chrome_200_percent.pak"
|
||||
"${cef_root_location}/Resources/icudtl.dat"
|
||||
"${cef_root_location}/Resources/resources.pak"
|
||||
FILES
|
||||
"${imported_location}"
|
||||
"${cef_location}/chrome-sandbox"
|
||||
"${cef_location}/libEGL.so"
|
||||
"${cef_location}/libGLESv2.so"
|
||||
"${cef_location}/libvk_swiftshader.so"
|
||||
"${cef_location}/libvulkan.so.1"
|
||||
"${cef_location}/snapshot_blob.bin"
|
||||
"${cef_location}/v8_context_snapshot.bin"
|
||||
"${cef_location}/vk_swiftshader_icd.json"
|
||||
"${cef_root_location}/Resources/chrome_100_percent.pak"
|
||||
"${cef_root_location}/Resources/chrome_200_percent.pak"
|
||||
"${cef_root_location}/Resources/icudtl.dat"
|
||||
"${cef_root_location}/Resources/resources.pak"
|
||||
DESTINATION "${OBS_PLUGIN_DESTINATION}"
|
||||
COMPONENT Runtime)
|
||||
COMPONENT Runtime
|
||||
)
|
||||
|
||||
install(
|
||||
DIRECTORY "${cef_root_location}/Resources/locales"
|
||||
DESTINATION "${OBS_PLUGIN_DESTINATION}"
|
||||
USE_SOURCE_PERMISSIONS
|
||||
COMPONENT Runtime)
|
||||
COMPONENT Runtime
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@@ -209,8 +227,12 @@ function(target_install_resources target)
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/data")
|
||||
file(GLOB_RECURSE data_files "${CMAKE_CURRENT_SOURCE_DIR}/data/*")
|
||||
foreach(data_file IN LISTS data_files)
|
||||
cmake_path(RELATIVE_PATH data_file BASE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/data/" OUTPUT_VARIABLE
|
||||
relative_path)
|
||||
cmake_path(
|
||||
RELATIVE_PATH
|
||||
data_file
|
||||
BASE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/data/"
|
||||
OUTPUT_VARIABLE relative_path
|
||||
)
|
||||
cmake_path(GET relative_path PARENT_PATH relative_path)
|
||||
target_sources(${target} PRIVATE "${data_file}")
|
||||
source_group("Resources/${relative_path}" FILES "${data_file}")
|
||||
@@ -229,16 +251,19 @@ function(target_install_resources target)
|
||||
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/data/"
|
||||
DESTINATION "${target_destination}"
|
||||
USE_SOURCE_PERMISSIONS
|
||||
COMPONENT Runtime)
|
||||
COMPONENT Runtime
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E make_directory "${OBS_OUTPUT_DIR}/$<CONFIG>/${target_destination}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/data"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${target_destination}"
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/data"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${target_destination}"
|
||||
COMMENT "Copy ${target} resources to data directory (${target_destination})"
|
||||
VERBATIM)
|
||||
VERBATIM
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
@@ -257,10 +282,7 @@ function(target_add_resource target resource)
|
||||
|
||||
message(DEBUG "Add resource ${resource} to target ${target} at destination ${target_destination}...")
|
||||
|
||||
install(
|
||||
FILES "${resource}"
|
||||
DESTINATION "${target_destination}"
|
||||
COMPONENT Runtime)
|
||||
install(FILES "${resource}" DESTINATION "${target_destination}" COMPONENT Runtime)
|
||||
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
@@ -268,7 +290,8 @@ function(target_add_resource target resource)
|
||||
COMMAND "${CMAKE_COMMAND}" -E make_directory "${OBS_OUTPUT_DIR}/$<CONFIG>/${target_destination}/"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${resource}" "${OBS_OUTPUT_DIR}/$<CONFIG>/${target_destination}/"
|
||||
COMMENT "Copy ${target} resource ${resource} to library directory (${target_destination})"
|
||||
VERBATIM)
|
||||
VERBATIM
|
||||
)
|
||||
endfunction()
|
||||
|
||||
# target_export: Helper function to export target as CMake package
|
||||
@@ -282,12 +305,15 @@ function(target_export target)
|
||||
install(CODE "set(OBS_VERSION_CANONICAL ${OBS_VERSION_CANONICAL})" COMPONENT Development)
|
||||
install(CODE "set(CMAKE_C_STANDARD ${CMAKE_C_STANDARD})" COMPONENT Development)
|
||||
install(
|
||||
CODE "configure_file(\"${CMAKE_CURRENT_SOURCE_DIR}/cmake/linux/${target}.pc.in\" \"${CMAKE_CURRENT_BINARY_DIR}/${target}.pc\" @ONLY)"
|
||||
COMPONENT Development)
|
||||
CODE
|
||||
"configure_file(\"${CMAKE_CURRENT_SOURCE_DIR}/cmake/linux/${target}.pc.in\" \"${CMAKE_CURRENT_BINARY_DIR}/${target}.pc\" @ONLY)"
|
||||
COMPONENT Development
|
||||
)
|
||||
|
||||
install(
|
||||
FILES "${CMAKE_CURRENT_BINARY_DIR}/${target}.pc"
|
||||
DESTINATION "${OBS_LIBRARY_DESTINATION}/pkgconfig"
|
||||
COMPONENT Development)
|
||||
COMPONENT Development
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
@@ -22,8 +22,11 @@ function(_check_dependencies_macos)
|
||||
|
||||
_check_dependencies()
|
||||
|
||||
execute_process(COMMAND "xattr" -r -d com.apple.quarantine "${dependencies_dir}/${destination}"
|
||||
RESULT_VARIABLE result COMMAND_ERROR_IS_FATAL ANY)
|
||||
execute_process(
|
||||
COMMAND "xattr" -r -d com.apple.quarantine "${dependencies_dir}/${destination}"
|
||||
RESULT_VARIABLE result
|
||||
COMMAND_ERROR_IS_FATAL ANY
|
||||
)
|
||||
endfunction()
|
||||
|
||||
_check_dependencies_macos()
|
||||
|
||||
@@ -16,9 +16,7 @@ add_compile_options("$<$<NOT:$<COMPILE_LANGUAGE:Swift>>:-fopenmp-simd>")
|
||||
|
||||
# Enable selection between arm64 and x86_64 targets
|
||||
if(NOT CMAKE_OSX_ARCHITECTURES)
|
||||
set(CMAKE_OSX_ARCHITECTURES
|
||||
arm64
|
||||
CACHE STRING "Build architectures for macOS" FORCE)
|
||||
set(CMAKE_OSX_ARCHITECTURES arm64 CACHE STRING "Build architectures for macOS" FORCE)
|
||||
endif()
|
||||
set_property(CACHE CMAKE_OSX_ARCHITECTURES PROPERTY STRINGS arm64 x86_64)
|
||||
|
||||
@@ -31,8 +29,10 @@ set(_obs_macos_current_sdk ${CMAKE_MATCH_1})
|
||||
message(DEBUG "macOS SDK version: ${_obs_macos_current_sdk}")
|
||||
if(_obs_macos_current_sdk VERSION_LESS _obs_macos_minimum_sdk)
|
||||
message(
|
||||
FATAL_ERROR "Your macOS SDK version (${_obs_macos_current_sdk}) is too low. "
|
||||
"The macOS ${_obs_macos_minimum_sdk} SDK (Xcode ${_obs_macos_minimum_xcode}) is required to build OBS.")
|
||||
FATAL_ERROR
|
||||
"Your macOS SDK version (${_obs_macos_current_sdk}) is too low. "
|
||||
"The macOS ${_obs_macos_minimum_sdk} SDK (Xcode ${_obs_macos_minimum_xcode}) is required to build OBS."
|
||||
)
|
||||
endif()
|
||||
unset(_obs_macos_current_sdk)
|
||||
unset(_obs_macos_minimum_sdk)
|
||||
@@ -69,12 +69,15 @@ string(APPEND CMAKE_OBJCXX_FLAGS_RELEASE " -g")
|
||||
|
||||
add_compile_definitions(
|
||||
$<$<NOT:$<COMPILE_LANGUAGE:Swift>>:$<$<CONFIG:DEBUG>:DEBUG>>
|
||||
$<$<NOT:$<COMPILE_LANGUAGE:Swift>>:$<$<CONFIG:DEBUG>:_DEBUG>> $<$<NOT:$<COMPILE_LANGUAGE:Swift>>:SIMDE_ENABLE_OPENMP>)
|
||||
$<$<NOT:$<COMPILE_LANGUAGE:Swift>>:$<$<CONFIG:DEBUG>:_DEBUG>>
|
||||
$<$<NOT:$<COMPILE_LANGUAGE:Swift>>:SIMDE_ENABLE_OPENMP>
|
||||
)
|
||||
|
||||
if(ENABLE_COMPILER_TRACE)
|
||||
add_compile_options(
|
||||
$<$<NOT:$<COMPILE_LANGUAGE:Swift>>:-ftime-trace>
|
||||
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -debug-time-expression-type-checking>"
|
||||
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -debug-time-function-bodies>")
|
||||
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -debug-time-function-bodies>"
|
||||
)
|
||||
add_link_options(LINKER:-print_statistics)
|
||||
endif()
|
||||
|
||||
@@ -4,15 +4,11 @@ include_guard(GLOBAL)
|
||||
|
||||
# Set empty codesigning team if not specified as cache variable
|
||||
if(NOT OBS_CODESIGN_TEAM)
|
||||
set(OBS_CODESIGN_TEAM
|
||||
""
|
||||
CACHE STRING "OBS code signing team for macOS" FORCE)
|
||||
set(OBS_CODESIGN_TEAM "" CACHE STRING "OBS code signing team for macOS" FORCE)
|
||||
|
||||
# Set ad-hoc codesigning identity if not specified as cache variable
|
||||
if(NOT OBS_CODESIGN_IDENTITY)
|
||||
set(OBS_CODESIGN_IDENTITY
|
||||
"-"
|
||||
CACHE STRING "OBS code signing identity for macOS" FORCE)
|
||||
set(OBS_CODESIGN_IDENTITY "-" CACHE STRING "OBS code signing identity for macOS" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -46,5 +42,8 @@ set(OBS_LIBRARY_DESTINATION "lib")
|
||||
set(OBS_INCLUDE_DESTINATION "include/obs")
|
||||
set(OBS_CMAKE_DESTINATION "lib/cmake")
|
||||
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/resources/package.applescript"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/package.applescript" @ONLY)
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/resources/package.applescript"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/package.applescript"
|
||||
@ONLY
|
||||
)
|
||||
|
||||
+82
-98
@@ -1,13 +1,5 @@
|
||||
# OBS CMake macOS helper functions module
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-lint: disable=C0307
|
||||
# cmake-lint: disable=E1126
|
||||
# cmake-lint: disable=R0912
|
||||
# cmake-lint: disable=R0915
|
||||
# cmake-format: on
|
||||
|
||||
include_guard(GLOBAL)
|
||||
|
||||
include(helpers_common)
|
||||
@@ -50,15 +42,16 @@ function(set_target_properties_obs target)
|
||||
if(target STREQUAL obs-studio)
|
||||
set_target_properties(
|
||||
${target}
|
||||
PROPERTIES OUTPUT_NAME OBS
|
||||
MACOSX_BUNDLE TRUE
|
||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/Info.plist.in"
|
||||
XCODE_EMBED_FRAMEWORKS_REMOVE_HEADERS_ON_COPY YES
|
||||
XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY YES
|
||||
XCODE_EMBED_PLUGINS_REMOVE_HEADERS_ON_COPY YES
|
||||
XCODE_EMBED_PLUGINS_CODE_SIGN_ON_COPY YES)
|
||||
PROPERTIES
|
||||
OUTPUT_NAME OBS
|
||||
MACOSX_BUNDLE TRUE
|
||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/Info.plist.in"
|
||||
XCODE_EMBED_FRAMEWORKS_REMOVE_HEADERS_ON_COPY YES
|
||||
XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY YES
|
||||
XCODE_EMBED_PLUGINS_REMOVE_HEADERS_ON_COPY YES
|
||||
XCODE_EMBED_PLUGINS_CODE_SIGN_ON_COPY YES
|
||||
)
|
||||
|
||||
# cmake-format: off
|
||||
set_target_xcode_properties(
|
||||
${target}
|
||||
PROPERTIES PRODUCT_BUNDLE_IDENTIFIER com.obsproject.obs-studio
|
||||
@@ -74,49 +67,41 @@ function(set_target_properties_obs target)
|
||||
INFOPLIST_KEY_CFBundleDisplayName "OBS Studio"
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright "(c) 2012-${CURRENT_YEAR} Lain Bailey"
|
||||
INFOPLIST_KEY_NSCameraUsageDescription "OBS needs to access the camera to enable camera sources to work."
|
||||
INFOPLIST_KEY_NSMicrophoneUsageDescription "OBS needs to access the microphone to enable audio input.")
|
||||
# cmake-format: on
|
||||
INFOPLIST_KEY_NSMicrophoneUsageDescription "OBS needs to access the microphone to enable audio input."
|
||||
)
|
||||
|
||||
get_property(obs_dependencies GLOBAL PROPERTY _OBS_DEPENDENCIES)
|
||||
add_dependencies(${target} ${obs_dependencies})
|
||||
|
||||
get_property(obs_frameworks GLOBAL PROPERTY _OBS_FRAMEWORKS)
|
||||
set_property(
|
||||
TARGET ${target}
|
||||
APPEND
|
||||
PROPERTY XCODE_EMBED_FRAMEWORKS ${obs_frameworks})
|
||||
set_property(TARGET ${target} APPEND PROPERTY XCODE_EMBED_FRAMEWORKS ${obs_frameworks})
|
||||
|
||||
if(SPARKLE_APPCAST_URL AND SPARKLE_PUBLIC_KEY)
|
||||
set_property(
|
||||
TARGET ${target}
|
||||
APPEND
|
||||
PROPERTY XCODE_EMBED_FRAMEWORKS ${SPARKLE})
|
||||
set_property(TARGET ${target} APPEND PROPERTY XCODE_EMBED_FRAMEWORKS ${SPARKLE})
|
||||
endif()
|
||||
|
||||
if(TARGET mac-syphon)
|
||||
set_property(
|
||||
TARGET ${target}
|
||||
APPEND
|
||||
PROPERTY XCODE_EMBED_FRAMEWORKS ${SYPHON})
|
||||
set_property(TARGET ${target} APPEND PROPERTY XCODE_EMBED_FRAMEWORKS ${SYPHON})
|
||||
endif()
|
||||
|
||||
get_property(obs_executables GLOBAL PROPERTY _OBS_EXECUTABLES)
|
||||
add_dependencies(${target} ${obs_executables})
|
||||
foreach(executable IN LISTS obs_executables)
|
||||
set_target_xcode_properties(${executable} PROPERTIES INSTALL_PATH
|
||||
"$(LOCAL_APPS_DIR)/$<TARGET_BUNDLE_DIR_NAME:${target}>/Contents/MacOS")
|
||||
"$(LOCAL_APPS_DIR)/$<TARGET_BUNDLE_DIR_NAME:${target}>/Contents/MacOS"
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE:${executable}>"
|
||||
"$<TARGET_BUNDLE_CONTENT_DIR:${target}>/MacOS/"
|
||||
COMMENT "Copy ${executable} to application bundle")
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE:${executable}>"
|
||||
"$<TARGET_BUNDLE_CONTENT_DIR:${target}>/MacOS/"
|
||||
COMMENT "Copy ${executable} to application bundle"
|
||||
)
|
||||
endforeach()
|
||||
|
||||
if(VIRTUALCAM_DEVICE_UUID
|
||||
AND VIRTUALCAM_SOURCE_UUID
|
||||
AND VIRTUALCAM_SINK_UUID)
|
||||
if(VIRTUALCAM_DEVICE_UUID AND VIRTUALCAM_SOURCE_UUID AND VIRTUALCAM_SINK_UUID)
|
||||
set(has_virtualcam_uuids TRUE)
|
||||
else()
|
||||
set(has_virtualcam_uuids FALSE)
|
||||
@@ -131,8 +116,10 @@ function(set_target_properties_obs target)
|
||||
else()
|
||||
if(has_virtualcam_uuids AND OBS_PROVISIONING_PROFILE)
|
||||
set(entitlements_file "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/entitlements-extension.plist")
|
||||
set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_PROVISIONING_PROFILE_SPECIFIER
|
||||
"${OBS_PROVISIONING_PROFILE}")
|
||||
set_target_properties(
|
||||
${target}
|
||||
PROPERTIES XCODE_ATTRIBUTE_PROVISIONING_PROFILE_SPECIFIER "${OBS_PROVISIONING_PROFILE}"
|
||||
)
|
||||
configure_file(cmake/macos/exportOptions-extension.plist.in ${CMAKE_BINARY_DIR}/exportOptions.plist)
|
||||
else()
|
||||
set(entitlements_file "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/entitlements.plist")
|
||||
@@ -151,7 +138,8 @@ function(set_target_properties_obs target)
|
||||
POST_BUILD
|
||||
COMMAND /bin/ln -fs obs-frontend-api.dylib libobs-frontend-api.1.dylib
|
||||
WORKING_DIRECTORY "$<TARGET_BUNDLE_CONTENT_DIR:${target}>/Frameworks"
|
||||
COMMENT "Create symlink for legacy obs-frontend-api")
|
||||
COMMENT "Create symlink for legacy obs-frontend-api"
|
||||
)
|
||||
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/qt.conf")
|
||||
target_add_resource(${target} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/qt.conf")
|
||||
@@ -164,22 +152,28 @@ function(set_target_properties_obs target)
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_directory "$<TARGET_BUNDLE_DIR:obs-dal-plugin>"
|
||||
"$<TARGET_BUNDLE_CONTENT_DIR:${target}>/Resources/$<TARGET_BUNDLE_DIR_NAME:obs-dal-plugin>"
|
||||
COMMENT "Add OBS DAL plugin to application bundle")
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -E copy_directory "$<TARGET_BUNDLE_DIR:obs-dal-plugin>"
|
||||
"$<TARGET_BUNDLE_CONTENT_DIR:${target}>/Resources/$<TARGET_BUNDLE_DIR_NAME:obs-dal-plugin>"
|
||||
COMMENT "Add OBS DAL plugin to application bundle"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(TARGET obspython)
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE_DIR:obspython>/obspython.py"
|
||||
"$<TARGET_BUNDLE_CONTENT_DIR:${target}>/Resources"
|
||||
COMMENT "Add OBS::python import module")
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE_DIR:obspython>/obspython.py"
|
||||
"$<TARGET_BUNDLE_CONTENT_DIR:${target}>/Resources"
|
||||
COMMENT "Add OBS::python import module"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(TARGET mac-camera-extension AND (CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_STYLE STREQUAL Automatic
|
||||
OR OBS_PROVISIONING_PROFILE))
|
||||
if(
|
||||
TARGET mac-camera-extension
|
||||
AND (CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_STYLE STREQUAL Automatic OR OBS_PROVISIONING_PROFILE)
|
||||
)
|
||||
target_enable_feature(mac-camera-extension "macOS CMIO Camera Extension")
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
@@ -187,7 +181,8 @@ function(set_target_properties_obs target)
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -E copy_directory "$<TARGET_BUNDLE_DIR:mac-camera-extension>"
|
||||
"$<TARGET_BUNDLE_CONTENT_DIR:${target}>/Library/SystemExtensions/$<TARGET_BUNDLE_DIR_NAME:mac-camera-extension>"
|
||||
COMMENT "Add Camera Extension to application bundle")
|
||||
COMMENT "Add Camera Extension to application bundle"
|
||||
)
|
||||
else()
|
||||
target_disable_feature(mac-camera-extension "macOS CMIO Camera Extension")
|
||||
endif()
|
||||
@@ -215,28 +210,30 @@ function(set_target_properties_obs target)
|
||||
elseif(target_type STREQUAL SHARED_LIBRARY)
|
||||
set_target_properties(
|
||||
${target}
|
||||
PROPERTIES NO_SONAME TRUE
|
||||
MACHO_COMPATIBILITY_VERSION 1.0
|
||||
MACHO_CURRENT_VERSION ${OBS_VERSION_MAJOR}
|
||||
SOVERSION 0
|
||||
VERSION 0)
|
||||
PROPERTIES
|
||||
NO_SONAME TRUE
|
||||
MACHO_COMPATIBILITY_VERSION 1.0
|
||||
MACHO_CURRENT_VERSION ${OBS_VERSION_MAJOR}
|
||||
SOVERSION 0
|
||||
VERSION 0
|
||||
)
|
||||
|
||||
# cmake-format: off
|
||||
set_target_xcode_properties(
|
||||
${target}
|
||||
PROPERTIES DYLIB_COMPATIBILITY_VERSION 1.0
|
||||
DYLIB_CURRENT_VERSION ${OBS_VERSION_MAJOR}
|
||||
PRODUCT_NAME ${target}
|
||||
PRODUCT_BUNDLE_IDENTIFIER com.obsproject.${target}
|
||||
SKIP_INSTALL YES)
|
||||
# cmake-format: on
|
||||
SKIP_INSTALL YES
|
||||
)
|
||||
|
||||
get_target_property(is_framework ${target} FRAMEWORK)
|
||||
if(is_framework)
|
||||
set_target_properties(${target} PROPERTIES FRAMEWORK_VERSION A MACOSX_FRAMEWORK_IDENTIFIER
|
||||
com.obsproject.${target})
|
||||
set_target_properties(
|
||||
${target}
|
||||
PROPERTIES FRAMEWORK_VERSION A MACOSX_FRAMEWORK_IDENTIFIER com.obsproject.${target}
|
||||
)
|
||||
|
||||
# cmake-format: off
|
||||
set_target_xcode_properties(
|
||||
${target}
|
||||
PROPERTIES CODE_SIGN_IDENTITY ""
|
||||
@@ -249,27 +246,25 @@ function(set_target_properties_obs target)
|
||||
GENERATE_INFOPLIST_FILE YES
|
||||
INFOPLIST_FILE ""
|
||||
INFOPLIST_KEY_CFBundleDisplayName ${target}
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright "(c) 2012-${CURRENT_YEAR} Lain Bailey")
|
||||
# cmake-format: on
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright "(c) 2012-${CURRENT_YEAR} Lain Bailey"
|
||||
)
|
||||
endif()
|
||||
|
||||
set_property(GLOBAL APPEND PROPERTY _OBS_FRAMEWORKS ${target})
|
||||
set_property(GLOBAL APPEND PROPERTY _OBS_DEPENDENCIES ${target})
|
||||
elseif(target_type STREQUAL MODULE_LIBRARY)
|
||||
if(target STREQUAL obspython)
|
||||
# cmake-format: off
|
||||
set_target_xcode_properties(
|
||||
${target}
|
||||
PROPERTIES PRODUCT_NAME ${target}
|
||||
PRODUCT_BUNDLE_IDENTIFIER com.obsproject.${target})
|
||||
# cmake-format: on
|
||||
PRODUCT_BUNDLE_IDENTIFIER com.obsproject.${target}
|
||||
)
|
||||
elseif(target STREQUAL obslua)
|
||||
# cmake-format: off
|
||||
set_target_xcode_properties(
|
||||
${target}
|
||||
PROPERTIES PRODUCT_NAME ${target}
|
||||
PRODUCT_BUNDLE_IDENTIFIER com.obsproject.${target})
|
||||
# cmake-format: on
|
||||
PRODUCT_BUNDLE_IDENTIFIER com.obsproject.${target}
|
||||
)
|
||||
elseif(target STREQUAL obs-dal-plugin)
|
||||
set_target_properties(${target} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
|
||||
set_property(GLOBAL APPEND PROPERTY _OBS_DEPENDENCIES ${target})
|
||||
@@ -277,7 +272,6 @@ function(set_target_properties_obs target)
|
||||
else()
|
||||
set_target_properties(${target} PROPERTIES BUNDLE TRUE BUNDLE_EXTENSION plugin)
|
||||
|
||||
# cmake-format: off
|
||||
set_target_xcode_properties(
|
||||
${target}
|
||||
PROPERTIES PRODUCT_NAME ${target}
|
||||
@@ -286,8 +280,8 @@ function(set_target_properties_obs target)
|
||||
MARKETING_VERSION ${OBS_VERSION_CANONICAL}
|
||||
GENERATE_INFOPLIST_FILE YES
|
||||
INFOPLIST_KEY_CFBundleDisplayName ${target}
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright "(c) 2012-${CURRENT_YEAR} Lain Bailey")
|
||||
# cmake-format: on
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright "(c) 2012-${CURRENT_YEAR} Lain Bailey"
|
||||
)
|
||||
|
||||
if(target STREQUAL obs-browser)
|
||||
# Good-enough for now as there are no other variants - in _theory_ we should only add the appropriate variant,
|
||||
@@ -317,10 +311,7 @@ function(set_target_properties_obs target)
|
||||
get_target_property(target_sources ${target} SOURCES)
|
||||
set(target_ui_files ${target_sources})
|
||||
list(FILTER target_ui_files INCLUDE REGEX ".+\\.(ui|qrc)")
|
||||
source_group(
|
||||
TREE "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
PREFIX "UI Files"
|
||||
FILES ${target_ui_files})
|
||||
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "UI Files" FILES ${target_ui_files})
|
||||
|
||||
if(${target} STREQUAL libobs)
|
||||
set(target_source_files ${target_sources})
|
||||
@@ -328,14 +319,8 @@ function(set_target_properties_obs target)
|
||||
list(FILTER target_source_files INCLUDE REGEX ".+\\.(m|c[cp]?p?|swift)")
|
||||
list(FILTER target_header_files INCLUDE REGEX ".+\\.h(pp)?")
|
||||
|
||||
source_group(
|
||||
TREE "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
PREFIX "Source Files"
|
||||
FILES ${target_source_files})
|
||||
source_group(
|
||||
TREE "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
PREFIX "Header Files"
|
||||
FILES ${target_header_files})
|
||||
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Source Files" FILES ${target_source_files})
|
||||
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Header Files" FILES ${target_header_files})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
@@ -349,11 +334,10 @@ endmacro()
|
||||
# _add_entitlements: Macro to add entitlements shipped with project
|
||||
macro(_add_entitlements)
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/entitlements.plist")
|
||||
# cmake-format: off
|
||||
set_target_xcode_properties(
|
||||
${target}
|
||||
PROPERTIES CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/entitlements.plist")
|
||||
# cmake-format: on
|
||||
PROPERTIES CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/entitlements.plist"
|
||||
)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
@@ -370,8 +354,12 @@ function(target_install_resources target)
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/data")
|
||||
file(GLOB_RECURSE data_files "${CMAKE_CURRENT_SOURCE_DIR}/data/*")
|
||||
foreach(data_file IN LISTS data_files)
|
||||
cmake_path(RELATIVE_PATH data_file BASE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/data/" OUTPUT_VARIABLE
|
||||
relative_path)
|
||||
cmake_path(
|
||||
RELATIVE_PATH
|
||||
data_file
|
||||
BASE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/data/"
|
||||
OUTPUT_VARIABLE relative_path
|
||||
)
|
||||
cmake_path(GET relative_path PARENT_PATH relative_path)
|
||||
target_sources(${target} PRIVATE "${data_file}")
|
||||
set_property(SOURCE "${data_file}" PROPERTY MACOSX_PACKAGE_LOCATION "Resources/${relative_path}")
|
||||
@@ -398,10 +386,7 @@ function(_bundle_dependencies target)
|
||||
list(LENGTH obs_module_list num_modules)
|
||||
if(num_modules GREATER 0)
|
||||
add_dependencies(${target} ${obs_module_list})
|
||||
set_property(
|
||||
TARGET ${target}
|
||||
APPEND
|
||||
PROPERTY XCODE_EMBED_PLUGINS ${obs_module_list})
|
||||
set_property(TARGET ${target} APPEND PROPERTY XCODE_EMBED_PLUGINS ${obs_module_list})
|
||||
foreach(module IN LISTS obs_module_list)
|
||||
find_dependencies(TARGET ${module} FOUND_VAR found_dependencies)
|
||||
endforeach()
|
||||
@@ -466,14 +451,13 @@ function(_bundle_dependencies target)
|
||||
cmake_path(SET plugin_stem_dir NORMALIZE "${plugin_base_dir}")
|
||||
cmake_path(RELATIVE_PATH plugin_path BASE_DIRECTORY "${plugin_stem_dir}" OUTPUT_VARIABLE plugin_file_name)
|
||||
target_sources(${target} PRIVATE "${plugin}")
|
||||
set_source_files_properties("${plugin}" PROPERTIES MACOSX_PACKAGE_LOCATION "plugins/${plugin_file_name}"
|
||||
XCODE_FILE_ATTRIBUTES "CodeSignOnCopy")
|
||||
set_source_files_properties(
|
||||
"${plugin}"
|
||||
PROPERTIES MACOSX_PACKAGE_LOCATION "plugins/${plugin_file_name}" XCODE_FILE_ATTRIBUTES "CodeSignOnCopy"
|
||||
)
|
||||
source_group("Qt plugins" FILES "${plugin}")
|
||||
endforeach()
|
||||
|
||||
list(REMOVE_DUPLICATES library_paths)
|
||||
set_property(
|
||||
TARGET ${target}
|
||||
APPEND
|
||||
PROPERTY XCODE_EMBED_FRAMEWORKS ${library_paths})
|
||||
set_property(TARGET ${target} APPEND PROPERTY XCODE_EMBED_FRAMEWORKS ${library_paths})
|
||||
endfunction()
|
||||
|
||||
@@ -9,8 +9,9 @@ if(ENABLE_CCACHE AND CCACHE_PROGRAM)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/resources/ccache-launcher-c.in" ccache-launcher-c)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/resources/ccache-launcher-cxx.in" ccache-launcher-cxx)
|
||||
|
||||
execute_process(COMMAND chmod a+rx "${CMAKE_CURRENT_BINARY_DIR}/ccache-launcher-c"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/ccache-launcher-cxx")
|
||||
execute_process(
|
||||
COMMAND chmod a+rx "${CMAKE_CURRENT_BINARY_DIR}/ccache-launcher-c" "${CMAKE_CURRENT_BINARY_DIR}/ccache-launcher-cxx"
|
||||
)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CC "${CMAKE_CURRENT_BINARY_DIR}/ccache-launcher-c")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CXX "${CMAKE_CURRENT_BINARY_DIR}/ccache-launcher-cxx")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_LD "${CMAKE_C_COMPILER}")
|
||||
@@ -26,9 +27,7 @@ set(CMAKE_XCODE_ATTRIBUTE_MARKETING_VERSION ${OBS_VERSION_CANONICAL})
|
||||
set(CMAKE_XCODE_ATTRIBUTE_MACOSX_DEPLOYMENT_TARGET ${CMAKE_OSX_DEPLOYMENT_TARGET})
|
||||
|
||||
if(NOT OBS_PROVISIONING_PROFILE)
|
||||
set(OBS_PROVISIONING_PROFILE
|
||||
""
|
||||
CACHE STRING "OBS provisioning profile name for macOS" FORCE)
|
||||
set(OBS_PROVISIONING_PROFILE "" CACHE STRING "OBS provisioning profile name for macOS" FORCE)
|
||||
else()
|
||||
set(CMAKE_XCODE_ATTRIBUTE_PROVISIONING_PROFILE_NAME "${OBS_PROVISIONING_PROFILE}")
|
||||
endif()
|
||||
|
||||
@@ -40,24 +40,11 @@ The following cache variables may also be set:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0301
|
||||
# cmake-format: on
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_path(
|
||||
Python_INCLUDE_DIR
|
||||
NAMES Python.h
|
||||
PATH_SUFFIXES include include/python
|
||||
DOC "Python include directory")
|
||||
find_path(Python_INCLUDE_DIR NAMES Python.h PATH_SUFFIXES include include/python DOC "Python include directory")
|
||||
|
||||
find_library(
|
||||
Python_LIBRARY
|
||||
NAMES python3
|
||||
PATHS lib
|
||||
DOC "Python location")
|
||||
find_library(Python_LIBRARY NAMES python3 PATHS lib DOC "Python location")
|
||||
|
||||
if(EXISTS "${Python_INCLUDE_DIR}/patchlevel.h")
|
||||
file(STRINGS "${Python_INCLUDE_DIR}/patchlevel.h" _VERSION_STRING REGEX "^.*PY_VERSION[ \t]+\"[0-9\\.]+\"[ \t]*$")
|
||||
@@ -72,8 +59,10 @@ endif()
|
||||
find_package_handle_standard_args(
|
||||
Python
|
||||
REQUIRED_VARS Python_LIBRARY Python_INCLUDE_DIR
|
||||
VERSION_VAR Python_VERSION HANDLE_VERSION_RANGE REASON_FAILURE_MESSAGE
|
||||
"Ensure that obs-deps is provided as part of CMAKE_PREFIX_PATH.")
|
||||
VERSION_VAR Python_VERSION
|
||||
HANDLE_VERSION_RANGE
|
||||
REASON_FAILURE_MESSAGE "Ensure that obs-deps is provided as part of CMAKE_PREFIX_PATH."
|
||||
)
|
||||
mark_as_advanced(Python_INCLUDE_DIR Python_LIBRARY)
|
||||
|
||||
if(Python_FOUND)
|
||||
@@ -90,14 +79,18 @@ if(Python_FOUND)
|
||||
set_property(TARGET Python::Python PROPERTY IMPORTED_LIBNAME "${Python_LIBRARY}")
|
||||
endif()
|
||||
|
||||
set_target_properties(Python::Python PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${Python_INCLUDE_DIR}"
|
||||
VERSION ${Python_VERSION})
|
||||
set_target_properties(
|
||||
Python::Python
|
||||
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${Python_INCLUDE_DIR}" VERSION ${Python_VERSION}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(
|
||||
Python PROPERTIES
|
||||
URL "https://www.python.org"
|
||||
DESCRIPTION
|
||||
"Python is a programming language that lets you work more quickly and integrate your systems more effectively.")
|
||||
Python
|
||||
PROPERTIES
|
||||
URL "https://www.python.org"
|
||||
DESCRIPTION
|
||||
"Python is a programming language that lets you work more quickly and integrate your systems more effectively."
|
||||
)
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
# OBS CMake Windows compiler configuration module
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=E1126
|
||||
# cmake-format: on
|
||||
|
||||
include_guard(GLOBAL)
|
||||
|
||||
include(ccache)
|
||||
@@ -12,14 +8,24 @@ include(compiler_common)
|
||||
if(ENABLE_CCACHE AND CCACHE_PROGRAM)
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
||||
file(COPY_FILE ${CCACHE_PROGRAM} "${CMAKE_CURRENT_BINARY_DIR}/cl.exe")
|
||||
set(CMAKE_VS_GLOBALS "CLToolExe=cl.exe" "CLToolPath=${CMAKE_BINARY_DIR}" "TrackFileAccess=false"
|
||||
"UseMultiToolTask=true")
|
||||
set(
|
||||
CMAKE_VS_GLOBALS
|
||||
"CLToolExe=cl.exe"
|
||||
"CLToolPath=${CMAKE_BINARY_DIR}"
|
||||
"TrackFileAccess=false"
|
||||
"UseMultiToolTask=true"
|
||||
)
|
||||
# Ccache does not support debug information stored in program database (PDB) files
|
||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT Embedded)
|
||||
elseif(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
file(COPY_FILE ${CCACHE_PROGRAM} "${CMAKE_CURRENT_BINARY_DIR}/clang-cl.exe")
|
||||
set(CMAKE_VS_GLOBALS "CLToolExe=clang-cl.exe" "CLToolPath=${CMAKE_BINARY_DIR}" "TrackFileAccess=false"
|
||||
"UseMultiToolTask=true")
|
||||
set(
|
||||
CMAKE_VS_GLOBALS
|
||||
"CLToolExe=clang-cl.exe"
|
||||
"CLToolPath=${CMAKE_BINARY_DIR}"
|
||||
"TrackFileAccess=false"
|
||||
"UseMultiToolTask=true"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -43,8 +49,11 @@ if(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM)
|
||||
endif()
|
||||
|
||||
if(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION VERSION_LESS 10.0.20348)
|
||||
message(FATAL_ERROR "OBS requires Windows SDK version 10.0.20348.0 or more recent.\n"
|
||||
"Please download and install the most recent Windows SDK.")
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"OBS requires Windows SDK version 10.0.20348.0 or more recent.\n"
|
||||
"Please download and install the most recent Windows SDK."
|
||||
)
|
||||
endif()
|
||||
|
||||
set(_obs_msvc_c_options /MP /Zc:__cplusplus /Zc:preprocessor)
|
||||
@@ -65,19 +74,26 @@ add_compile_options(
|
||||
"$<$<COMPILE_LANG_AND_ID:CXX,Clang>:${_obs_clang_cxx_options}>"
|
||||
$<$<NOT:$<CONFIG:Debug>>:/Gy>
|
||||
$<$<NOT:$<CONFIG:Debug>>:/GL>
|
||||
$<$<NOT:$<CONFIG:Debug>>:/Oi>)
|
||||
$<$<NOT:$<CONFIG:Debug>>:/Oi>
|
||||
)
|
||||
|
||||
add_compile_definitions(UNICODE _UNICODE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS $<$<CONFIG:DEBUG>:DEBUG>
|
||||
$<$<CONFIG:DEBUG>:_DEBUG>)
|
||||
add_compile_definitions(
|
||||
UNICODE
|
||||
_UNICODE
|
||||
_CRT_SECURE_NO_WARNINGS
|
||||
_CRT_NONSTDC_NO_WARNINGS
|
||||
$<$<CONFIG:DEBUG>:DEBUG>
|
||||
$<$<CONFIG:DEBUG>:_DEBUG>
|
||||
)
|
||||
|
||||
# cmake-format: off
|
||||
add_link_options($<$<NOT:$<CONFIG:Debug>>:/OPT:REF>
|
||||
$<$<NOT:$<CONFIG:Debug>>:/OPT:ICF>
|
||||
$<$<NOT:$<CONFIG:Debug>>:/LTCG>
|
||||
$<$<NOT:$<CONFIG:Debug>>:/INCREMENTAL:NO>
|
||||
/DEBUG
|
||||
/Brepro)
|
||||
# cmake-format: on
|
||||
add_link_options(
|
||||
$<$<NOT:$<CONFIG:Debug>>:/OPT:REF>
|
||||
$<$<NOT:$<CONFIG:Debug>>:/OPT:ICF>
|
||||
$<$<NOT:$<CONFIG:Debug>>:/LTCG>
|
||||
$<$<NOT:$<CONFIG:Debug>>:/INCREMENTAL:NO>
|
||||
/DEBUG
|
||||
/Brepro
|
||||
)
|
||||
|
||||
if(CMAKE_COMPILE_WARNING_AS_ERROR)
|
||||
add_link_options(/WX)
|
||||
|
||||
@@ -31,5 +31,7 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
"${CMAKE_GENERATOR}" -DCMAKE_SYSTEM_VERSION:STRING='${CMAKE_SYSTEM_VERSION}' -DOBS_CMAKE_VERSION:STRING=3.0.0
|
||||
-DVIRTUALCAM_GUID:STRING=${VIRTUALCAM_GUID} -DCMAKE_MESSAGE_LOG_LEVEL=${CMAKE_MESSAGE_LOG_LEVEL}
|
||||
-DENABLE_CCACHE=${ENABLE_CCACHE}
|
||||
RESULT_VARIABLE _process_result COMMAND_ERROR_IS_FATAL ANY)
|
||||
RESULT_VARIABLE _process_result
|
||||
COMMAND_ERROR_IS_FATAL ANY
|
||||
)
|
||||
endif()
|
||||
|
||||
+101
-109
@@ -1,11 +1,5 @@
|
||||
# OBS CMake Windows helper functions module
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=R0912
|
||||
# cmake-lint: disable=R0915
|
||||
# cmake-format: on
|
||||
|
||||
include_guard(GLOBAL)
|
||||
|
||||
include(helpers_common)
|
||||
@@ -32,14 +26,10 @@ function(set_target_properties_obs target)
|
||||
elseif(target STREQUAL inject-helper OR target STREQUAL get-graphics-offsets)
|
||||
set(OBS_EXECUTABLE_DESTINATION "${OBS_DATA_DESTINATION}/obs-plugins/win-capture")
|
||||
|
||||
# cmake-format: off
|
||||
_target_install_obs(${target} DESTINATION ${OBS_EXECUTABLE_DESTINATION} 32BIT)
|
||||
# cmake-format: on
|
||||
endif()
|
||||
|
||||
# cmake-format: off
|
||||
_target_install_obs(${target} DESTINATION ${OBS_EXECUTABLE_DESTINATION})
|
||||
# cmake-format: on
|
||||
|
||||
if(target STREQUAL obs-studio)
|
||||
get_property(obs_executables GLOBAL PROPERTY _OBS_EXECUTABLES)
|
||||
@@ -47,7 +37,8 @@ function(set_target_properties_obs target)
|
||||
add_dependencies(${target} ${obs_executables} ${obs_modules})
|
||||
_bundle_dependencies(${target})
|
||||
target_add_resource(${target} "${CMAKE_CURRENT_SOURCE_DIR}/../AUTHORS"
|
||||
"${OBS_DATA_DESTINATION}/obs-studio/authors")
|
||||
"${OBS_DATA_DESTINATION}/obs-studio/authors"
|
||||
)
|
||||
elseif(target STREQUAL obs-browser-helper)
|
||||
set_property(GLOBAL APPEND PROPERTY _OBS_EXECUTABLES ${target})
|
||||
return()
|
||||
@@ -57,19 +48,16 @@ function(set_target_properties_obs target)
|
||||
elseif(target_type STREQUAL SHARED_LIBRARY)
|
||||
set_target_properties(${target} PROPERTIES VERSION ${OBS_VERSION_MAJOR} SOVERSION ${OBS_VERSION_CANONICAL})
|
||||
|
||||
# cmake-format: off
|
||||
_target_install_obs(
|
||||
${target}
|
||||
DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
|
||||
LIBRARY_DESTINATION "${OBS_LIBRARY_DESTINATION}"
|
||||
HEADER_DESTINATION "${OBS_INCLUDE_DESTINATION}")
|
||||
# cmake-format: on
|
||||
HEADER_DESTINATION "${OBS_INCLUDE_DESTINATION}"
|
||||
)
|
||||
elseif(target_type STREQUAL MODULE_LIBRARY)
|
||||
set_target_properties(${target} PROPERTIES VERSION 0 SOVERSION ${OBS_VERSION_CANONICAL})
|
||||
|
||||
if(target STREQUAL libobs-d3d11
|
||||
OR target STREQUAL libobs-opengl
|
||||
OR target STREQUAL libobs-winrt)
|
||||
if(target STREQUAL libobs-d3d11 OR target STREQUAL libobs-opengl OR target STREQUAL libobs-winrt)
|
||||
set(target_destination "${OBS_EXECUTABLE_DESTINATION}")
|
||||
elseif(target STREQUAL "obspython" OR target STREQUAL "obslua")
|
||||
set(target_destination "${OBS_SCRIPT_PLUGIN_DESTINATION}")
|
||||
@@ -78,22 +66,16 @@ function(set_target_properties_obs target)
|
||||
target_add_resource(graphics-hook "${CMAKE_CURRENT_SOURCE_DIR}/obs-vulkan64.json" "${target_destination}")
|
||||
target_add_resource(graphics-hook "${CMAKE_CURRENT_SOURCE_DIR}/obs-vulkan32.json" "${target_destination}")
|
||||
|
||||
# cmake-format: off
|
||||
_target_install_obs(${target} DESTINATION ${target_destination} 32BIT)
|
||||
# cmake-format: on
|
||||
elseif(target STREQUAL obs-virtualcam-module)
|
||||
set(target_destination "${OBS_DATA_DESTINATION}/obs-plugins/win-dshow")
|
||||
|
||||
# cmake-format: off
|
||||
_target_install_obs(${target} DESTINATION ${target_destination} 32BIT)
|
||||
# cmake-format: on
|
||||
else()
|
||||
set(target_destination "${OBS_PLUGIN_DESTINATION}")
|
||||
endif()
|
||||
|
||||
# cmake-format: off
|
||||
_target_install_obs(${target} DESTINATION ${target_destination})
|
||||
# cmake-format: on
|
||||
|
||||
if(${target} STREQUAL obspython)
|
||||
add_custom_command(
|
||||
@@ -101,14 +83,17 @@ function(set_target_properties_obs target)
|
||||
POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E echo "Add obspython import module"
|
||||
COMMAND "${CMAKE_COMMAND}" -E make_directory "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_SCRIPT_PLUGIN_DESTINATION}/"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE_DIR:obspython>/obspython.py"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_SCRIPT_PLUGIN_DESTINATION}/"
|
||||
COMMENT "")
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE_DIR:obspython>/obspython.py"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_SCRIPT_PLUGIN_DESTINATION}/"
|
||||
COMMENT ""
|
||||
)
|
||||
|
||||
install(
|
||||
FILES "$<TARGET_FILE_DIR:obspython>/obspython.py"
|
||||
DESTINATION "${OBS_SCRIPT_PLUGIN_DESTINATION}"
|
||||
COMPONENT Runtime)
|
||||
COMPONENT Runtime
|
||||
)
|
||||
elseif(${target} STREQUAL obs-browser)
|
||||
message(DEBUG "Add Chromium Embedded Framework to project for obs-browser plugin...")
|
||||
if(TARGET CEF::Library)
|
||||
@@ -130,29 +115,34 @@ function(set_target_properties_obs target)
|
||||
"${CMAKE_COMMAND}" -E copy_if_different "${cef_root_location}/Resources/chrome_100_percent.pak"
|
||||
"${cef_root_location}/Resources/chrome_200_percent.pak" "${cef_root_location}/Resources/icudtl.dat"
|
||||
"${cef_root_location}/Resources/resources.pak" "${OBS_OUTPUT_DIR}/$<CONFIG>/${target_destination}/"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_directory "${cef_root_location}/Resources/locales"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${target_destination}/locales"
|
||||
COMMENT "")
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -E copy_directory "${cef_root_location}/Resources/locales"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${target_destination}/locales"
|
||||
COMMENT ""
|
||||
)
|
||||
|
||||
install(
|
||||
FILES "${imported_location}"
|
||||
"${cef_location}/chrome_elf.dll"
|
||||
"${cef_location}/libEGL.dll"
|
||||
"${cef_location}/libGLESv2.dll"
|
||||
"${cef_location}/snapshot_blob.bin"
|
||||
"${cef_location}/v8_context_snapshot.bin"
|
||||
"${cef_root_location}/Resources/chrome_100_percent.pak"
|
||||
"${cef_root_location}/Resources/chrome_200_percent.pak"
|
||||
"${cef_root_location}/Resources/icudtl.dat"
|
||||
"${cef_root_location}/Resources/resources.pak"
|
||||
FILES
|
||||
"${imported_location}"
|
||||
"${cef_location}/chrome_elf.dll"
|
||||
"${cef_location}/libEGL.dll"
|
||||
"${cef_location}/libGLESv2.dll"
|
||||
"${cef_location}/snapshot_blob.bin"
|
||||
"${cef_location}/v8_context_snapshot.bin"
|
||||
"${cef_root_location}/Resources/chrome_100_percent.pak"
|
||||
"${cef_root_location}/Resources/chrome_200_percent.pak"
|
||||
"${cef_root_location}/Resources/icudtl.dat"
|
||||
"${cef_root_location}/Resources/resources.pak"
|
||||
DESTINATION "${target_destination}"
|
||||
COMPONENT Runtime)
|
||||
COMPONENT Runtime
|
||||
)
|
||||
|
||||
install(
|
||||
DIRECTORY "${cef_root_location}/Resources/locales"
|
||||
DESTINATION "${target_destination}"
|
||||
USE_SOURCE_PERMISSIONS
|
||||
COMPONENT Runtime)
|
||||
COMPONENT Runtime
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@@ -166,10 +156,7 @@ function(set_target_properties_obs target)
|
||||
get_target_property(target_sources ${target} SOURCES)
|
||||
set(target_ui_files ${target_sources})
|
||||
list(FILTER target_ui_files INCLUDE REGEX ".+\\.(ui|qrc)")
|
||||
source_group(
|
||||
TREE "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
PREFIX "UI Files"
|
||||
FILES ${target_ui_files})
|
||||
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "UI Files" FILES ${target_ui_files})
|
||||
|
||||
if(${target} STREQUAL libobs)
|
||||
set(target_source_files ${target_sources})
|
||||
@@ -177,14 +164,8 @@ function(set_target_properties_obs target)
|
||||
list(FILTER target_source_files INCLUDE REGEX ".+\\.(m|c[cp]?p?|swift)")
|
||||
list(FILTER target_header_files INCLUDE REGEX ".+\\.h(pp)?")
|
||||
|
||||
source_group(
|
||||
TREE "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
PREFIX "Source Files"
|
||||
FILES ${target_source_files})
|
||||
source_group(
|
||||
TREE "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
PREFIX "Header Files"
|
||||
FILES ${target_header_files})
|
||||
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Source Files" FILES ${target_source_files})
|
||||
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Header Files" FILES ${target_header_files})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
@@ -214,7 +195,8 @@ function(_target_install_obs target)
|
||||
FILES "${32bit_project_path}/$<CONFIG>/${target}32.${suffix}"
|
||||
DESTINATION "${_TIO_DESTINATION}"
|
||||
COMPONENT Runtime
|
||||
OPTIONAL)
|
||||
OPTIONAL
|
||||
)
|
||||
else()
|
||||
set(target_file "$<TARGET_FILE:${target}>")
|
||||
set(target_pdb_file "$<TARGET_PDB_FILE:${target}>")
|
||||
@@ -233,19 +215,14 @@ function(_target_install_obs target)
|
||||
install(
|
||||
TARGETS ${target}
|
||||
RUNTIME DESTINATION "${_TIO_DESTINATION}"
|
||||
LIBRARY DESTINATION "${_TIO_LIBRARY_DESTINATION}"
|
||||
COMPONENT Runtime
|
||||
EXCLUDE_FROM_ALL
|
||||
PUBLIC_HEADER
|
||||
DESTINATION "${_TIO_HEADER_DESTINATION}"
|
||||
COMPONENT Development
|
||||
EXCLUDE_FROM_ALL)
|
||||
LIBRARY DESTINATION "${_TIO_LIBRARY_DESTINATION}" COMPONENT Runtime EXCLUDE_FROM_ALL
|
||||
PUBLIC_HEADER DESTINATION "${_TIO_HEADER_DESTINATION}" COMPONENT Development EXCLUDE_FROM_ALL
|
||||
)
|
||||
elseif(target_type STREQUAL MODULE_LIBRARY)
|
||||
install(
|
||||
TARGETS ${target}
|
||||
LIBRARY DESTINATION "${_TIO_DESTINATION}"
|
||||
COMPONENT Runtime
|
||||
NAMELINK_COMPONENT Development)
|
||||
LIBRARY DESTINATION "${_TIO_DESTINATION}" COMPONENT Runtime NAMELINK_COMPONENT Development
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -255,17 +232,20 @@ function(_target_install_obs target)
|
||||
COMMAND "${CMAKE_COMMAND}" -E echo "${comment}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E make_directory "${OBS_OUTPUT_DIR}/$<CONFIG>/${_TIO_DESTINATION}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy ${target_file} "${OBS_OUTPUT_DIR}/$<CONFIG>/${_TIO_DESTINATION}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E $<IF:$<CONFIG:Debug,RelWithDebInfo,Release>,copy,true> ${target_pdb_file}
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${_TIO_DESTINATION}"
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -E $<IF:$<CONFIG:Debug,RelWithDebInfo,Release>,copy,true> ${target_pdb_file}
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${_TIO_DESTINATION}"
|
||||
COMMENT ""
|
||||
VERBATIM)
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
install(
|
||||
FILES ${target_pdb_file}
|
||||
CONFIGURATIONS RelWithDebInfo Debug Release
|
||||
DESTINATION "${_TIO_DESTINATION}"
|
||||
COMPONENT Runtime
|
||||
OPTIONAL)
|
||||
OPTIONAL
|
||||
)
|
||||
endfunction()
|
||||
|
||||
# target_export: Helper function to export target as CMake package
|
||||
@@ -281,7 +261,8 @@ function(target_export target)
|
||||
CONFIGURATIONS RelWithDebInfo Debug Release
|
||||
DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
|
||||
COMPONENT Development
|
||||
OPTIONAL)
|
||||
OPTIONAL
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
@@ -291,8 +272,12 @@ function(target_install_resources target)
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/data")
|
||||
file(GLOB_RECURSE data_files "${CMAKE_CURRENT_SOURCE_DIR}/data/*")
|
||||
foreach(data_file IN LISTS data_files)
|
||||
cmake_path(RELATIVE_PATH data_file BASE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/data/" OUTPUT_VARIABLE
|
||||
relative_path)
|
||||
cmake_path(
|
||||
RELATIVE_PATH
|
||||
data_file
|
||||
BASE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/data/"
|
||||
OUTPUT_VARIABLE relative_path
|
||||
)
|
||||
cmake_path(GET relative_path PARENT_PATH relative_path)
|
||||
target_sources(${target} PRIVATE "${data_file}")
|
||||
source_group("Resources/${relative_path}" FILES "${data_file}")
|
||||
@@ -311,17 +296,20 @@ function(target_install_resources target)
|
||||
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/data/"
|
||||
DESTINATION "${target_destination}"
|
||||
USE_SOURCE_PERMISSIONS
|
||||
COMPONENT Runtime)
|
||||
COMPONENT Runtime
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E echo "Copy ${target} resources to data directory"
|
||||
COMMAND "${CMAKE_COMMAND}" -E make_directory "${OBS_OUTPUT_DIR}/$<CONFIG>/${target_destination}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/data"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${target_destination}"
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/data"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${target_destination}"
|
||||
COMMENT ""
|
||||
VERBATIM)
|
||||
VERBATIM
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
@@ -340,10 +328,7 @@ function(target_add_resource target resource)
|
||||
|
||||
message(DEBUG "Add resource '${resource}' to target ${target} at destination '${target_destination}'...")
|
||||
|
||||
install(
|
||||
FILES "${resource}"
|
||||
DESTINATION "${target_destination}"
|
||||
COMPONENT Runtime)
|
||||
install(FILES "${resource}" DESTINATION "${target_destination}" COMPONENT Runtime)
|
||||
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
@@ -352,7 +337,8 @@ function(target_add_resource target resource)
|
||||
COMMAND "${CMAKE_COMMAND}" -E make_directory "${OBS_OUTPUT_DIR}/$<CONFIG>/${target_destination}/"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${resource}" "${OBS_OUTPUT_DIR}/$<CONFIG>/${target_destination}/"
|
||||
COMMENT ""
|
||||
VERBATIM)
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
source_group("Resources" FILES "${resource}")
|
||||
endfunction()
|
||||
@@ -417,43 +403,51 @@ function(_bundle_dependencies target)
|
||||
POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E echo "Copy dependencies to binary directory (${OBS_EXECUTABLE_DESTINATION})..."
|
||||
COMMAND "${CMAKE_COMMAND}" -E make_directory "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E "$<IF:$<CONFIG:Debug>,copy_if_different,true>"
|
||||
"$<$<CONFIG:Debug>:${library_paths_DEBUG}>" "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}"
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -E "$<IF:$<CONFIG:Debug>,copy_if_different,true>" "$<$<CONFIG:Debug>:${library_paths_DEBUG}>"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}"
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -E "$<IF:$<CONFIG:RelWithDebInfo>,copy_if_different,true>"
|
||||
"$<$<CONFIG:RelWithDebInfo>:${library_paths_RELWITHDEBINFO}>"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E "$<IF:$<CONFIG:Release>,copy_if_different,true>"
|
||||
"$<$<CONFIG:Release>:${library_paths_RELEASE}>" "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}"
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -E "$<IF:$<CONFIG:Release>,copy_if_different,true>"
|
||||
"$<$<CONFIG:Release>:${library_paths_RELEASE}>" "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}"
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -E "$<IF:$<CONFIG:MinSizeRel>,copy_if_different,true>"
|
||||
"$<$<CONFIG:MinSizeRel>:${library_paths_MINSIZEREL}>" "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}"
|
||||
COMMENT "."
|
||||
VERBATIM COMMAND_EXPAND_LISTS)
|
||||
VERBATIM
|
||||
COMMAND_EXPAND_LISTS
|
||||
)
|
||||
|
||||
install(
|
||||
FILES ${library_paths_DEBUG}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
|
||||
COMPONENT Runtime)
|
||||
COMPONENT Runtime
|
||||
)
|
||||
|
||||
install(
|
||||
FILES ${library_paths_RELWITHDEBINFO}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
|
||||
COMPONENT Runtime)
|
||||
COMPONENT Runtime
|
||||
)
|
||||
|
||||
install(
|
||||
FILES ${library_paths_RELEASE}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
|
||||
COMPONENT Runtime)
|
||||
COMPONENT Runtime
|
||||
)
|
||||
|
||||
install(
|
||||
FILES ${library_paths_MINSIZEREL}
|
||||
CONFIGURATIONS MinSizeRel
|
||||
DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
|
||||
COMPONENT Runtime)
|
||||
COMPONENT Runtime
|
||||
)
|
||||
|
||||
list(REMOVE_DUPLICATES plugins_list)
|
||||
foreach(plugin IN LISTS plugins_list)
|
||||
@@ -478,27 +472,33 @@ function(_bundle_dependencies target)
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E echo
|
||||
"Copy Qt plugins ${stem} to binary directory (${OBS_EXECUTABLE_DESTINATION}/${stem})"
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -E echo "Copy Qt plugins ${stem} to binary directory (${OBS_EXECUTABLE_DESTINATION}/${stem})"
|
||||
COMMAND "${CMAKE_COMMAND}" -E make_directory "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}/${stem}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E "$<IF:$<CONFIG:Debug>,copy_if_different,true>" "${plugin_list_debug}"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}/${stem}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E "$<IF:$<CONFIG:Debug>,true,copy_if_different>" "${plugin_list}"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}/${stem}"
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -E "$<IF:$<CONFIG:Debug>,copy_if_different,true>" "${plugin_list_debug}"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}/${stem}"
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -E "$<IF:$<CONFIG:Debug>,true,copy_if_different>" "${plugin_list}"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}/${stem}"
|
||||
COMMENT ""
|
||||
VERBATIM COMMAND_EXPAND_LISTS)
|
||||
VERBATIM
|
||||
COMMAND_EXPAND_LISTS
|
||||
)
|
||||
|
||||
install(
|
||||
FILES ${plugin_list_debug}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${OBS_EXECUTABLE_DESTINATION}/${stem}"
|
||||
COMPONENT Runtime)
|
||||
COMPONENT Runtime
|
||||
)
|
||||
|
||||
install(
|
||||
FILES ${plugin_list}
|
||||
CONFIGURATIONS RelWithDebInfo Release MinSizeRel
|
||||
DESTINATION "${OBS_EXECUTABLE_DESTINATION}/${stem}"
|
||||
COMPONENT Runtime)
|
||||
COMPONENT Runtime
|
||||
)
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
@@ -515,17 +515,9 @@ macro(_check_library_location location)
|
||||
string(REPLACE ".lib" ".dll" _dll_name "${_dll_name}")
|
||||
string(REPLACE ".dll" ".pdb" _pdb_name "${_dll_name}")
|
||||
|
||||
find_program(
|
||||
_dll_path
|
||||
NAMES "${_dll_name}"
|
||||
HINTS ${_implib_path} ${_bin_path} NO_CACHE
|
||||
NO_DEFAULT_PATH)
|
||||
find_program(_dll_path NAMES "${_dll_name}" HINTS ${_implib_path} ${_bin_path} NO_CACHE NO_DEFAULT_PATH)
|
||||
|
||||
find_program(
|
||||
_pdb_path
|
||||
NAMES "${_pdb_name}"
|
||||
HINTS ${_implib_path} ${_bin_path} NO_CACHE
|
||||
NO_DEFAULT_PATH)
|
||||
find_program(_pdb_path NAMES "${_pdb_name}" HINTS ${_implib_path} ${_bin_path} NO_CACHE NO_DEFAULT_PATH)
|
||||
|
||||
if(_dll_path)
|
||||
set(library_location "${_dll_path}")
|
||||
|
||||
@@ -16,10 +16,12 @@ function(target_add_idl_files target)
|
||||
add_custom_command(
|
||||
OUTPUT "${idl_file_header}" "${idl_file_source}"
|
||||
DEPENDS "${idl_file}"
|
||||
COMMAND midl /h "${idl_file_name}.h" /iid "${idl_file_name}_i.c" "$<$<NOT:$<BOOL:${_AIF_WITH_TLIB}>>:/notlb>"
|
||||
/win64 "${CMAKE_CURRENT_SOURCE_DIR}/${idl_file}"
|
||||
COMMAND
|
||||
midl /h "${idl_file_name}.h" /iid "${idl_file_name}_i.c" "$<$<NOT:$<BOOL:${_AIF_WITH_TLIB}>>:/notlb>" /win64
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/${idl_file}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
COMMENT "Generate idl files")
|
||||
COMMENT "Generate idl files"
|
||||
)
|
||||
|
||||
set_source_files_properties(${idl_file} PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
target_sources(${target} PRIVATE "${idl_file_source}" "${idl_file_header}")
|
||||
|
||||
Vendored
+2
-8
@@ -3,10 +3,7 @@ cmake_minimum_required(VERSION 3.22...3.25)
|
||||
add_library(blake2 OBJECT)
|
||||
add_library(OBS::blake2 ALIAS blake2)
|
||||
|
||||
target_sources(
|
||||
blake2
|
||||
PRIVATE src/blake2-impl.h src/blake2b-ref.c
|
||||
PUBLIC src/blake2.h)
|
||||
target_sources(blake2 PRIVATE src/blake2-impl.h src/blake2b-ref.c PUBLIC src/blake2.h)
|
||||
|
||||
target_include_directories(blake2 PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src")
|
||||
|
||||
@@ -16,10 +13,7 @@ if(OS_WINDOWS)
|
||||
add_library(blake2_static OBJECT)
|
||||
add_library(OBS::blake2_static ALIAS blake2_static)
|
||||
|
||||
target_sources(
|
||||
blake2_static
|
||||
PRIVATE src/blake2-impl.h src/blake2b-ref.c
|
||||
PUBLIC src/blake2.h)
|
||||
target_sources(blake2_static PRIVATE src/blake2-impl.h src/blake2b-ref.c PUBLIC src/blake2.h)
|
||||
|
||||
target_include_directories(blake2_static PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src")
|
||||
set_target_properties(blake2_static PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
|
||||
Vendored
+12
-10
@@ -9,17 +9,18 @@ if(OBS_CMAKE_VERSION VERSION_LESS 3.0.0)
|
||||
add_library(OBS::obsglad ALIAS obsglad)
|
||||
endif()
|
||||
|
||||
# cmake-format: off
|
||||
target_sources(
|
||||
obsglad
|
||||
PRIVATE src/glad.c
|
||||
$<$<PLATFORM_ID:Windows>:src/glad_wgl.c>
|
||||
$<$<TARGET_EXISTS:OpenGL::EGL>:src/glad_egl.c>
|
||||
$<$<TARGET_EXISTS:OpenGL::EGL>:include/EGL/eglplatform.h>
|
||||
PUBLIC include/glad/glad.h
|
||||
"$<$<PLATFORM_ID:Windows>:${CMAKE_CURRENT_SOURCE_DIR}/include/glad/glad_wgl.h>"
|
||||
"$<$<TARGET_EXISTS:OpenGL::EGL>:${CMAKE_CURRENT_SOURCE_DIR}/include/glad/glad_egl.h>")
|
||||
# cmake-format: on
|
||||
PRIVATE
|
||||
src/glad.c
|
||||
$<$<PLATFORM_ID:Windows>:src/glad_wgl.c>
|
||||
$<$<TARGET_EXISTS:OpenGL::EGL>:src/glad_egl.c>
|
||||
$<$<TARGET_EXISTS:OpenGL::EGL>:include/EGL/eglplatform.h>
|
||||
PUBLIC
|
||||
include/glad/glad.h
|
||||
"$<$<PLATFORM_ID:Windows>:${CMAKE_CURRENT_SOURCE_DIR}/include/glad/glad_wgl.h>"
|
||||
"$<$<TARGET_EXISTS:OpenGL::EGL>:${CMAKE_CURRENT_SOURCE_DIR}/include/glad/glad_egl.h>"
|
||||
)
|
||||
|
||||
target_compile_options(obsglad PRIVATE $<$<COMPILE_LANG_AND_ID:C,AppleClang,Clang>:-Wno-strict-prototypes>)
|
||||
|
||||
@@ -28,6 +29,7 @@ target_include_directories(obsglad PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||
target_link_libraries(
|
||||
obsglad
|
||||
PRIVATE $<$<NOT:$<PLATFORM_ID:Windows,Darwin>>:${CMAKE_DL_LIBS}>
|
||||
PUBLIC OpenGL::GL $<$<TARGET_EXISTS:OpenGL::EGL>:OpenGL::EGL>)
|
||||
PUBLIC OpenGL::GL $<$<TARGET_EXISTS:OpenGL::EGL>:OpenGL::EGL>
|
||||
)
|
||||
|
||||
set_target_properties(obsglad PROPERTIES FOLDER deps POSITION_INDEPENDENT_CODE TRUE)
|
||||
|
||||
Vendored
+5
-6
@@ -3,15 +3,14 @@ cmake_minimum_required(VERSION 3.22...3.25)
|
||||
add_library(json11 OBJECT)
|
||||
add_library(OBS::json11 ALIAS json11)
|
||||
|
||||
target_sources(
|
||||
json11
|
||||
PRIVATE json11.cpp
|
||||
PUBLIC json11.hpp)
|
||||
target_sources(json11 PRIVATE json11.cpp PUBLIC json11.hpp)
|
||||
|
||||
target_include_directories(json11 PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL AppleClang AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 14)
|
||||
OR (CMAKE_CXX_COMPILER_ID STREQUAL Clang AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15))
|
||||
if(
|
||||
(CMAKE_CXX_COMPILER_ID STREQUAL AppleClang AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 14)
|
||||
OR (CMAKE_CXX_COMPILER_ID STREQUAL Clang AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15)
|
||||
)
|
||||
target_compile_options(json11 PUBLIC -Wno-unqualified-std-cast-call)
|
||||
endif()
|
||||
|
||||
|
||||
Vendored
+26
-28
@@ -1,42 +1,40 @@
|
||||
cmake_minimum_required(VERSION 3.22...3.25)
|
||||
|
||||
add_library(caption STATIC EXCLUDE_FROM_ALL )
|
||||
add_library(caption STATIC EXCLUDE_FROM_ALL)
|
||||
add_library(OBS::caption ALIAS caption)
|
||||
|
||||
target_sources(
|
||||
caption
|
||||
PRIVATE # cmake-format: sortable
|
||||
caption/cea708.h
|
||||
caption/eia608.h
|
||||
caption/eia608_charmap.h
|
||||
caption/mpeg.h
|
||||
caption/scc.h
|
||||
caption/utf8.h
|
||||
src/caption.c
|
||||
src/cea708.c
|
||||
src/eia608.c
|
||||
src/eia608_charmap.c
|
||||
src/eia608_from_utf8.c
|
||||
src/mpeg.c
|
||||
src/scc.c
|
||||
src/srt.c
|
||||
src/utf8.c
|
||||
src/xds.c
|
||||
PUBLIC caption/caption.h)
|
||||
PRIVATE
|
||||
caption/cea708.h
|
||||
caption/eia608.h
|
||||
caption/eia608_charmap.h
|
||||
caption/mpeg.h
|
||||
caption/scc.h
|
||||
caption/utf8.h
|
||||
src/caption.c
|
||||
src/cea708.c
|
||||
src/eia608.c
|
||||
src/eia608_charmap.c
|
||||
src/eia608_from_utf8.c
|
||||
src/mpeg.c
|
||||
src/scc.c
|
||||
src/srt.c
|
||||
src/utf8.c
|
||||
src/xds.c
|
||||
PUBLIC caption/caption.h
|
||||
)
|
||||
|
||||
target_include_directories(
|
||||
caption
|
||||
PRIVATE caption
|
||||
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
target_include_directories(caption PRIVATE caption PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
target_compile_definitions(caption PRIVATE __STDC_CONSTANT_MACROS)
|
||||
|
||||
# cmake-format: off
|
||||
target_compile_options(
|
||||
caption
|
||||
PRIVATE $<$<COMPILE_LANG_AND_ID:C,Clang,AppleClang,GNU>:-Wno-unused-but-set-parameter>
|
||||
$<$<COMPILE_LANG_AND_ID:C,Clang,AppleClang,GNU>:-Wno-strict-prototypes>
|
||||
$<$<COMPILE_LANG_AND_ID:C,Clang,AppleClang>:-Wno-comma>)
|
||||
# cmake-format: on
|
||||
PRIVATE
|
||||
$<$<COMPILE_LANG_AND_ID:C,Clang,AppleClang,GNU>:-Wno-unused-but-set-parameter>
|
||||
$<$<COMPILE_LANG_AND_ID:C,Clang,AppleClang,GNU>:-Wno-strict-prototypes>
|
||||
$<$<COMPILE_LANG_AND_ID:C,Clang,AppleClang>:-Wno-comma>
|
||||
)
|
||||
|
||||
set_target_properties(caption PROPERTIES FOLDER deps POSITION_INDEPENDENT_CODE TRUE)
|
||||
|
||||
Vendored
+6
-7
@@ -2,11 +2,13 @@ cmake_minimum_required(VERSION 3.24...3.25)
|
||||
|
||||
legacy_check()
|
||||
|
||||
add_library(w32-pthreads SHARED EXCLUDE_FROM_ALL )
|
||||
add_library(w32-pthreads SHARED EXCLUDE_FROM_ALL)
|
||||
add_library(OBS::w32-pthreads ALIAS w32-pthreads)
|
||||
|
||||
target_sources(w32-pthreads PRIVATE # cmake-format: sortable
|
||||
implement.h pthread.c pthread.h sched.h semaphore.h w32-pthreads.rc)
|
||||
target_sources(
|
||||
w32-pthreads
|
||||
PRIVATE implement.h pthread.c pthread.h sched.h semaphore.h w32-pthreads.rc
|
||||
)
|
||||
|
||||
target_compile_definitions(w32-pthreads PRIVATE __CLEANUP_C PTW32_BUILD)
|
||||
|
||||
@@ -16,9 +18,6 @@ configure_file(cmake/windows/obs-module.rc.in w32-pthreads.rc)
|
||||
|
||||
set_target_properties_obs(w32-pthreads PROPERTIES FOLDER deps)
|
||||
|
||||
set_property(
|
||||
TARGET w32-pthreads
|
||||
APPEND
|
||||
PROPERTY PUBLIC_HEADER pthread.h sched.h)
|
||||
set_property(TARGET w32-pthreads APPEND PROPERTY PUBLIC_HEADER pthread.h sched.h)
|
||||
|
||||
target_export(w32-pthreads)
|
||||
|
||||
+27
-21
@@ -7,38 +7,44 @@ add_library(OBS::libobs-d3d11 ALIAS libobs-d3d11)
|
||||
|
||||
target_sources(
|
||||
libobs-d3d11
|
||||
PRIVATE # cmake-format: sortable
|
||||
d3d11-duplicator.cpp
|
||||
d3d11-indexbuffer.cpp
|
||||
d3d11-rebuild.cpp
|
||||
d3d11-samplerstate.cpp
|
||||
d3d11-shader.cpp
|
||||
d3d11-shaderprocessor.cpp
|
||||
d3d11-shaderprocessor.hpp
|
||||
d3d11-stagesurf.cpp
|
||||
d3d11-subsystem.cpp
|
||||
d3d11-subsystem.hpp
|
||||
d3d11-texture2d.cpp
|
||||
d3d11-texture3d.cpp
|
||||
d3d11-vertexbuffer.cpp
|
||||
d3d11-zstencilbuffer.cpp)
|
||||
PRIVATE
|
||||
d3d11-duplicator.cpp
|
||||
d3d11-indexbuffer.cpp
|
||||
d3d11-rebuild.cpp
|
||||
d3d11-samplerstate.cpp
|
||||
d3d11-shader.cpp
|
||||
d3d11-shaderprocessor.cpp
|
||||
d3d11-shaderprocessor.hpp
|
||||
d3d11-stagesurf.cpp
|
||||
d3d11-subsystem.cpp
|
||||
d3d11-subsystem.hpp
|
||||
d3d11-texture2d.cpp
|
||||
d3d11-texture3d.cpp
|
||||
d3d11-vertexbuffer.cpp
|
||||
d3d11-zstencilbuffer.cpp
|
||||
)
|
||||
|
||||
configure_file(cmake/windows/obs-module.rc.in libobs-d3d11.rc)
|
||||
target_sources(libobs-d3d11 PRIVATE libobs-d3d11.rc)
|
||||
|
||||
target_compile_definitions(
|
||||
libobs-d3d11 PRIVATE $<$<BOOL:${GPU_PRIORITY_VAL}>:USE_GPU_PRIORITY>
|
||||
"$<IF:$<BOOL:${GPU_PRIORITY_VAL}>,GPU_PRIORITY_VAL=${GPU_PRIORITY_VAL},GPU_PRIORITY_VAL=0>")
|
||||
libobs-d3d11
|
||||
PRIVATE
|
||||
$<$<BOOL:${GPU_PRIORITY_VAL}>:USE_GPU_PRIORITY>
|
||||
"$<IF:$<BOOL:${GPU_PRIORITY_VAL}>,GPU_PRIORITY_VAL=${GPU_PRIORITY_VAL},GPU_PRIORITY_VAL=0>"
|
||||
)
|
||||
|
||||
target_link_libraries(libobs-d3d11 PRIVATE OBS::libobs d3d9 d3d11 d3dcompiler dxgi shcore)
|
||||
target_link_libraries(
|
||||
libobs-d3d11
|
||||
PRIVATE OBS::libobs d3d9 d3d11 d3dcompiler dxgi shcore
|
||||
)
|
||||
|
||||
target_enable_feature(libobs "Direct3D 11 renderer")
|
||||
|
||||
# cmake-format: off
|
||||
set_target_properties_obs(
|
||||
libobs-d3d11
|
||||
PROPERTIES FOLDER core
|
||||
VERSION 0
|
||||
SOVERSION ${OBS_VERSION_MAJOR}
|
||||
COMPILE_WARNING_AS_ERROR FALSE)
|
||||
# cmake-format: on
|
||||
COMPILE_WARNING_AS_ERROR FALSE
|
||||
)
|
||||
|
||||
@@ -9,13 +9,9 @@ if(NOT TARGET OBS::glad)
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/deps/glad" "${CMAKE_BINARY_DIR}/deps/glad")
|
||||
endif()
|
||||
|
||||
if(OS_LINUX
|
||||
OR OS_FREEBSD
|
||||
OR OS_OPENBSD)
|
||||
if(OS_LINUX OR OS_FREEBSD OR OS_OPENBSD)
|
||||
find_package(X11 REQUIRED)
|
||||
# cmake-format: off
|
||||
find_package(Xcb REQUIRED xcb)
|
||||
# cmake-format: on
|
||||
find_package(X11-xcb REQUIRED)
|
||||
|
||||
if(ENABLE_WAYLAND)
|
||||
@@ -26,27 +22,28 @@ endif()
|
||||
|
||||
target_sources(
|
||||
libobs-opengl
|
||||
PRIVATE # cmake-format: sortable
|
||||
$<$<AND:$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>,$<BOOL:${ENABLE_WAYLAND}>>:gl-wayland-egl.c>
|
||||
$<$<PLATFORM_ID:Darwin>:gl-cocoa.m>
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:gl-egl-common.c>
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:gl-nix.c>
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:gl-x11-egl.c>
|
||||
$<$<PLATFORM_ID:Windows>:gl-windows.c>
|
||||
gl-helpers.c
|
||||
gl-helpers.h
|
||||
gl-indexbuffer.c
|
||||
gl-shader.c
|
||||
gl-shaderparser.c
|
||||
gl-shaderparser.h
|
||||
gl-stagesurf.c
|
||||
gl-subsystem.c
|
||||
gl-subsystem.h
|
||||
gl-texture2d.c
|
||||
gl-texture3d.c
|
||||
gl-texturecube.c
|
||||
gl-vertexbuffer.c
|
||||
gl-zstencil.c)
|
||||
PRIVATE
|
||||
$<$<AND:$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>,$<BOOL:${ENABLE_WAYLAND}>>:gl-wayland-egl.c>
|
||||
$<$<PLATFORM_ID:Darwin>:gl-cocoa.m>
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:gl-egl-common.c>
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:gl-nix.c>
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:gl-x11-egl.c>
|
||||
$<$<PLATFORM_ID:Windows>:gl-windows.c>
|
||||
gl-helpers.c
|
||||
gl-helpers.h
|
||||
gl-indexbuffer.c
|
||||
gl-shader.c
|
||||
gl-shaderparser.c
|
||||
gl-shaderparser.h
|
||||
gl-stagesurf.c
|
||||
gl-subsystem.c
|
||||
gl-subsystem.h
|
||||
gl-texture2d.c
|
||||
gl-texture3d.c
|
||||
gl-texturecube.c
|
||||
gl-vertexbuffer.c
|
||||
gl-zstencil.c
|
||||
)
|
||||
|
||||
target_compile_options(libobs-opengl PRIVATE $<$<COMPILE_LANG_AND_ID:C,AppleClang,Clang>:-Wno-strict-prototypes>)
|
||||
|
||||
@@ -54,14 +51,16 @@ target_compile_definitions(libobs-opengl PRIVATE $<$<PLATFORM_ID:Darwin>:GL_SILE
|
||||
|
||||
target_link_libraries(
|
||||
libobs-opengl
|
||||
PRIVATE OBS::libobs
|
||||
OBS::glad
|
||||
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,Cocoa.framework>>"
|
||||
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,IOSurface.framework>>"
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:xcb::xcb>
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:X11::x11-xcb>
|
||||
$<$<AND:$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>,$<BOOL:${ENABLE_WAYLAND}>>:OpenGL::EGL>
|
||||
$<$<AND:$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>,$<BOOL:${ENABLE_WAYLAND}>>:Wayland::EGL>)
|
||||
PRIVATE
|
||||
OBS::libobs
|
||||
OBS::glad
|
||||
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,Cocoa.framework>>"
|
||||
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,IOSurface.framework>>"
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:xcb::xcb>
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:X11::x11-xcb>
|
||||
$<$<AND:$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>,$<BOOL:${ENABLE_WAYLAND}>>:OpenGL::EGL>
|
||||
$<$<AND:$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>,$<BOOL:${ENABLE_WAYLAND}>>:Wayland::EGL>
|
||||
)
|
||||
|
||||
if(OS_WINDOWS)
|
||||
configure_file(cmake/windows/obs-module.rc.in libobs-opengl.rc)
|
||||
@@ -70,11 +69,10 @@ endif()
|
||||
|
||||
target_enable_feature(libobs "OpenGL renderer")
|
||||
|
||||
# cmake-format: off
|
||||
set_target_properties_obs(
|
||||
libobs-opengl
|
||||
PROPERTIES FOLDER core
|
||||
VERSION 0
|
||||
PREFIX ""
|
||||
SOVERSION "${OBS_VERSION_MAJOR}")
|
||||
# cmake-format: on
|
||||
SOVERSION "${OBS_VERSION_MAJOR}"
|
||||
)
|
||||
|
||||
+11
-12
@@ -16,19 +16,18 @@ target_sources(libobs-winrt PRIVATE winrt-capture.cpp winrt-capture.h winrt-disp
|
||||
target_precompile_headers(
|
||||
libobs-winrt
|
||||
PRIVATE
|
||||
<d3d11.h>
|
||||
<DispatcherQueue.h>
|
||||
<dwmapi.h>
|
||||
<obs-module.h>
|
||||
<util/windows/ComPtr.hpp>
|
||||
<Windows.Graphics.Capture.Interop.h>
|
||||
<windows.graphics.directx.direct3d11.interop.h>
|
||||
<winrt/Windows.Foundation.Metadata.h>
|
||||
<winrt/Windows.Graphics.Capture.h>
|
||||
<winrt/Windows.System.h>)
|
||||
<d3d11.h>
|
||||
<DispatcherQueue.h>
|
||||
<dwmapi.h>
|
||||
<obs-module.h>
|
||||
<util/windows/ComPtr.hpp>
|
||||
<Windows.Graphics.Capture.Interop.h>
|
||||
<windows.graphics.directx.direct3d11.interop.h>
|
||||
<winrt/Windows.Foundation.Metadata.h>
|
||||
<winrt/Windows.Graphics.Capture.h>
|
||||
<winrt/Windows.System.h>
|
||||
)
|
||||
|
||||
target_link_libraries(libobs-winrt PRIVATE OBS::libobs OBS::COMutils Dwmapi windowsapp)
|
||||
|
||||
# cmake-format: off
|
||||
set_target_properties_obs(libobs-winrt PROPERTIES FOLDER core)
|
||||
# cmake-format: on
|
||||
|
||||
@@ -25,8 +25,7 @@ target_compile_features(libobs-winrt PRIVATE cxx_std_17)
|
||||
|
||||
set_target_properties(
|
||||
libobs-winrt
|
||||
PROPERTIES OUTPUT_NAME libobs-winrt
|
||||
FOLDER "core"
|
||||
PREFIX "")
|
||||
PROPERTIES OUTPUT_NAME libobs-winrt FOLDER "core" PREFIX ""
|
||||
)
|
||||
|
||||
setup_binary_target(libobs-winrt)
|
||||
|
||||
+306
-301
@@ -6,21 +6,13 @@ include(cmake/obs-version.cmake)
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
# cmake-format: off
|
||||
if(OS_WINDOWS OR OS_MACOS)
|
||||
set(ffmpeg_version 6)
|
||||
else()
|
||||
set(ffmpeg_version 4.4)
|
||||
endif()
|
||||
|
||||
find_package(
|
||||
FFmpeg ${ffmpeg_version}
|
||||
REQUIRED avformat
|
||||
avutil
|
||||
swscale
|
||||
swresample
|
||||
OPTIONAL_COMPONENTS avcodec)
|
||||
# cmake-format: on
|
||||
find_package(FFmpeg ${ffmpeg_version} REQUIRED avformat avutil swscale swresample OPTIONAL_COMPONENTS avcodec)
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_package(Uthash REQUIRED)
|
||||
@@ -39,323 +31,116 @@ add_library(OBS::libobs ALIAS libobs)
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE # cmake-format: sortable
|
||||
$<$<BOOL:${ENABLE_HEVC}>:obs-hevc.c>
|
||||
$<$<BOOL:${ENABLE_HEVC}>:obs-hevc.h>
|
||||
obs-audio-controls.c
|
||||
obs-audio-controls.h
|
||||
obs-audio.c
|
||||
obs-av1.c
|
||||
obs-av1.h
|
||||
obs-avc.c
|
||||
obs-avc.h
|
||||
obs-config.h
|
||||
obs-data.c
|
||||
obs-data.h
|
||||
obs-defs.h
|
||||
obs-display.c
|
||||
obs-encoder.c
|
||||
obs-encoder.h
|
||||
obs-ffmpeg-compat.h
|
||||
obs-hotkey-name-map.c
|
||||
obs-hotkey.c
|
||||
obs-hotkey.h
|
||||
obs-hotkeys.h
|
||||
obs-interaction.h
|
||||
obs-internal.h
|
||||
obs-missing-files.c
|
||||
obs-missing-files.h
|
||||
obs-module.c
|
||||
obs-module.h
|
||||
obs-nal.c
|
||||
obs-nal.h
|
||||
obs-output-delay.c
|
||||
obs-output.c
|
||||
obs-output.h
|
||||
obs-properties.c
|
||||
obs-properties.h
|
||||
obs-scene.c
|
||||
obs-scene.h
|
||||
obs-service.c
|
||||
obs-service.h
|
||||
obs-source-deinterlace.c
|
||||
obs-source-transition.c
|
||||
obs-source.c
|
||||
obs-source.h
|
||||
obs-video-gpu-encode.c
|
||||
obs-video.c
|
||||
obs-view.c
|
||||
obs.c
|
||||
obs.h
|
||||
obs.hpp)
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE # cmake-format: sortable
|
||||
util/array-serializer.c
|
||||
util/array-serializer.h
|
||||
util/base.c
|
||||
util/base.h
|
||||
util/bitstream.c
|
||||
util/bitstream.h
|
||||
util/bmem.c
|
||||
util/bmem.h
|
||||
util/buffered-file-serializer.c
|
||||
util/buffered-file-serializer.h
|
||||
util/c99defs.h
|
||||
util/cf-lexer.c
|
||||
util/cf-lexer.h
|
||||
util/cf-parser.c
|
||||
util/cf-parser.h
|
||||
util/circlebuf.h
|
||||
util/config-file.c
|
||||
util/config-file.h
|
||||
util/crc32.c
|
||||
util/crc32.h
|
||||
util/curl/curl-helper.h
|
||||
util/darray.h
|
||||
util/deque.h
|
||||
util/dstr.c
|
||||
util/dstr.h
|
||||
util/file-serializer.c
|
||||
util/file-serializer.h
|
||||
util/lexer.c
|
||||
util/lexer.h
|
||||
util/pipe.c
|
||||
util/pipe.h
|
||||
util/platform.c
|
||||
util/platform.h
|
||||
util/profiler.c
|
||||
util/profiler.h
|
||||
util/profiler.hpp
|
||||
util/serializer.h
|
||||
util/source-profiler.c
|
||||
util/source-profiler.h
|
||||
util/sse-intrin.h
|
||||
util/task.c
|
||||
util/task.h
|
||||
util/text-lookup.c
|
||||
util/text-lookup.h
|
||||
util/threading.h
|
||||
util/utf8.c
|
||||
util/utf8.h
|
||||
util/uthash.h
|
||||
util/util.hpp
|
||||
util/util_uint128.h
|
||||
util/util_uint64.h)
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE # cmake-format: sortable
|
||||
util/simde/check.h
|
||||
util/simde/debug-trap.h
|
||||
util/simde/hedley.h
|
||||
util/simde/simde-align.h
|
||||
util/simde/simde-arch.h
|
||||
util/simde/simde-common.h
|
||||
util/simde/simde-constify.h
|
||||
util/simde/simde-detect-clang.h
|
||||
util/simde/simde-diagnostic.h
|
||||
util/simde/simde-features.h
|
||||
util/simde/simde-math.h
|
||||
util/simde/x86/mmx.h
|
||||
util/simde/x86/sse.h
|
||||
util/simde/x86/sse2.h)
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE # cmake-format: sortable
|
||||
callback/calldata.c
|
||||
callback/calldata.h
|
||||
callback/decl.c
|
||||
callback/decl.h
|
||||
callback/proc.c
|
||||
callback/proc.h
|
||||
callback/signal.c
|
||||
callback/signal.h)
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE # cmake-format: sortable
|
||||
media-io/audio-io.c
|
||||
media-io/audio-io.h
|
||||
media-io/audio-math.h
|
||||
media-io/audio-resampler-ffmpeg.c
|
||||
media-io/audio-resampler.h
|
||||
media-io/format-conversion.c
|
||||
media-io/format-conversion.h
|
||||
media-io/frame-rate.h
|
||||
media-io/media-io-defs.h
|
||||
media-io/media-remux.c
|
||||
media-io/media-remux.h
|
||||
media-io/video-fourcc.c
|
||||
media-io/video-frame.c
|
||||
media-io/video-frame.h
|
||||
media-io/video-io.c
|
||||
media-io/video-io.h
|
||||
media-io/video-matrices.c
|
||||
media-io/video-scaler-ffmpeg.c
|
||||
media-io/video-scaler.h)
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE # cmake-format: sortable
|
||||
graphics/axisang.c
|
||||
graphics/axisang.h
|
||||
graphics/bounds.c
|
||||
graphics/bounds.h
|
||||
graphics/device-exports.h
|
||||
graphics/effect-parser.c
|
||||
graphics/effect-parser.h
|
||||
graphics/effect.c
|
||||
graphics/effect.h
|
||||
graphics/graphics-ffmpeg.c
|
||||
graphics/graphics-imports.c
|
||||
graphics/graphics-internal.h
|
||||
graphics/graphics.c
|
||||
graphics/graphics.h
|
||||
graphics/half.h
|
||||
graphics/image-file.c
|
||||
graphics/image-file.h
|
||||
graphics/input.h
|
||||
graphics/libnsgif/libnsgif.c
|
||||
graphics/libnsgif/libnsgif.h
|
||||
graphics/math-defs.h
|
||||
graphics/math-extra.c
|
||||
graphics/math-extra.h
|
||||
graphics/matrix3.c
|
||||
graphics/matrix3.h
|
||||
graphics/matrix4.c
|
||||
graphics/matrix4.h
|
||||
graphics/plane.c
|
||||
graphics/plane.h
|
||||
graphics/quat.c
|
||||
graphics/quat.h
|
||||
graphics/shader-parser.c
|
||||
graphics/shader-parser.h
|
||||
graphics/srgb.h
|
||||
graphics/texture-render.c
|
||||
graphics/vec2.c
|
||||
graphics/vec2.h
|
||||
graphics/vec3.c
|
||||
graphics/vec3.h
|
||||
graphics/vec4.c
|
||||
graphics/vec4.h)
|
||||
|
||||
target_compile_features(libobs PUBLIC cxx_std_17)
|
||||
|
||||
target_compile_definitions(
|
||||
libobs
|
||||
PRIVATE IS_LIBOBS
|
||||
PUBLIC $<BUILD_INTERFACE:$<$<BOOL:${ENABLE_HEVC}>:ENABLE_HEVC>>
|
||||
$<BUILD_INTERFACE:$<$<BOOL:${ENABLE_FFMPEG_MUX_DEBUG}>:SHOW_SUBPROCESSES>>)
|
||||
|
||||
target_link_libraries(
|
||||
libobs
|
||||
PRIVATE OBS::caption
|
||||
OBS::libobs-version
|
||||
FFmpeg::avcodec
|
||||
FFmpeg::avformat
|
||||
FFmpeg::avutil
|
||||
FFmpeg::swscale
|
||||
FFmpeg::swresample
|
||||
jansson::jansson
|
||||
Uthash::Uthash
|
||||
ZLIB::ZLIB
|
||||
PUBLIC Threads::Threads)
|
||||
|
||||
if(OS_WINDOWS)
|
||||
include(cmake/os-windows.cmake)
|
||||
elseif(OS_MACOS)
|
||||
include(cmake/os-macos.cmake)
|
||||
elseif(OS_LINUX)
|
||||
include(cmake/os-linux.cmake)
|
||||
elseif(OS_FREEBSD OR OS_OPENBSD)
|
||||
include(cmake/os-freebsd.cmake)
|
||||
endif()
|
||||
|
||||
configure_file(obsconfig.h.in "${CMAKE_BINARY_DIR}/config/obsconfig.h" @ONLY)
|
||||
|
||||
target_include_directories(libobs PUBLIC "$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/config>"
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>")
|
||||
|
||||
target_compile_definitions(libobs PUBLIC HAVE_OBSCONFIG_H)
|
||||
|
||||
set(public_headers
|
||||
# cmake-format: sortable
|
||||
callback/calldata.h
|
||||
callback/decl.h
|
||||
callback/proc.h
|
||||
callback/signal.h
|
||||
graphics/axisang.h
|
||||
graphics/bounds.h
|
||||
graphics/effect-parser.h
|
||||
graphics/effect.h
|
||||
graphics/graphics.h
|
||||
graphics/image-file.h
|
||||
graphics/input.h
|
||||
graphics/libnsgif/libnsgif.h
|
||||
graphics/math-defs.h
|
||||
graphics/math-extra.h
|
||||
graphics/matrix3.h
|
||||
graphics/matrix4.h
|
||||
graphics/plane.h
|
||||
graphics/quat.h
|
||||
graphics/shader-parser.h
|
||||
graphics/srgb.h
|
||||
graphics/vec2.h
|
||||
graphics/vec3.h
|
||||
graphics/vec4.h
|
||||
media-io/audio-io.h
|
||||
media-io/audio-math.h
|
||||
media-io/audio-resampler.h
|
||||
media-io/format-conversion.h
|
||||
media-io/frame-rate.h
|
||||
media-io/media-io-defs.h
|
||||
media-io/media-remux.h
|
||||
media-io/video-frame.h
|
||||
media-io/video-io.h
|
||||
media-io/video-scaler.h
|
||||
PRIVATE
|
||||
$<$<BOOL:${ENABLE_HEVC}>:obs-hevc.c>
|
||||
$<$<BOOL:${ENABLE_HEVC}>:obs-hevc.h>
|
||||
obs-audio-controls.c
|
||||
obs-audio-controls.h
|
||||
obs-audio.c
|
||||
obs-av1.c
|
||||
obs-av1.h
|
||||
obs-avc.c
|
||||
obs-avc.h
|
||||
obs-config.h
|
||||
obs-data.c
|
||||
obs-data.h
|
||||
obs-defs.h
|
||||
obs-display.c
|
||||
obs-encoder.c
|
||||
obs-encoder.h
|
||||
obs-ffmpeg-compat.h
|
||||
obs-hotkey-name-map.c
|
||||
obs-hotkey.c
|
||||
obs-hotkey.h
|
||||
obs-hotkeys.h
|
||||
obs-interaction.h
|
||||
obs-internal.h
|
||||
obs-missing-files.c
|
||||
obs-missing-files.h
|
||||
obs-module.c
|
||||
obs-module.h
|
||||
obs-nal.c
|
||||
obs-nal.h
|
||||
obs-nix-platform.h
|
||||
obs-output-delay.c
|
||||
obs-output.c
|
||||
obs-output.h
|
||||
obs-properties.c
|
||||
obs-properties.h
|
||||
obs-scene.c
|
||||
obs-scene.h
|
||||
obs-service.c
|
||||
obs-service.h
|
||||
obs-source-deinterlace.c
|
||||
obs-source-transition.c
|
||||
obs-source.c
|
||||
obs-source.h
|
||||
obs-video-gpu-encode.c
|
||||
obs-video.c
|
||||
obs-view.c
|
||||
obs.c
|
||||
obs.h
|
||||
obs.hpp
|
||||
)
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE
|
||||
util/array-serializer.c
|
||||
util/array-serializer.h
|
||||
util/base.c
|
||||
util/base.h
|
||||
util/bitstream.c
|
||||
util/bitstream.h
|
||||
util/bmem.c
|
||||
util/bmem.h
|
||||
util/buffered-file-serializer.c
|
||||
util/buffered-file-serializer.h
|
||||
util/c99defs.h
|
||||
util/cf-lexer.c
|
||||
util/cf-lexer.h
|
||||
util/cf-parser.c
|
||||
util/cf-parser.h
|
||||
util/circlebuf.h
|
||||
util/config-file.c
|
||||
util/config-file.h
|
||||
util/crc32.c
|
||||
util/crc32.h
|
||||
util/curl/curl-helper.h
|
||||
util/darray.h
|
||||
util/deque.h
|
||||
util/dstr.c
|
||||
util/dstr.h
|
||||
util/dstr.hpp
|
||||
util/file-serializer.c
|
||||
util/file-serializer.h
|
||||
util/lexer.c
|
||||
util/lexer.h
|
||||
util/pipe.c
|
||||
util/pipe.h
|
||||
util/platform.c
|
||||
util/platform.h
|
||||
util/profiler.c
|
||||
util/profiler.h
|
||||
util/profiler.hpp
|
||||
util/serializer.h
|
||||
util/source-profiler.c
|
||||
util/source-profiler.h
|
||||
util/sse-intrin.h
|
||||
util/task.c
|
||||
util/task.h
|
||||
util/text-lookup.c
|
||||
util/text-lookup.h
|
||||
util/threading.h
|
||||
util/utf8.c
|
||||
util/utf8.h
|
||||
util/uthash.h
|
||||
util/util.hpp
|
||||
util/util_uint128.h
|
||||
util/util_uint64.h
|
||||
)
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE
|
||||
util/simde/check.h
|
||||
util/simde/debug-trap.h
|
||||
util/simde/hedley.h
|
||||
@@ -370,15 +155,235 @@ set(public_headers
|
||||
util/simde/x86/mmx.h
|
||||
util/simde/x86/sse.h
|
||||
util/simde/x86/sse2.h
|
||||
util/sse-intrin.h
|
||||
util/task.h
|
||||
util/text-lookup.h
|
||||
util/threading-posix.h
|
||||
util/threading.h
|
||||
util/uthash.h
|
||||
util/util.hpp
|
||||
util/util_uint128.h
|
||||
util/util_uint64.h)
|
||||
)
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE
|
||||
callback/calldata.c
|
||||
callback/calldata.h
|
||||
callback/decl.c
|
||||
callback/decl.h
|
||||
callback/proc.c
|
||||
callback/proc.h
|
||||
callback/signal.c
|
||||
callback/signal.h
|
||||
)
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE
|
||||
media-io/audio-io.c
|
||||
media-io/audio-io.h
|
||||
media-io/audio-math.h
|
||||
media-io/audio-resampler-ffmpeg.c
|
||||
media-io/audio-resampler.h
|
||||
media-io/format-conversion.c
|
||||
media-io/format-conversion.h
|
||||
media-io/frame-rate.h
|
||||
media-io/media-io-defs.h
|
||||
media-io/media-remux.c
|
||||
media-io/media-remux.h
|
||||
media-io/video-fourcc.c
|
||||
media-io/video-frame.c
|
||||
media-io/video-frame.h
|
||||
media-io/video-io.c
|
||||
media-io/video-io.h
|
||||
media-io/video-matrices.c
|
||||
media-io/video-scaler-ffmpeg.c
|
||||
media-io/video-scaler.h
|
||||
)
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE
|
||||
graphics/axisang.c
|
||||
graphics/axisang.h
|
||||
graphics/bounds.c
|
||||
graphics/bounds.h
|
||||
graphics/device-exports.h
|
||||
graphics/effect-parser.c
|
||||
graphics/effect-parser.h
|
||||
graphics/effect.c
|
||||
graphics/effect.h
|
||||
graphics/graphics-ffmpeg.c
|
||||
graphics/graphics-imports.c
|
||||
graphics/graphics-internal.h
|
||||
graphics/graphics.c
|
||||
graphics/graphics.h
|
||||
graphics/half.h
|
||||
graphics/image-file.c
|
||||
graphics/image-file.h
|
||||
graphics/input.h
|
||||
graphics/libnsgif/libnsgif.c
|
||||
graphics/libnsgif/libnsgif.h
|
||||
graphics/math-defs.h
|
||||
graphics/math-extra.c
|
||||
graphics/math-extra.h
|
||||
graphics/matrix3.c
|
||||
graphics/matrix3.h
|
||||
graphics/matrix4.c
|
||||
graphics/matrix4.h
|
||||
graphics/plane.c
|
||||
graphics/plane.h
|
||||
graphics/quat.c
|
||||
graphics/quat.h
|
||||
graphics/shader-parser.c
|
||||
graphics/shader-parser.h
|
||||
graphics/srgb.h
|
||||
graphics/texture-render.c
|
||||
graphics/vec2.c
|
||||
graphics/vec2.h
|
||||
graphics/vec3.c
|
||||
graphics/vec3.h
|
||||
graphics/vec4.c
|
||||
graphics/vec4.h
|
||||
)
|
||||
|
||||
target_compile_features(libobs PUBLIC cxx_std_17)
|
||||
|
||||
target_compile_definitions(
|
||||
libobs
|
||||
PRIVATE IS_LIBOBS
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:$<$<BOOL:${ENABLE_HEVC}>:ENABLE_HEVC>>
|
||||
$<BUILD_INTERFACE:$<$<BOOL:${ENABLE_FFMPEG_MUX_DEBUG}>:SHOW_SUBPROCESSES>>
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
libobs
|
||||
PRIVATE
|
||||
OBS::caption
|
||||
OBS::libobs-version
|
||||
FFmpeg::avcodec
|
||||
FFmpeg::avformat
|
||||
FFmpeg::avutil
|
||||
FFmpeg::swscale
|
||||
FFmpeg::swresample
|
||||
jansson::jansson
|
||||
Uthash::Uthash
|
||||
ZLIB::ZLIB
|
||||
PUBLIC Threads::Threads
|
||||
)
|
||||
|
||||
if(OS_WINDOWS)
|
||||
include(cmake/os-windows.cmake)
|
||||
elseif(OS_MACOS)
|
||||
include(cmake/os-macos.cmake)
|
||||
elseif(OS_LINUX)
|
||||
include(cmake/os-linux.cmake)
|
||||
elseif(OS_FREEBSD OR OS_OPENBSD)
|
||||
include(cmake/os-freebsd.cmake)
|
||||
endif()
|
||||
|
||||
configure_file(obsconfig.h.in "${CMAKE_BINARY_DIR}/config/obsconfig.h" @ONLY)
|
||||
|
||||
target_include_directories(
|
||||
libobs
|
||||
PUBLIC "$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/config>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>"
|
||||
)
|
||||
|
||||
target_compile_definitions(libobs PUBLIC HAVE_OBSCONFIG_H)
|
||||
|
||||
set(
|
||||
public_headers
|
||||
callback/calldata.h
|
||||
callback/decl.h
|
||||
callback/proc.h
|
||||
callback/signal.h
|
||||
graphics/axisang.h
|
||||
graphics/bounds.h
|
||||
graphics/effect-parser.h
|
||||
graphics/effect.h
|
||||
graphics/graphics.h
|
||||
graphics/image-file.h
|
||||
graphics/input.h
|
||||
graphics/libnsgif/libnsgif.h
|
||||
graphics/math-defs.h
|
||||
graphics/math-extra.h
|
||||
graphics/matrix3.h
|
||||
graphics/matrix4.h
|
||||
graphics/plane.h
|
||||
graphics/quat.h
|
||||
graphics/shader-parser.h
|
||||
graphics/srgb.h
|
||||
graphics/vec2.h
|
||||
graphics/vec3.h
|
||||
graphics/vec4.h
|
||||
media-io/audio-io.h
|
||||
media-io/audio-math.h
|
||||
media-io/audio-resampler.h
|
||||
media-io/format-conversion.h
|
||||
media-io/frame-rate.h
|
||||
media-io/media-io-defs.h
|
||||
media-io/media-remux.h
|
||||
media-io/video-frame.h
|
||||
media-io/video-io.h
|
||||
media-io/video-scaler.h
|
||||
obs-audio-controls.h
|
||||
obs-avc.h
|
||||
obs-config.h
|
||||
obs-data.h
|
||||
obs-defs.h
|
||||
obs-encoder.h
|
||||
obs-hotkey.h
|
||||
obs-hotkeys.h
|
||||
obs-interaction.h
|
||||
obs-missing-files.h
|
||||
obs-module.h
|
||||
obs-nal.h
|
||||
obs-nix-platform.h
|
||||
obs-output.h
|
||||
obs-properties.h
|
||||
obs-service.h
|
||||
obs-source.h
|
||||
obs.h
|
||||
obs.hpp
|
||||
util/array-serializer.h
|
||||
util/base.h
|
||||
util/bitstream.h
|
||||
util/bmem.h
|
||||
util/c99defs.h
|
||||
util/cf-lexer.h
|
||||
util/cf-parser.h
|
||||
util/circlebuf.h
|
||||
util/config-file.h
|
||||
util/crc32.h
|
||||
util/darray.h
|
||||
util/deque.h
|
||||
util/dstr.h
|
||||
util/dstr.hpp
|
||||
util/file-serializer.h
|
||||
util/lexer.h
|
||||
util/pipe.h
|
||||
util/platform.h
|
||||
util/profiler.h
|
||||
util/profiler.hpp
|
||||
util/serializer.h
|
||||
util/simde/check.h
|
||||
util/simde/debug-trap.h
|
||||
util/simde/hedley.h
|
||||
util/simde/simde-align.h
|
||||
util/simde/simde-arch.h
|
||||
util/simde/simde-common.h
|
||||
util/simde/simde-constify.h
|
||||
util/simde/simde-detect-clang.h
|
||||
util/simde/simde-diagnostic.h
|
||||
util/simde/simde-features.h
|
||||
util/simde/simde-math.h
|
||||
util/simde/x86/mmx.h
|
||||
util/simde/x86/sse.h
|
||||
util/simde/x86/sse2.h
|
||||
util/sse-intrin.h
|
||||
util/task.h
|
||||
util/text-lookup.h
|
||||
util/threading-posix.h
|
||||
util/threading.h
|
||||
util/uthash.h
|
||||
util/util.hpp
|
||||
util/util_uint128.h
|
||||
util/util_uint64.h
|
||||
)
|
||||
|
||||
if(OS_WINDOWS)
|
||||
list(
|
||||
@@ -392,7 +397,8 @@ if(OS_WINDOWS)
|
||||
util/windows/win-registry.h
|
||||
util/windows/win-version.h
|
||||
util/windows/window-helpers.h
|
||||
util/windows/WinHandle.hpp)
|
||||
util/windows/WinHandle.hpp
|
||||
)
|
||||
elseif(OS_MACOS)
|
||||
list(APPEND public_headers util/apple/cfstring-utils.h)
|
||||
endif()
|
||||
@@ -401,14 +407,13 @@ if(ENABLE_HEVC)
|
||||
list(APPEND public_headers obs-hevc.h)
|
||||
endif()
|
||||
|
||||
# cmake-format: off
|
||||
set_property(TARGET libobs APPEND PROPERTY OBS_PUBLIC_HEADERS ${public_headers})
|
||||
|
||||
set_target_properties_obs(
|
||||
libobs
|
||||
PROPERTIES FOLDER core
|
||||
VERSION 0
|
||||
SOVERSION "${OBS_VERSION_MAJOR}")
|
||||
# cmake-format: on
|
||||
SOVERSION "${OBS_VERSION_MAJOR}"
|
||||
)
|
||||
|
||||
target_export(libobs)
|
||||
|
||||
+254
-255
@@ -4,10 +4,8 @@ endif()
|
||||
|
||||
project(libobs)
|
||||
|
||||
# cmake-format: off
|
||||
add_library(libobs-version STATIC EXCLUDE_FROM_ALL)
|
||||
add_library(OBS::libobs-version ALIAS libobs-version)
|
||||
# cmake-format: on
|
||||
configure_file(obsversion.c.in obsversion.c @ONLY)
|
||||
target_sources(libobs-version PRIVATE obsversion.c obsversion.h)
|
||||
target_include_directories(libobs-version PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
@@ -15,10 +13,7 @@ set_property(TARGET libobs-version PROPERTY FOLDER core)
|
||||
|
||||
find_package(Jansson 2.5 REQUIRED)
|
||||
find_package(Threads REQUIRED)
|
||||
find_package(
|
||||
FFmpeg REQUIRED
|
||||
COMPONENTS avformat avutil swscale swresample
|
||||
OPTIONAL_COMPONENTS avcodec)
|
||||
find_package(FFmpeg REQUIRED COMPONENTS avformat avutil swscale swresample OPTIONAL_COMPONENTS avcodec)
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_package(Uthash REQUIRED)
|
||||
|
||||
@@ -27,144 +22,154 @@ add_library(OBS::libobs ALIAS libobs)
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE obs.c
|
||||
obs.h
|
||||
obs.hpp
|
||||
obs-audio.c
|
||||
obs-audio-controls.c
|
||||
obs-audio-controls.h
|
||||
obs-av1.c
|
||||
obs-av1.h
|
||||
obs-avc.c
|
||||
obs-avc.h
|
||||
obs-data.c
|
||||
obs-data.h
|
||||
obs-defs.h
|
||||
obs-display.c
|
||||
obs-encoder.c
|
||||
obs-encoder.h
|
||||
obs-ffmpeg-compat.h
|
||||
obs-hotkey.c
|
||||
obs-hotkey.h
|
||||
obs-hotkeys.h
|
||||
obs-missing-files.c
|
||||
obs-missing-files.h
|
||||
obs-nal.c
|
||||
obs-nal.h
|
||||
obs-hotkey-name-map.c
|
||||
obs-interaction.h
|
||||
obs-internal.h
|
||||
obs-module.c
|
||||
obs-module.h
|
||||
obs-output.c
|
||||
obs-output.h
|
||||
obs-output-delay.c
|
||||
obs-properties.c
|
||||
obs-properties.h
|
||||
obs-service.c
|
||||
obs-service.h
|
||||
obs-scene.c
|
||||
obs-scene.h
|
||||
obs-source.c
|
||||
obs-source.h
|
||||
obs-source-deinterlace.c
|
||||
obs-source-transition.c
|
||||
obs-video.c
|
||||
obs-video-gpu-encode.c
|
||||
obs-view.c
|
||||
obs-config.h)
|
||||
PRIVATE
|
||||
obs.c
|
||||
obs.h
|
||||
obs.hpp
|
||||
obs-audio.c
|
||||
obs-audio-controls.c
|
||||
obs-audio-controls.h
|
||||
obs-av1.c
|
||||
obs-av1.h
|
||||
obs-avc.c
|
||||
obs-avc.h
|
||||
obs-data.c
|
||||
obs-data.h
|
||||
obs-defs.h
|
||||
obs-display.c
|
||||
obs-encoder.c
|
||||
obs-encoder.h
|
||||
obs-ffmpeg-compat.h
|
||||
obs-hotkey.c
|
||||
obs-hotkey.h
|
||||
obs-hotkeys.h
|
||||
obs-missing-files.c
|
||||
obs-missing-files.h
|
||||
obs-nal.c
|
||||
obs-nal.h
|
||||
obs-hotkey-name-map.c
|
||||
obs-interaction.h
|
||||
obs-internal.h
|
||||
obs-module.c
|
||||
obs-module.h
|
||||
obs-output.c
|
||||
obs-output.h
|
||||
obs-output-delay.c
|
||||
obs-properties.c
|
||||
obs-properties.h
|
||||
obs-service.c
|
||||
obs-service.h
|
||||
obs-scene.c
|
||||
obs-scene.h
|
||||
obs-source.c
|
||||
obs-source.h
|
||||
obs-source-deinterlace.c
|
||||
obs-source-transition.c
|
||||
obs-video.c
|
||||
obs-video-gpu-encode.c
|
||||
obs-view.c
|
||||
obs-config.h
|
||||
)
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE util/simde/check.h
|
||||
util/simde/debug-trap.h
|
||||
util/simde/hedley.h
|
||||
util/simde/simde-align.h
|
||||
util/simde/simde-arch.h
|
||||
util/simde/simde-common.h
|
||||
util/simde/simde-constify.h
|
||||
util/simde/simde-detect-clang.h
|
||||
util/simde/simde-diagnostic.h
|
||||
util/simde/simde-features.h
|
||||
util/simde/simde-math.h
|
||||
util/simde/x86/mmx.h
|
||||
util/simde/x86/sse2.h
|
||||
util/simde/x86/sse.h)
|
||||
PRIVATE
|
||||
util/simde/check.h
|
||||
util/simde/debug-trap.h
|
||||
util/simde/hedley.h
|
||||
util/simde/simde-align.h
|
||||
util/simde/simde-arch.h
|
||||
util/simde/simde-common.h
|
||||
util/simde/simde-constify.h
|
||||
util/simde/simde-detect-clang.h
|
||||
util/simde/simde-diagnostic.h
|
||||
util/simde/simde-features.h
|
||||
util/simde/simde-math.h
|
||||
util/simde/x86/mmx.h
|
||||
util/simde/x86/sse2.h
|
||||
util/simde/x86/sse.h
|
||||
)
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE callback/calldata.c
|
||||
callback/calldata.h
|
||||
callback/decl.c
|
||||
callback/decl.h
|
||||
callback/signal.c
|
||||
callback/signal.h
|
||||
callback/proc.c
|
||||
callback/proc.h)
|
||||
PRIVATE
|
||||
callback/calldata.c
|
||||
callback/calldata.h
|
||||
callback/decl.c
|
||||
callback/decl.h
|
||||
callback/signal.c
|
||||
callback/signal.h
|
||||
callback/proc.c
|
||||
callback/proc.h
|
||||
)
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE graphics/graphics.c
|
||||
graphics/graphics.h
|
||||
graphics/graphics-imports.c
|
||||
graphics/graphics-internal.h
|
||||
graphics/axisang.c
|
||||
graphics/axisang.h
|
||||
graphics/bounds.c
|
||||
graphics/bounds.h
|
||||
graphics/device-exports.h
|
||||
graphics/effect.c
|
||||
graphics/effect.h
|
||||
graphics/effect-parser.c
|
||||
graphics/effect-parser.h
|
||||
graphics/half.h
|
||||
graphics/image-file.c
|
||||
graphics/image-file.h
|
||||
graphics/math-extra.c
|
||||
graphics/math-extra.h
|
||||
graphics/matrix3.c
|
||||
graphics/matrix3.h
|
||||
graphics/matrix4.c
|
||||
graphics/matrix4.h
|
||||
graphics/plane.c
|
||||
graphics/plane.h
|
||||
graphics/quat.c
|
||||
graphics/quat.h
|
||||
graphics/shader-parser.c
|
||||
graphics/shader-parser.h
|
||||
graphics/srgb.h
|
||||
graphics/texture-render.c
|
||||
graphics/vec2.c
|
||||
graphics/vec2.h
|
||||
graphics/vec3.c
|
||||
graphics/vec3.h
|
||||
graphics/vec4.c
|
||||
graphics/vec4.h
|
||||
graphics/libnsgif/libnsgif.c
|
||||
graphics/libnsgif/libnsgif.h
|
||||
graphics/graphics-ffmpeg.c)
|
||||
PRIVATE
|
||||
graphics/graphics.c
|
||||
graphics/graphics.h
|
||||
graphics/graphics-imports.c
|
||||
graphics/graphics-internal.h
|
||||
graphics/axisang.c
|
||||
graphics/axisang.h
|
||||
graphics/bounds.c
|
||||
graphics/bounds.h
|
||||
graphics/device-exports.h
|
||||
graphics/effect.c
|
||||
graphics/effect.h
|
||||
graphics/effect-parser.c
|
||||
graphics/effect-parser.h
|
||||
graphics/half.h
|
||||
graphics/image-file.c
|
||||
graphics/image-file.h
|
||||
graphics/math-extra.c
|
||||
graphics/math-extra.h
|
||||
graphics/matrix3.c
|
||||
graphics/matrix3.h
|
||||
graphics/matrix4.c
|
||||
graphics/matrix4.h
|
||||
graphics/plane.c
|
||||
graphics/plane.h
|
||||
graphics/quat.c
|
||||
graphics/quat.h
|
||||
graphics/shader-parser.c
|
||||
graphics/shader-parser.h
|
||||
graphics/srgb.h
|
||||
graphics/texture-render.c
|
||||
graphics/vec2.c
|
||||
graphics/vec2.h
|
||||
graphics/vec3.c
|
||||
graphics/vec3.h
|
||||
graphics/vec4.c
|
||||
graphics/vec4.h
|
||||
graphics/libnsgif/libnsgif.c
|
||||
graphics/libnsgif/libnsgif.h
|
||||
graphics/graphics-ffmpeg.c
|
||||
)
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE media-io/audio-io.c
|
||||
media-io/audio-io.h
|
||||
media-io/audio-math.h
|
||||
media-io/audio-resampler.h
|
||||
media-io/audio-resampler-ffmpeg.c
|
||||
media-io/format-conversion.c
|
||||
media-io/format-conversion.h
|
||||
media-io/frame-rate.h
|
||||
media-io/media-remux.c
|
||||
media-io/media-remux.h
|
||||
media-io/video-fourcc.c
|
||||
media-io/video-frame.c
|
||||
media-io/video-frame.h
|
||||
media-io/video-io.c
|
||||
media-io/video-io.h
|
||||
media-io/media-io-defs.h
|
||||
media-io/video-matrices.c
|
||||
media-io/video-scaler-ffmpeg.c
|
||||
media-io/video-scaler.h)
|
||||
PRIVATE
|
||||
media-io/audio-io.c
|
||||
media-io/audio-io.h
|
||||
media-io/audio-math.h
|
||||
media-io/audio-resampler.h
|
||||
media-io/audio-resampler-ffmpeg.c
|
||||
media-io/format-conversion.c
|
||||
media-io/format-conversion.h
|
||||
media-io/frame-rate.h
|
||||
media-io/media-remux.c
|
||||
media-io/media-remux.h
|
||||
media-io/video-fourcc.c
|
||||
media-io/video-frame.c
|
||||
media-io/video-frame.h
|
||||
media-io/video-io.c
|
||||
media-io/video-io.h
|
||||
media-io/media-io-defs.h
|
||||
media-io/video-matrices.c
|
||||
media-io/video-scaler-ffmpeg.c
|
||||
media-io/video-scaler.h
|
||||
)
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
@@ -228,61 +233,62 @@ endif()
|
||||
if(NOT OS_MACOS)
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE data/area.effect
|
||||
data/bicubic_scale.effect
|
||||
data/bilinear_lowres_scale.effect
|
||||
data/color.effect
|
||||
data/default.effect
|
||||
data/default_rect.effect
|
||||
data/deinterlace_base.effect
|
||||
data/deinterlace_blend.effect
|
||||
data/deinterlace_blend_2x.effect
|
||||
data/deinterlace_discard.effect
|
||||
data/deinterlace_discard_2x.effect
|
||||
data/deinterlace_linear.effect
|
||||
data/deinterlace_linear_2x.effect
|
||||
data/deinterlace_yadif.effect
|
||||
data/deinterlace_yadif_2x.effect
|
||||
data/format_conversion.effect
|
||||
data/lanczos_scale.effect
|
||||
data/opaque.effect
|
||||
data/premultiplied_alpha.effect
|
||||
data/repeat.effect
|
||||
data/solid.effect)
|
||||
PRIVATE
|
||||
data/area.effect
|
||||
data/bicubic_scale.effect
|
||||
data/bilinear_lowres_scale.effect
|
||||
data/color.effect
|
||||
data/default.effect
|
||||
data/default_rect.effect
|
||||
data/deinterlace_base.effect
|
||||
data/deinterlace_blend.effect
|
||||
data/deinterlace_blend_2x.effect
|
||||
data/deinterlace_discard.effect
|
||||
data/deinterlace_discard_2x.effect
|
||||
data/deinterlace_linear.effect
|
||||
data/deinterlace_linear_2x.effect
|
||||
data/deinterlace_yadif.effect
|
||||
data/deinterlace_yadif_2x.effect
|
||||
data/format_conversion.effect
|
||||
data/lanczos_scale.effect
|
||||
data/opaque.effect
|
||||
data/premultiplied_alpha.effect
|
||||
data/repeat.effect
|
||||
data/solid.effect
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(
|
||||
libobs
|
||||
PRIVATE FFmpeg::avcodec
|
||||
FFmpeg::avformat
|
||||
FFmpeg::avutil
|
||||
FFmpeg::swscale
|
||||
FFmpeg::swresample
|
||||
Jansson::Jansson
|
||||
OBS::caption
|
||||
OBS::libobs-version
|
||||
Uthash::Uthash
|
||||
ZLIB::ZLIB
|
||||
PUBLIC Threads::Threads)
|
||||
PRIVATE
|
||||
FFmpeg::avcodec
|
||||
FFmpeg::avformat
|
||||
FFmpeg::avutil
|
||||
FFmpeg::swscale
|
||||
FFmpeg::swresample
|
||||
Jansson::Jansson
|
||||
OBS::caption
|
||||
OBS::libobs-version
|
||||
Uthash::Uthash
|
||||
ZLIB::ZLIB
|
||||
PUBLIC Threads::Threads
|
||||
)
|
||||
|
||||
set_target_properties(
|
||||
libobs
|
||||
PROPERTIES OUTPUT_NAME obs
|
||||
FOLDER "core"
|
||||
VERSION "${OBS_VERSION_MAJOR}"
|
||||
SOVERSION "0")
|
||||
PROPERTIES OUTPUT_NAME obs FOLDER "core" VERSION "${OBS_VERSION_MAJOR}" SOVERSION "0"
|
||||
)
|
||||
|
||||
target_compile_definitions(
|
||||
libobs
|
||||
PUBLIC ${ARCH_SIMD_DEFINES}
|
||||
PRIVATE IS_LIBOBS)
|
||||
target_compile_definitions(libobs PUBLIC ${ARCH_SIMD_DEFINES} PRIVATE IS_LIBOBS)
|
||||
|
||||
target_compile_features(libobs PRIVATE cxx_alias_templates)
|
||||
|
||||
target_compile_options(libobs PUBLIC ${ARCH_SIMD_FLAGS})
|
||||
|
||||
target_include_directories(libobs PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/config>)
|
||||
target_include_directories(
|
||||
libobs
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/config>
|
||||
)
|
||||
|
||||
if(OS_WINDOWS)
|
||||
set(MODULE_DESCRIPTION "OBS Library")
|
||||
@@ -292,34 +298,41 @@ if(OS_WINDOWS)
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE obs-win-crash-handler.c
|
||||
obs-windows.c
|
||||
util/threading-windows.c
|
||||
util/threading-windows.h
|
||||
util/pipe-windows.c
|
||||
util/platform-windows.c
|
||||
util/windows/device-enum.c
|
||||
util/windows/device-enum.h
|
||||
util/windows/obfuscate.c
|
||||
util/windows/obfuscate.h
|
||||
util/windows/win-registry.h
|
||||
util/windows/win-version.h
|
||||
util/windows/window-helpers.c
|
||||
util/windows/window-helpers.h
|
||||
util/windows/ComPtr.hpp
|
||||
util/windows/CoTaskMemPtr.hpp
|
||||
util/windows/HRError.hpp
|
||||
util/windows/WinHandle.hpp
|
||||
libobs.rc
|
||||
audio-monitoring/win32/wasapi-output.c
|
||||
audio-monitoring/win32/wasapi-enum-devices.c
|
||||
audio-monitoring/win32/wasapi-output.h
|
||||
audio-monitoring/win32/wasapi-monitoring-available.c)
|
||||
PRIVATE
|
||||
obs-win-crash-handler.c
|
||||
obs-windows.c
|
||||
util/threading-windows.c
|
||||
util/threading-windows.h
|
||||
util/pipe-windows.c
|
||||
util/platform-windows.c
|
||||
util/windows/device-enum.c
|
||||
util/windows/device-enum.h
|
||||
util/windows/obfuscate.c
|
||||
util/windows/obfuscate.h
|
||||
util/windows/win-registry.h
|
||||
util/windows/win-version.h
|
||||
util/windows/window-helpers.c
|
||||
util/windows/window-helpers.h
|
||||
util/windows/ComPtr.hpp
|
||||
util/windows/CoTaskMemPtr.hpp
|
||||
util/windows/HRError.hpp
|
||||
util/windows/WinHandle.hpp
|
||||
libobs.rc
|
||||
audio-monitoring/win32/wasapi-output.c
|
||||
audio-monitoring/win32/wasapi-enum-devices.c
|
||||
audio-monitoring/win32/wasapi-output.h
|
||||
audio-monitoring/win32/wasapi-monitoring-available.c
|
||||
)
|
||||
|
||||
target_compile_definitions(libobs PRIVATE UNICODE _UNICODE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS)
|
||||
set_source_files_properties(obs-win-crash-handler.c PROPERTIES COMPILE_DEFINITIONS
|
||||
OBS_VERSION="${OBS_VERSION_CANONICAL}")
|
||||
target_link_libraries(libobs PRIVATE dxgi Avrt Dwmapi winmm Rpcrt4)
|
||||
set_source_files_properties(
|
||||
obs-win-crash-handler.c
|
||||
PROPERTIES COMPILE_DEFINITIONS OBS_VERSION="${OBS_VERSION_CANONICAL}"
|
||||
)
|
||||
target_link_libraries(
|
||||
libobs
|
||||
PRIVATE dxgi Avrt Dwmapi winmm Rpcrt4
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
target_link_libraries(libobs PUBLIC OBS::w32-pthreads)
|
||||
@@ -343,9 +356,7 @@ if(OS_WINDOWS)
|
||||
target_sources(obs-winhandle INTERFACE util/windows/WinHandle.hpp)
|
||||
target_include_directories(obs-winhandle INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
endif()
|
||||
|
||||
elseif(OS_MACOS)
|
||||
|
||||
find_library(COCOA Cocoa)
|
||||
find_library(COREAUDIO CoreAudio)
|
||||
find_library(AUDIOTOOLBOX AudioToolbox)
|
||||
@@ -361,36 +372,33 @@ elseif(OS_MACOS)
|
||||
AUDIOUNIT
|
||||
APPKIT
|
||||
IOKIT
|
||||
CARBON)
|
||||
CARBON
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
libobs
|
||||
PRIVATE ${COCOA}
|
||||
${COREAUDIO}
|
||||
${AUDIOTOOLBOX}
|
||||
${AUDIOUNIT}
|
||||
${APPKIT}
|
||||
${IOKIT}
|
||||
${CARBON})
|
||||
PRIVATE ${COCOA} ${COREAUDIO} ${AUDIOTOOLBOX} ${AUDIOUNIT} ${APPKIT} ${IOKIT} ${CARBON}
|
||||
)
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE obs-cocoa.m
|
||||
util/pipe-posix.c
|
||||
util/platform-cocoa.m
|
||||
util/platform-nix.c
|
||||
util/threading-posix.c
|
||||
util/threading-posix.h
|
||||
util/apple/cfstring-utils.h
|
||||
audio-monitoring/osx/coreaudio-enum-devices.c
|
||||
audio-monitoring/osx/coreaudio-output.c
|
||||
audio-monitoring/osx/coreaudio-monitoring-available.c
|
||||
audio-monitoring/osx/mac-helpers.h)
|
||||
PRIVATE
|
||||
obs-cocoa.m
|
||||
util/pipe-posix.c
|
||||
util/platform-cocoa.m
|
||||
util/platform-nix.c
|
||||
util/threading-posix.c
|
||||
util/threading-posix.h
|
||||
util/apple/cfstring-utils.h
|
||||
audio-monitoring/osx/coreaudio-enum-devices.c
|
||||
audio-monitoring/osx/coreaudio-output.c
|
||||
audio-monitoring/osx/coreaudio-monitoring-available.c
|
||||
audio-monitoring/osx/mac-helpers.h
|
||||
)
|
||||
|
||||
set_source_files_properties(util/platform-cocoa.m obs-cocoa.m PROPERTIES COMPILE_FLAGS -fobjc-arc)
|
||||
|
||||
set_target_properties(libobs PROPERTIES SOVERSION "1" BUILD_RPATH "$<TARGET_FILE_DIR:OBS::libobs-opengl>")
|
||||
|
||||
elseif(OS_POSIX)
|
||||
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
target_compile_definitions(libobs PRIVATE ENABLE_DARRAY_TYPE_TEST)
|
||||
@@ -398,23 +406,21 @@ elseif(OS_POSIX)
|
||||
|
||||
find_package(LibUUID REQUIRED)
|
||||
find_package(X11 REQUIRED)
|
||||
find_package(
|
||||
XCB
|
||||
COMPONENTS XCB
|
||||
OPTIONAL_COMPONENTS XINPUT
|
||||
QUIET)
|
||||
find_package(XCB COMPONENTS XCB OPTIONAL_COMPONENTS XINPUT QUIET)
|
||||
find_package(X11_XCB REQUIRED)
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE obs-nix.c
|
||||
obs-nix-platform.c
|
||||
obs-nix-platform.h
|
||||
obs-nix-x11.c
|
||||
util/threading-posix.c
|
||||
util/threading-posix.h
|
||||
util/pipe-posix.c
|
||||
util/platform-nix.c)
|
||||
PRIVATE
|
||||
obs-nix.c
|
||||
obs-nix-platform.c
|
||||
obs-nix-platform.h
|
||||
obs-nix-x11.c
|
||||
util/threading-posix.c
|
||||
util/threading-posix.h
|
||||
util/pipe-posix.c
|
||||
util/platform-nix.c
|
||||
)
|
||||
|
||||
target_link_libraries(libobs PRIVATE X11::X11_xcb XCB::XCB LibUUID::LibUUID)
|
||||
|
||||
@@ -427,9 +433,13 @@ elseif(OS_POSIX)
|
||||
obs_status(STATUS "-> PulseAudio found - audio monitoring enabled")
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE audio-monitoring/pulse/pulseaudio-output.c audio-monitoring/pulse/pulseaudio-enum-devices.c
|
||||
audio-monitoring/pulse/pulseaudio-wrapper.c audio-monitoring/pulse/pulseaudio-wrapper.h
|
||||
audio-monitoring/pulse/pulseaudio-monitoring-available.c)
|
||||
PRIVATE
|
||||
audio-monitoring/pulse/pulseaudio-output.c
|
||||
audio-monitoring/pulse/pulseaudio-enum-devices.c
|
||||
audio-monitoring/pulse/pulseaudio-wrapper.c
|
||||
audio-monitoring/pulse/pulseaudio-wrapper.h
|
||||
audio-monitoring/pulse/pulseaudio-monitoring-available.c
|
||||
)
|
||||
|
||||
target_link_libraries(libobs PRIVATE ${PULSEAUDIO_LIBRARY})
|
||||
else()
|
||||
@@ -449,10 +459,7 @@ elseif(OS_POSIX)
|
||||
endif()
|
||||
|
||||
if(ENABLE_WAYLAND)
|
||||
find_package(
|
||||
Wayland
|
||||
COMPONENTS Client
|
||||
REQUIRED)
|
||||
find_package(Wayland COMPONENTS Client REQUIRED)
|
||||
find_package(Xkbcommon REQUIRED)
|
||||
|
||||
target_link_libraries(libobs PRIVATE Wayland::Client Xkbcommon::Xkbcommon)
|
||||
@@ -477,7 +484,8 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/obsconfig.h.in ${CMAKE_BINARY_DIR}/co
|
||||
target_compile_definitions(
|
||||
libobs
|
||||
PUBLIC HAVE_OBSCONFIG_H
|
||||
PRIVATE "OBS_INSTALL_PREFIX=\"${OBS_INSTALL_PREFIX}\"" "$<$<BOOL:${LINUX_PORTABLE}>:LINUX_PORTABLE>")
|
||||
PRIVATE "OBS_INSTALL_PREFIX=\"${OBS_INSTALL_PREFIX}\"" "$<$<BOOL:${LINUX_PORTABLE}>:LINUX_PORTABLE>"
|
||||
)
|
||||
|
||||
if(ENABLE_FFMPEG_MUX_DEBUG)
|
||||
target_compile_definitions(libobs PRIVATE SHOW_SUBPROCESSES)
|
||||
@@ -490,18 +498,9 @@ list(FILTER _OBS_HEADERS INCLUDE REGEX ".*\\.h(pp)?")
|
||||
list(FILTER _OBS_SOURCES INCLUDE REGEX ".*\\.(m|c[cp]?p?)")
|
||||
list(FILTER _OBS_FILTERS INCLUDE REGEX ".*\\.effect")
|
||||
|
||||
source_group(
|
||||
TREE "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
PREFIX "Source Files"
|
||||
FILES ${_OBS_SOURCES})
|
||||
source_group(
|
||||
TREE "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
PREFIX "Header Files"
|
||||
FILES ${_OBS_HEADERS})
|
||||
source_group(
|
||||
TREE "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
PREFIX "Effect Files"
|
||||
FILES ${_OBS_FILTERS})
|
||||
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Source Files" FILES ${_OBS_SOURCES})
|
||||
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Header Files" FILES ${_OBS_HEADERS})
|
||||
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Effect Files" FILES ${_OBS_FILTERS})
|
||||
|
||||
setup_binary_target(libobs)
|
||||
setup_target_resources(libobs libobs)
|
||||
|
||||
@@ -3,10 +3,7 @@ add_library(OBS::libobs-version ALIAS libobs-version)
|
||||
|
||||
configure_file(obsversion.c.in obsversion.c @ONLY)
|
||||
|
||||
target_sources(
|
||||
libobs-version
|
||||
PRIVATE obsversion.c
|
||||
PUBLIC obsversion.h)
|
||||
target_sources(libobs-version PRIVATE obsversion.c PUBLIC obsversion.h)
|
||||
|
||||
target_include_directories(libobs-version PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>")
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
find_package(LibUUID REQUIRED)
|
||||
find_package(X11 REQUIRED)
|
||||
find_package(X11-xcb REQUIRED)
|
||||
# cmake-format: off
|
||||
find_package(Xcb REQUIRED xcb OPTIONAL_COMPONENTS xcb-xinput)
|
||||
# cmake-format: on
|
||||
find_package(Gio)
|
||||
find_package(Sysinfo REQUIRED)
|
||||
|
||||
@@ -22,41 +20,49 @@ endif()
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE # cmake-format: sortable
|
||||
obs-nix-platform.c
|
||||
obs-nix-platform.h
|
||||
obs-nix-x11.c
|
||||
obs-nix.c
|
||||
util/pipe-posix.c
|
||||
util/platform-nix.c
|
||||
util/threading-posix.c
|
||||
util/threading-posix.h)
|
||||
PRIVATE
|
||||
obs-nix-platform.c
|
||||
obs-nix-platform.h
|
||||
obs-nix-x11.c
|
||||
obs-nix.c
|
||||
util/pipe-posix.c
|
||||
util/platform-nix.c
|
||||
util/threading-posix.c
|
||||
util/threading-posix.h
|
||||
)
|
||||
|
||||
target_compile_definitions(
|
||||
libobs PRIVATE OBS_INSTALL_PREFIX="${OBS_INSTALL_PREFIX}" $<$<COMPILE_LANG_AND_ID:C,GNU>:ENABLE_DARRAY_TYPE_TEST>
|
||||
$<$<COMPILE_LANG_AND_ID:CXX,GNU>:ENABLE_DARRAY_TYPE_TEST>)
|
||||
libobs
|
||||
PRIVATE
|
||||
OBS_INSTALL_PREFIX="${OBS_INSTALL_PREFIX}"
|
||||
$<$<COMPILE_LANG_AND_ID:C,GNU>:ENABLE_DARRAY_TYPE_TEST>
|
||||
$<$<COMPILE_LANG_AND_ID:CXX,GNU>:ENABLE_DARRAY_TYPE_TEST>
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
libobs
|
||||
PRIVATE X11::x11-xcb
|
||||
xcb::xcb
|
||||
LibUUID::LibUUID
|
||||
Sysinfo::Sysinfo
|
||||
${CMAKE_DL_LIBS}
|
||||
$<$<NOT:$<BOOL:${HAVE_MATH_IN_STD_LIB}>>:m>
|
||||
$<$<TARGET_EXISTS:xcb::xcb-input>:xcb::xcb-input>)
|
||||
PRIVATE
|
||||
X11::x11-xcb
|
||||
xcb::xcb
|
||||
LibUUID::LibUUID
|
||||
Sysinfo::Sysinfo
|
||||
${CMAKE_DL_LIBS}
|
||||
$<$<NOT:$<BOOL:${HAVE_MATH_IN_STD_LIB}>>:m>
|
||||
$<$<TARGET_EXISTS:xcb::xcb-input>:xcb::xcb-input>
|
||||
)
|
||||
|
||||
if(ENABLE_PULSEAUDIO)
|
||||
find_package(PulseAudio REQUIRED)
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE # cmake-format: sortable
|
||||
audio-monitoring/pulse/pulseaudio-enum-devices.c
|
||||
audio-monitoring/pulse/pulseaudio-monitoring-available.c
|
||||
audio-monitoring/pulse/pulseaudio-output.c
|
||||
audio-monitoring/pulse/pulseaudio-wrapper.c
|
||||
audio-monitoring/pulse/pulseaudio-wrapper.h)
|
||||
PRIVATE
|
||||
audio-monitoring/pulse/pulseaudio-enum-devices.c
|
||||
audio-monitoring/pulse/pulseaudio-monitoring-available.c
|
||||
audio-monitoring/pulse/pulseaudio-output.c
|
||||
audio-monitoring/pulse/pulseaudio-wrapper.c
|
||||
audio-monitoring/pulse/pulseaudio-wrapper.h
|
||||
)
|
||||
|
||||
target_link_libraries(libobs PRIVATE PulseAudio::PulseAudio)
|
||||
target_enable_feature(libobs "PulseAudio audio monitoring (FreeBSD)")
|
||||
|
||||
+32
-21
@@ -1,27 +1,30 @@
|
||||
find_package(LibUUID REQUIRED)
|
||||
find_package(X11 REQUIRED)
|
||||
find_package(X11-xcb REQUIRED)
|
||||
# cmake-format: off
|
||||
find_package(Xcb REQUIRED xcb OPTIONAL_COMPONENTS xcb-xinput)
|
||||
# cmake-format: on
|
||||
find_package(Gio)
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE # cmake-format: sortable
|
||||
obs-nix-platform.c
|
||||
obs-nix-platform.h
|
||||
obs-nix-x11.c
|
||||
obs-nix.c
|
||||
util/pipe-posix.c
|
||||
util/platform-nix.c
|
||||
util/threading-posix.c
|
||||
util/threading-posix.h)
|
||||
PRIVATE
|
||||
obs-nix-platform.c
|
||||
obs-nix-platform.h
|
||||
obs-nix-x11.c
|
||||
obs-nix.c
|
||||
util/pipe-posix.c
|
||||
util/platform-nix.c
|
||||
util/threading-posix.c
|
||||
util/threading-posix.h
|
||||
)
|
||||
|
||||
target_compile_definitions(
|
||||
libobs
|
||||
PRIVATE USE_XDG OBS_INSTALL_PREFIX="${OBS_INSTALL_PREFIX}" $<$<COMPILE_LANG_AND_ID:C,GNU>:ENABLE_DARRAY_TYPE_TEST>
|
||||
$<$<COMPILE_LANG_AND_ID:CXX,GNU>:ENABLE_DARRAY_TYPE_TEST>)
|
||||
PRIVATE
|
||||
USE_XDG
|
||||
OBS_INSTALL_PREFIX="${OBS_INSTALL_PREFIX}"
|
||||
$<$<COMPILE_LANG_AND_ID:C,GNU>:ENABLE_DARRAY_TYPE_TEST>
|
||||
$<$<COMPILE_LANG_AND_ID:CXX,GNU>:ENABLE_DARRAY_TYPE_TEST>
|
||||
)
|
||||
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL GNU)
|
||||
# * Silence type-limits warning in line 292 of libobs/utils/utf8.c
|
||||
@@ -43,20 +46,28 @@ if(NOT HAVE_UUID_HEADER)
|
||||
endif()
|
||||
|
||||
target_link_libraries(
|
||||
libobs PRIVATE X11::x11-xcb xcb::xcb LibUUID::LibUUID ${CMAKE_DL_LIBS} $<$<NOT:$<BOOL:${HAVE_MATH_IN_STD_LIB}>>:m>
|
||||
$<$<TARGET_EXISTS:xcb::xcb-input>:xcb::xcb-input>)
|
||||
libobs
|
||||
PRIVATE
|
||||
X11::x11-xcb
|
||||
xcb::xcb
|
||||
LibUUID::LibUUID
|
||||
${CMAKE_DL_LIBS}
|
||||
$<$<NOT:$<BOOL:${HAVE_MATH_IN_STD_LIB}>>:m>
|
||||
$<$<TARGET_EXISTS:xcb::xcb-input>:xcb::xcb-input>
|
||||
)
|
||||
|
||||
if(ENABLE_PULSEAUDIO)
|
||||
find_package(PulseAudio REQUIRED)
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE # cmake-format: sortable
|
||||
audio-monitoring/pulse/pulseaudio-enum-devices.c
|
||||
audio-monitoring/pulse/pulseaudio-monitoring-available.c
|
||||
audio-monitoring/pulse/pulseaudio-output.c
|
||||
audio-monitoring/pulse/pulseaudio-wrapper.c
|
||||
audio-monitoring/pulse/pulseaudio-wrapper.h)
|
||||
PRIVATE
|
||||
audio-monitoring/pulse/pulseaudio-enum-devices.c
|
||||
audio-monitoring/pulse/pulseaudio-monitoring-available.c
|
||||
audio-monitoring/pulse/pulseaudio-output.c
|
||||
audio-monitoring/pulse/pulseaudio-wrapper.c
|
||||
audio-monitoring/pulse/pulseaudio-wrapper.h
|
||||
)
|
||||
|
||||
target_link_libraries(libobs PRIVATE PulseAudio::PulseAudio)
|
||||
target_enable_feature(libobs "PulseAudio audio monitoring (Linux)")
|
||||
|
||||
+22
-20
@@ -1,28 +1,30 @@
|
||||
target_link_libraries(
|
||||
libobs
|
||||
PRIVATE # cmake-format: sortable
|
||||
"$<LINK_LIBRARY:FRAMEWORK,AppKit.framework>"
|
||||
"$<LINK_LIBRARY:FRAMEWORK,AudioToolbox.framework>"
|
||||
"$<LINK_LIBRARY:FRAMEWORK,AudioUnit.framework>"
|
||||
"$<LINK_LIBRARY:FRAMEWORK,Carbon.framework>"
|
||||
"$<LINK_LIBRARY:FRAMEWORK,Cocoa.framework>"
|
||||
"$<LINK_LIBRARY:FRAMEWORK,CoreAudio.framework>"
|
||||
"$<LINK_LIBRARY:FRAMEWORK,IOKit.framework>")
|
||||
PRIVATE
|
||||
"$<LINK_LIBRARY:FRAMEWORK,AppKit.framework>"
|
||||
"$<LINK_LIBRARY:FRAMEWORK,AudioToolbox.framework>"
|
||||
"$<LINK_LIBRARY:FRAMEWORK,AudioUnit.framework>"
|
||||
"$<LINK_LIBRARY:FRAMEWORK,Carbon.framework>"
|
||||
"$<LINK_LIBRARY:FRAMEWORK,Cocoa.framework>"
|
||||
"$<LINK_LIBRARY:FRAMEWORK,CoreAudio.framework>"
|
||||
"$<LINK_LIBRARY:FRAMEWORK,IOKit.framework>"
|
||||
)
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE # cmake-format: sortable
|
||||
audio-monitoring/osx/coreaudio-enum-devices.c
|
||||
audio-monitoring/osx/coreaudio-monitoring-available.c
|
||||
audio-monitoring/osx/coreaudio-output.c
|
||||
audio-monitoring/osx/mac-helpers.h
|
||||
obs-cocoa.m
|
||||
util/apple/cfstring-utils.h
|
||||
util/pipe-posix.c
|
||||
util/platform-cocoa.m
|
||||
util/platform-nix.c
|
||||
util/threading-posix.c
|
||||
util/threading-posix.h)
|
||||
PRIVATE
|
||||
audio-monitoring/osx/coreaudio-enum-devices.c
|
||||
audio-monitoring/osx/coreaudio-monitoring-available.c
|
||||
audio-monitoring/osx/coreaudio-output.c
|
||||
audio-monitoring/osx/mac-helpers.h
|
||||
obs-cocoa.m
|
||||
util/apple/cfstring-utils.h
|
||||
util/pipe-posix.c
|
||||
util/platform-cocoa.m
|
||||
util/platform-nix.c
|
||||
util/threading-posix.c
|
||||
util/threading-posix.h
|
||||
)
|
||||
|
||||
target_compile_options(libobs PUBLIC -Wno-strict-prototypes -Wno-shorten-64-to-32)
|
||||
|
||||
|
||||
@@ -21,45 +21,42 @@ target_include_directories(obs-winhandle INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
|
||||
target_sources(
|
||||
libobs
|
||||
PRIVATE # cmake-format: sortable
|
||||
audio-monitoring/win32/wasapi-enum-devices.c
|
||||
audio-monitoring/win32/wasapi-monitoring-available.c
|
||||
audio-monitoring/win32/wasapi-output.c
|
||||
audio-monitoring/win32/wasapi-output.h
|
||||
libobs.rc
|
||||
obs-win-crash-handler.c
|
||||
obs-windows.c
|
||||
util/pipe-windows.c
|
||||
util/platform-windows.c
|
||||
util/threading-windows.c
|
||||
util/threading-windows.h
|
||||
util/windows/CoTaskMemPtr.hpp
|
||||
util/windows/device-enum.c
|
||||
util/windows/device-enum.h
|
||||
util/windows/HRError.hpp
|
||||
util/windows/obfuscate.c
|
||||
util/windows/obfuscate.h
|
||||
util/windows/win-registry.h
|
||||
util/windows/win-version.h
|
||||
util/windows/window-helpers.c
|
||||
util/windows/window-helpers.h)
|
||||
PRIVATE
|
||||
audio-monitoring/win32/wasapi-enum-devices.c
|
||||
audio-monitoring/win32/wasapi-monitoring-available.c
|
||||
audio-monitoring/win32/wasapi-output.c
|
||||
audio-monitoring/win32/wasapi-output.h
|
||||
libobs.rc
|
||||
obs-win-crash-handler.c
|
||||
obs-windows.c
|
||||
util/pipe-windows.c
|
||||
util/platform-windows.c
|
||||
util/threading-windows.c
|
||||
util/threading-windows.h
|
||||
util/windows/CoTaskMemPtr.hpp
|
||||
util/windows/device-enum.c
|
||||
util/windows/device-enum.h
|
||||
util/windows/HRError.hpp
|
||||
util/windows/obfuscate.c
|
||||
util/windows/obfuscate.h
|
||||
util/windows/win-registry.h
|
||||
util/windows/win-version.h
|
||||
util/windows/window-helpers.c
|
||||
util/windows/window-helpers.h
|
||||
)
|
||||
|
||||
target_compile_options(libobs PRIVATE $<$<COMPILE_LANGUAGE:C,CXX>:/EHc->)
|
||||
|
||||
set_source_files_properties(obs-win-crash-handler.c PROPERTIES COMPILE_DEFINITIONS
|
||||
OBS_VERSION="${OBS_VERSION_CANONICAL}")
|
||||
set_source_files_properties(
|
||||
obs-win-crash-handler.c
|
||||
PROPERTIES COMPILE_DEFINITIONS OBS_VERSION="${OBS_VERSION_CANONICAL}"
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
libobs
|
||||
PRIVATE Avrt
|
||||
Dwmapi
|
||||
Dxgi
|
||||
winmm
|
||||
Rpcrt4
|
||||
OBS::obfuscate
|
||||
OBS::winhandle
|
||||
OBS::COMutils
|
||||
PUBLIC OBS::w32-pthreads)
|
||||
PRIVATE Avrt Dwmapi Dxgi winmm Rpcrt4 OBS::obfuscate OBS::winhandle OBS::COMutils
|
||||
PUBLIC OBS::w32-pthreads
|
||||
)
|
||||
|
||||
target_link_options(libobs PRIVATE /IGNORE:4098 /SAFESEH:NO)
|
||||
|
||||
|
||||
@@ -11,9 +11,7 @@ if(OBS_CMAKE_VERSION VERSION_GREATER_EQUAL 3.0.0)
|
||||
set_property(GLOBAL APPEND PROPERTY OBS_FEATURES_ENABLED "Plugin Support")
|
||||
|
||||
macro(check_obs_browser)
|
||||
if((OS_WINDOWS AND CMAKE_GENERATOR_PLATFORM MATCHES "(Win32|x64)")
|
||||
OR OS_MACOS
|
||||
OR OS_LINUX)
|
||||
if((OS_WINDOWS AND CMAKE_GENERATOR_PLATFORM MATCHES "(Win32|x64)") OR OS_MACOS OR OS_LINUX)
|
||||
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/obs-browser/CMakeLists.txt")
|
||||
message(FATAL_ERROR "Required submodule 'obs-browser' not available.")
|
||||
else()
|
||||
@@ -37,12 +35,14 @@ if(OBS_CMAKE_VERSION VERSION_GREATER_EQUAL 3.0.0)
|
||||
add_obs_plugin(
|
||||
aja
|
||||
PLATFORMS WINDOWS MACOS LINUX
|
||||
WITH_MESSAGE)
|
||||
WITH_MESSAGE
|
||||
)
|
||||
add_obs_plugin(coreaudio-encoder PLATFORMS WINDOWS MACOS)
|
||||
add_obs_plugin(
|
||||
decklink
|
||||
PLATFORMS WINDOWS MACOS LINUX
|
||||
WITH_MESSAGE)
|
||||
WITH_MESSAGE
|
||||
)
|
||||
add_obs_plugin(image-source)
|
||||
add_obs_plugin(linux-alsa PLATFORMS LINUX FREEBSD OPENBSD)
|
||||
add_obs_plugin(linux-capture PLATFORMS LINUX FREEBSD OPENBSD)
|
||||
@@ -68,13 +68,15 @@ if(OBS_CMAKE_VERSION VERSION_GREATER_EQUAL 3.0.0)
|
||||
obs-qsv11
|
||||
PLATFORMS WINDOWS LINUX
|
||||
ARCHITECTURES x64 x86_64
|
||||
WITH_MESSAGE)
|
||||
WITH_MESSAGE
|
||||
)
|
||||
add_obs_plugin(obs-text PLATFORMS WINDOWS)
|
||||
add_obs_plugin(obs-transitions)
|
||||
add_obs_plugin(
|
||||
obs-vst
|
||||
PLATFORMS WINDOWS MACOS LINUX
|
||||
WITH_MESSAGE)
|
||||
WITH_MESSAGE
|
||||
)
|
||||
add_obs_plugin(obs-webrtc)
|
||||
|
||||
check_obs_websocket()
|
||||
|
||||
+34
-31
@@ -19,24 +19,25 @@ add_library(OBS::aja-support ALIAS aja-support)
|
||||
|
||||
target_sources(
|
||||
aja-support
|
||||
PRIVATE # cmake-format: sortable
|
||||
aja-card-manager.cpp
|
||||
aja-common.cpp
|
||||
aja-presets.cpp
|
||||
aja-props.cpp
|
||||
aja-routing.cpp
|
||||
aja-vpid-data.cpp
|
||||
aja-widget-io.cpp
|
||||
PUBLIC # cmake-format: sortable
|
||||
aja-card-manager.hpp
|
||||
aja-common.hpp
|
||||
aja-enums.hpp
|
||||
aja-presets.hpp
|
||||
aja-props.hpp
|
||||
aja-routing.hpp
|
||||
aja-ui-props.hpp
|
||||
aja-vpid-data.hpp
|
||||
aja-widget-io.hpp)
|
||||
PRIVATE
|
||||
aja-card-manager.cpp
|
||||
aja-common.cpp
|
||||
aja-presets.cpp
|
||||
aja-props.cpp
|
||||
aja-routing.cpp
|
||||
aja-vpid-data.cpp
|
||||
aja-widget-io.cpp
|
||||
PUBLIC
|
||||
aja-card-manager.hpp
|
||||
aja-common.hpp
|
||||
aja-enums.hpp
|
||||
aja-presets.hpp
|
||||
aja-props.hpp
|
||||
aja-routing.hpp
|
||||
aja-ui-props.hpp
|
||||
aja-vpid-data.hpp
|
||||
aja-widget-io.hpp
|
||||
)
|
||||
|
||||
target_link_libraries(aja-support PUBLIC OBS::libobs AJA::LibAJANTV2)
|
||||
|
||||
@@ -44,19 +45,23 @@ set_target_properties(aja-support PROPERTIES FOLDER plugins/aja POSITION_INDEPEN
|
||||
|
||||
target_sources(
|
||||
aja
|
||||
PRIVATE # cmake-format: sortable
|
||||
aja-output.cpp
|
||||
aja-output.hpp
|
||||
aja-source.cpp
|
||||
aja-source.hpp
|
||||
audio-repack.c
|
||||
audio-repack.h
|
||||
audio-repack.hpp
|
||||
main.cpp)
|
||||
PRIVATE
|
||||
aja-output.cpp
|
||||
aja-output.hpp
|
||||
aja-source.cpp
|
||||
aja-source.hpp
|
||||
audio-repack.c
|
||||
audio-repack.h
|
||||
audio-repack.hpp
|
||||
main.cpp
|
||||
)
|
||||
|
||||
target_compile_options(
|
||||
aja-support PUBLIC $<$<COMPILE_LANG_AND_ID:CXX,AppleClang,Clang,GNU>:-Wno-deprecated-declarations>
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:-Wno-unused-variable>)
|
||||
aja-support
|
||||
PUBLIC
|
||||
$<$<COMPILE_LANG_AND_ID:CXX,AppleClang,Clang,GNU>:-Wno-deprecated-declarations>
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:-Wno-unused-variable>
|
||||
)
|
||||
|
||||
target_link_libraries(aja PRIVATE OBS::aja-support)
|
||||
|
||||
@@ -66,6 +71,4 @@ if(OS_WINDOWS)
|
||||
set_property(TARGET aja PROPERTY COMPILE_WARNING_AS_ERROR FALSE)
|
||||
endif()
|
||||
|
||||
# cmake-format: off
|
||||
set_target_properties_obs(aja PROPERTIES FOLDER plugins/aja PREFIX "")
|
||||
# cmake-format: on
|
||||
|
||||
@@ -15,20 +15,18 @@ add_library(OBS::coreaudio-encoder ALIAS coreaudio-encoder)
|
||||
|
||||
target_sources(coreaudio-encoder PRIVATE encoder.cpp $<$<PLATFORM_ID:Windows>:windows-imports.h>)
|
||||
|
||||
# cmake-format: off
|
||||
target_link_libraries(
|
||||
coreaudio-encoder
|
||||
PRIVATE OBS::libobs
|
||||
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,AudioToolbox.framework>>"
|
||||
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,CoreAudio.framework>>"
|
||||
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,CoreFoundation.framework>>")
|
||||
# cmake-format: on
|
||||
PRIVATE
|
||||
OBS::libobs
|
||||
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,AudioToolbox.framework>>"
|
||||
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,CoreAudio.framework>>"
|
||||
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,CoreFoundation.framework>>"
|
||||
)
|
||||
|
||||
if(OS_WINDOWS)
|
||||
configure_file(cmake/windows/obs-module.rc.in coreaudio-encoder.rc)
|
||||
target_sources(coreaudio-encoder PRIVATE coreaudio-encoder.rc)
|
||||
endif()
|
||||
|
||||
# cmake-format: off
|
||||
set_target_properties_obs(coreaudio-encoder PROPERTIES FOLDER plugins PREFIX "")
|
||||
# cmake-format: on
|
||||
|
||||
@@ -17,7 +17,6 @@ add_library(Decklink::SDK ALIAS decklink-sdk)
|
||||
target_sources(
|
||||
decklink-sdk
|
||||
INTERFACE
|
||||
# cmake-format: sortable
|
||||
"$<$<PLATFORM_ID:Darwin>:${CMAKE_CURRENT_SOURCE_DIR}/mac/decklink-sdk/DeckLinkAPI.h>"
|
||||
"$<$<PLATFORM_ID:Darwin>:${CMAKE_CURRENT_SOURCE_DIR}/mac/decklink-sdk/DeckLinkAPIConfiguration.h>"
|
||||
"$<$<PLATFORM_ID:Darwin>:${CMAKE_CURRENT_SOURCE_DIR}/mac/decklink-sdk/DeckLinkAPIDeckControl.h>"
|
||||
@@ -36,47 +35,55 @@ target_sources(
|
||||
"$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:${CMAKE_CURRENT_SOURCE_DIR}/linux/decklink-sdk/DeckLinkAPITypes.h>"
|
||||
"$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:${CMAKE_CURRENT_SOURCE_DIR}/linux/decklink-sdk/DeckLinkAPIVersion.h>"
|
||||
"$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:${CMAKE_CURRENT_SOURCE_DIR}/linux/decklink-sdk/LinuxCOM.h>"
|
||||
"$<$<PLATFORM_ID:Windows>:${CMAKE_CURRENT_SOURCE_DIR}/win/decklink-sdk/DeckLinkAPIVersion.h>")
|
||||
"$<$<PLATFORM_ID:Windows>:${CMAKE_CURRENT_SOURCE_DIR}/win/decklink-sdk/DeckLinkAPIVersion.h>"
|
||||
)
|
||||
|
||||
target_sources(
|
||||
decklink
|
||||
PRIVATE # cmake-format: sortable
|
||||
$<$<PLATFORM_ID:Darwin>:mac/platform.cpp>
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:linux/platform.cpp>
|
||||
$<$<PLATFORM_ID:Windows>:win/platform.cpp>
|
||||
audio-repack.c
|
||||
audio-repack.h
|
||||
audio-repack.hpp
|
||||
const.h
|
||||
decklink-device-discovery.cpp
|
||||
decklink-device-discovery.hpp
|
||||
decklink-device-instance.cpp
|
||||
decklink-device-instance.hpp
|
||||
decklink-device-mode.cpp
|
||||
decklink-device-mode.hpp
|
||||
decklink-device.cpp
|
||||
decklink-device.hpp
|
||||
decklink-devices.cpp
|
||||
decklink-devices.hpp
|
||||
decklink-output.cpp
|
||||
decklink-source.cpp
|
||||
DecklinkBase.cpp
|
||||
DecklinkBase.h
|
||||
DecklinkInput.cpp
|
||||
DecklinkInput.hpp
|
||||
DecklinkOutput.cpp
|
||||
DecklinkOutput.hpp
|
||||
OBSVideoFrame.cpp
|
||||
OBSVideoFrame.h
|
||||
platform.hpp
|
||||
plugin-main.cpp
|
||||
util.cpp
|
||||
util.hpp)
|
||||
PRIVATE
|
||||
$<$<PLATFORM_ID:Darwin>:mac/platform.cpp>
|
||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:linux/platform.cpp>
|
||||
$<$<PLATFORM_ID:Windows>:win/platform.cpp>
|
||||
audio-repack.c
|
||||
audio-repack.h
|
||||
audio-repack.hpp
|
||||
const.h
|
||||
decklink-device-discovery.cpp
|
||||
decklink-device-discovery.hpp
|
||||
decklink-device-instance.cpp
|
||||
decklink-device-instance.hpp
|
||||
decklink-device-mode.cpp
|
||||
decklink-device-mode.hpp
|
||||
decklink-device.cpp
|
||||
decklink-device.hpp
|
||||
decklink-devices.cpp
|
||||
decklink-devices.hpp
|
||||
decklink-output.cpp
|
||||
decklink-source.cpp
|
||||
DecklinkBase.cpp
|
||||
DecklinkBase.h
|
||||
DecklinkInput.cpp
|
||||
DecklinkInput.hpp
|
||||
DecklinkOutput.cpp
|
||||
DecklinkOutput.hpp
|
||||
OBSVideoFrame.cpp
|
||||
OBSVideoFrame.h
|
||||
platform.hpp
|
||||
plugin-main.cpp
|
||||
util.cpp
|
||||
util.hpp
|
||||
)
|
||||
|
||||
target_compile_definitions(decklink PRIVATE $<$<PLATFORM_ID:Windows>:NOMINMAX>)
|
||||
|
||||
target_link_libraries(decklink PRIVATE OBS::libobs OBS::caption Decklink::SDK
|
||||
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,CoreFoundation.framework>>")
|
||||
target_link_libraries(
|
||||
decklink
|
||||
PRIVATE
|
||||
OBS::libobs
|
||||
OBS::caption
|
||||
Decklink::SDK
|
||||
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,CoreFoundation.framework>>"
|
||||
)
|
||||
|
||||
if(OS_WINDOWS)
|
||||
configure_file(cmake/windows/obs-module.rc.in win-decklink.rc)
|
||||
@@ -88,6 +95,4 @@ if(OS_WINDOWS)
|
||||
target_sources(decklink-sdk INTERFACE win/decklink-sdk/DeckLinkAPIVersion.h)
|
||||
endif()
|
||||
|
||||
# cmake-format: off
|
||||
set_target_properties_obs(decklink PROPERTIES FOLDER plugins/decklink PREFIX "")
|
||||
# cmake-format: on
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user