cmake: Add changes for CMake build framework 3.0

New code path only taken if OBS_CMAKE_VERSION is set to 3.0.0 or
greater, old functionality remains unchanged.
This commit is contained in:
PatTheMav 2023-03-26 03:55:25 +02:00 committed by Ryan Foster
parent bbeea0972a
commit 349372b3b3
266 changed files with 7786 additions and 3888 deletions

View file

@ -1,13 +1,46 @@
{
"additional_commands": {
"find_qt": {
"flags": [],
"kwargs": {
"COMPONENTS": "+",
"COMPONENTS_WIN": "+",
"COMPONENTS_MACOS": "+",
"COMPONENTS_LINUX": "+"
"format": {
"line_width": 120,
"tab_size": 2,
"enable_sort": true,
"autosort": true
},
"additional_commands": {
"find_qt": {
"flags": [],
"kwargs": {
"COMPONENTS": "+",
"COMPONENTS_WIN": "+",
"COMPONENTS_MACOS": "+",
"COMPONENTS_LINUX": "+"
}
},
"set_target_properties_obs": {
"pargs": 1,
"flags": [],
"kwargs": {
"PROPERTIES": {
"kwargs": {
"PREFIX": 1,
"OUTPUT_NAME": 1,
"FOLDER": 1,
"VERSION": 1,
"SOVERSION": 1,
"FRAMEWORK": 1,
"BUNDLE": 1,
"AUTOMOC": 1,
"AUTOUIC": 1,
"AUTORCC": 1,
"AUTOUIC_SEARCH_PATHS": 1,
"BUILD_RPATH": 1,
"INSTALL_RPATH": 1,
"XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC": 1,
"XCODE_ATTRIBUTE_CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION": 1,
"XCODE_ATTRIBUTE_GCC_WARN_SHADOW":1 ,
"LIBRARY_OUTPUT_DIRECTORY": 1
}
}
}
}
}
}

18
.gitignore vendored
View file

@ -3,25 +3,21 @@
*.dll
*.dylib
*.so
*.plugin
*.framework
*.systemextension
#cmake
/cmbuild/
/build/
/build32/
/build64/
/release/
/release32/
/release64/
/debug/
/debug32/
/debug64/
/builds/
/build*/
/release*/
/debug*/
.vs/
*.o.d
*.ninja
.ninja*
.dirstamp
/cmake/.CMakeBuildNumber
.deps
#xcode
*.xcodeproj/

View file

@ -1,15 +1,44 @@
cmake_minimum_required(VERSION 3.16...3.21)
cmake_minimum_required(VERSION 3.16...3.25)
if(OBS_CMAKE_VERSION VERSION_GREATER_EQUAL 3.0.0)
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/common/bootstrap.cmake")
project(obs-studio VERSION ${OBS_VERSION_CANONICAL})
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/32bit/projects.cmake")
return()
endif()
include(compilerconfig)
include(defaults)
include(helpers)
option(ENABLE_RELEASE_BUILD "Enable all options for a release build" OFF)
option(ENABLE_UI "Enable building with UI (requires Qt)" ON)
option(ENABLE_SCRIPTING "Enable scripting support" ON)
option(ENABLE_HEVC "Enable HEVC encoders" ON)
add_subdirectory(libobs)
if(OS_WINDOWS)
add_subdirectory(libobs-d3d11)
add_subdirectory(libobs-winrt)
endif()
add_subdirectory(libobs-opengl)
add_subdirectory(plugins)
add_subdirectory(UI)
message_configuration()
return()
endif()
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})
@ -25,10 +54,8 @@ include(CompilerConfig)
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)
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
@ -36,21 +63,15 @@ option(ENABLE_HEVC "Enable HEVC encoders" ON)
if(ENABLE_HEVC)
add_compile_definitions(ENABLE_HEVC)
endif()
option(BUILD_FOR_DISTRIBUTION "Build for distribution (enables optimisations)"
OFF)
option(BUILD_FOR_DISTRIBUTION "Build for distribution (enables optimizations)" OFF)
option(ENABLE_UI "Enable building with UI (requires Qt)" ON)
option(ENABLE_SCRIPTING "Enable scripting support" ON)
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)
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)

View file

@ -1,524 +1,110 @@
cmake_minimum_required(VERSION 3.16...3.25)
legacy_check()
add_subdirectory(obs-frontend-api)
option(ENABLE_UI "Enable building with UI (requires Qt)" ON)
if(NOT ENABLE_UI)
obs_status(DISABLED "OBS UI")
target_disable_feature(obs "User Interface")
return()
endif()
project(obs)
# Legacy support
if(TARGET obs-browser
AND NOT TARGET OBS::browser-panels
AND BROWSER_PANEL_SUPPORT_ENABLED)
add_library(obs-browser-panels INTERFACE)
add_library(OBS::browser-panels ALIAS obs-browser-panels)
target_include_directories(
obs-browser-panels INTERFACE ${CMAKE_SOURCE_DIR}/plugins/obs-browser/panel)
endif()
set(OAUTH_BASE_URL
"https://auth.obsproject.com/"
CACHE STRING "Default OAuth base URL")
mark_as_advanced(OAUTH_BASE_URL)
if(NOT DEFINED TWITCH_CLIENTID
OR "${TWITCH_CLIENTID}" STREQUAL ""
OR NOT DEFINED TWITCH_HASH
OR "${TWITCH_HASH}" STREQUAL ""
OR NOT TARGET OBS::browser-panels)
set(TWITCH_ENABLED OFF)
set(TWITCH_CLIENTID "")
set(TWITCH_HASH "0")
else()
set(TWITCH_ENABLED ON)
target_enable_feature(obs "User Interface")
endif()
if(NOT DEFINED RESTREAM_CLIENTID
OR "${RESTREAM_CLIENTID}" STREQUAL ""
OR NOT DEFINED RESTREAM_HASH
OR "${RESTREAM_HASH}" STREQUAL ""
OR NOT TARGET OBS::browser-panels)
set(RESTREAM_ENABLED OFF)
set(RESTREAM_CLIENTID "")
set(RESTREAM_HASH "0")
else()
set(RESTREAM_ENABLED ON)
endif()
if(NOT DEFINED YOUTUBE_CLIENTID
OR "${YOUTUBE_CLIENTID}" STREQUAL ""
OR NOT DEFINED YOUTUBE_SECRET
OR "${YOUTUBE_SECRET}" STREQUAL ""
OR NOT DEFINED YOUTUBE_CLIENTID_HASH
OR "${YOUTUBE_CLIENTID_HASH}" STREQUAL ""
OR NOT DEFINED YOUTUBE_SECRET_HASH
OR "${YOUTUBE_SECRET_HASH}" STREQUAL "")
set(YOUTUBE_ENABLED OFF)
else()
set(YOUTUBE_ENABLED ON)
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ui-config.h.in
${CMAKE_CURRENT_BINARY_DIR}/ui-config.h)
find_package(FFmpeg REQUIRED COMPONENTS avcodec avutil avformat)
find_package(CURL REQUIRED)
add_subdirectory(frontend-plugins)
add_executable(obs)
find_qt(COMPONENTS Widgets Network Svg Xml COMPONENTS_LINUX Gui)
target_link_libraries(obs PRIVATE Qt::Widgets Qt::Svg Qt::Xml Qt::Network)
set_target_properties(
obs
PROPERTIES AUTOMOC ON
AUTOUIC ON
AUTORCC ON
AUTOUIC_SEARCH_PATHS "forms;forms/source-toolbar")
if(_QT_VERSION EQUAL 6 AND OS_WINDOWS)
set_target_properties(obs PROPERTIES AUTORCC_OPTIONS "--format-version;1")
if(NOT TARGET OBS::libff-util)
add_subdirectory("${CMAKE_SOURCE_DIR}/deps/libff" "${CMAKE_BINARY_DIR}/deps/libff")
endif()
target_include_directories(obs PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR})
if(NOT TARGET OBS::json11)
add_subdirectory("${CMAKE_SOURCE_DIR}/deps/json11" "${CMAKE_BINARY_DIR}/deps/json11")
endif()
target_sources(obs PRIVATE forms/obs.qrc)
target_sources(
obs
PRIVATE forms/AutoConfigFinishPage.ui
forms/AutoConfigStartPage.ui
forms/AutoConfigStartPage.ui
forms/AutoConfigStreamPage.ui
forms/AutoConfigTestPage.ui
forms/AutoConfigVideoPage.ui
forms/ColorSelect.ui
forms/OBSAbout.ui
forms/OBSAdvAudio.ui
forms/OBSBasic.ui
forms/OBSBasicFilters.ui
forms/OBSBasicInteraction.ui
forms/OBSBasicSettings.ui
forms/OBSBasicSourceSelect.ui
forms/OBSBasicTransform.ui
forms/OBSBasicVCamConfig.ui
forms/OBSExtraBrowsers.ui
forms/OBSImporter.ui
forms/OBSLogReply.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)
add_executable(obs-studio)
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::libff-util
OBS::json11)
include(cmake/ui-qt.cmake)
include(cmake/ui-elements.cmake)
include(cmake/ui-windows.cmake)
include(cmake/feature-importers.cmake)
include(cmake/feature-browserpanels.cmake)
if(NOT OAUTH_BASE_URL)
set(OAUTH_BASE_URL
"https://auth.obsproject.com/"
CACHE STRING "Default OAuth base URL")
mark_as_advanced(OAUTH_BASE_URL)
endif()
include(cmake/feature-twitch.cmake)
include(cmake/feature-restream.cmake)
include(cmake/feature-youtube.cmake)
include(cmake/feature-whatsnew.cmake)
add_subdirectory(frontend-plugins)
configure_file(ui-config.h.in ui-config.h)
target_sources(
obs
PRIVATE auth-oauth.cpp
auth-oauth.hpp
obs-studio
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
multiview.cpp
multiview.hpp
obf.c
obf.h
obs-app.cpp
obs-app.hpp
obs-proxy-style.cpp
obs-proxy-style.hpp
api-interface.cpp
auth-base.cpp
auth-base.hpp
display-helpers.hpp
platform.hpp
qt-display.cpp
qt-display.hpp
qt-wrappers.cpp
qt-wrappers.hpp
ui-config.h
ui-validation.cpp
ui-validation.hpp
multiview.cpp
multiview.hpp
${CMAKE_SOURCE_DIR}/deps/json11/json11.cpp
${CMAKE_SOURCE_DIR}/deps/json11/json11.hpp
${CMAKE_SOURCE_DIR}/deps/libff/libff/ff-util.c
${CMAKE_SOURCE_DIR}/deps/libff/libff/ff-util.h
${CMAKE_CURRENT_BINARY_DIR}/ui-config.h)
target_sources(
obs
PRIVATE adv-audio-control.cpp
adv-audio-control.hpp
audio-encoders.cpp
audio-encoders.hpp
balance-slider.hpp
clickable-label.hpp
double-slider.cpp
double-slider.hpp
horizontal-scroll-area.cpp
horizontal-scroll-area.hpp
item-widget-helpers.cpp
item-widget-helpers.hpp
context-bar-controls.cpp
context-bar-controls.hpp
expand-checkbox.hpp
focus-list.cpp
focus-list.hpp
hotkey-edit.cpp
hotkey-edit.hpp
lineedit-autoresize.cpp
lineedit-autoresize.hpp
locked-checkbox.cpp
locked-checkbox.hpp
log-viewer.cpp
log-viewer.hpp
media-controls.cpp
media-controls.hpp
media-slider.cpp
media-slider.hpp
menu-button.cpp
menu-button.hpp
mute-checkbox.hpp
plain-text-edit.cpp
plain-text-edit.hpp
properties-view.cpp
properties-view.hpp
properties-view.moc.hpp
record-button.cpp
record-button.hpp
remote-text.cpp
remote-text.hpp
scene-tree.cpp
scene-tree.hpp
screenshot-obj.hpp
slider-absoluteset-style.cpp
slider-absoluteset-style.hpp
slider-ignorewheel.cpp
slider-ignorewheel.hpp
source-label.cpp
source-label.hpp
spinbox-ignorewheel.cpp
spinbox-ignorewheel.hpp
source-tree.cpp
source-tree.hpp
url-push-button.cpp
url-push-button.hpp
undo-stack-obs.cpp
undo-stack-obs.hpp
volume-control.cpp
volume-control.hpp
vertical-scroll-area.cpp
vertical-scroll-area.hpp
visibility-checkbox.cpp
visibility-checkbox.hpp
visibility-item-widget.cpp
visibility-item-widget.hpp)
target_sources(
obs
PRIVATE window-basic-about.cpp
window-basic-about.hpp
window-basic-auto-config.cpp
window-basic-auto-config.hpp
window-basic-auto-config-test.cpp
window-basic-adv-audio.cpp
window-basic-adv-audio.hpp
window-basic-filters.cpp
window-basic-filters.hpp
window-basic-interaction.cpp
window-basic-interaction.hpp
window-basic-main.cpp
window-basic-main.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-preview.cpp
window-basic-properties.cpp
window-basic-properties.hpp
window-basic-settings.cpp
window-basic-settings.hpp
window-basic-settings-a11y.cpp
window-basic-settings-stream.cpp
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-preview.hpp
window-basic-vcam.hpp
window-basic-vcam-config.cpp
window-basic-vcam-config.hpp
window-dock.cpp
window-dock.hpp
window-importer.cpp
window-importer.hpp
window-log-reply.hpp
window-main.hpp
window-missing-files.cpp
window-missing-files.hpp
window-namedialog.cpp
window-namedialog.hpp
window-log-reply.cpp
window-projector.cpp
window-projector.hpp
window-remux.cpp
window-remux.hpp)
target_sources(
obs
PRIVATE importers/importers.cpp importers/importers.hpp importers/classic.cpp
importers/sl.cpp importers/studio.cpp importers/xsplit.cpp)
target_compile_features(obs PRIVATE cxx_std_17)
target_include_directories(obs PRIVATE ${CMAKE_SOURCE_DIR}/deps/json11
${CMAKE_SOURCE_DIR}/deps/libff)
target_link_libraries(
obs PRIVATE CURL::libcurl FFmpeg::avcodec FFmpeg::avutil FFmpeg::avformat
OBS::libobs OBS::frontend-api)
set_target_properties(obs PROPERTIES FOLDER "frontend")
if(TARGET OBS::browser-panels)
get_target_property(_PANEL_INCLUDE_DIRECTORY OBS::browser-panels
INTERFACE_INCLUDE_DIRECTORIES)
target_include_directories(obs PRIVATE ${_PANEL_INCLUDE_DIRECTORY})
target_compile_definitions(obs PRIVATE BROWSER_AVAILABLE)
target_sources(
obs PRIVATE window-dock-browser.cpp window-dock-browser.hpp
window-extra-browsers.cpp window-extra-browsers.hpp)
if(TWITCH_ENABLED)
target_sources(obs PRIVATE auth-twitch.cpp auth-twitch.hpp)
endif()
if(RESTREAM_ENABLED)
target_sources(obs PRIVATE auth-restream.cpp auth-restream.hpp)
endif()
if(OS_WINDOWS OR OS_MACOS)
set(ENABLE_WHATSNEW
ON
CACHE INTERNAL "Enable WhatsNew dialog")
elseif(OS_LINUX)
option(ENABLE_WHATSNEW "Enable WhatsNew dialog" ON)
endif()
if(ENABLE_WHATSNEW)
target_compile_definitions(obs PRIVATE WHATSNEW_ENABLED)
endif()
endif()
if(YOUTUBE_ENABLED)
target_sources(
obs
PRIVATE auth-youtube.cpp auth-youtube.hpp youtube-api-wrappers.cpp
youtube-api-wrappers.hpp window-youtube-actions.cpp
window-youtube-actions.hpp)
endif()
ui-validation.hpp)
if(OS_WINDOWS)
set_target_properties(obs PROPERTIES WIN32_EXECUTABLE ON OUTPUT_NAME
"obs${_ARCH_SUFFIX}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/obs.rc.in
${CMAKE_BINARY_DIR}/obs.rc)
find_package(Detours REQUIRED)
target_sources(
obs
PRIVATE obs.manifest
platform-windows.cpp
win-dll-blocklist.c
update/update-window.cpp
update/update-window.hpp
update/win-update.cpp
update/win-update.hpp
update/shared-update.cpp
update/shared-update.hpp
update/update-helpers.cpp
update/update-helpers.hpp
update/crypto-helpers-mbedtls.cpp
update/crypto-helpers.hpp
${CMAKE_BINARY_DIR}/obs.rc)
if(_QT_VERSION EQUAL 5)
find_qt(COMPONENTS WinExtras)
target_link_libraries(obs PRIVATE Qt::WinExtras)
endif()
find_package(MbedTLS)
target_link_libraries(obs PRIVATE Mbedtls::Mbedtls OBS::blake2
Detours::Detours)
target_compile_features(obs PRIVATE cxx_std_17)
target_compile_definitions(
obs PRIVATE UNICODE _UNICODE _CRT_SECURE_NO_WARNINGS
_CRT_NONSTDC_NO_WARNINGS PSAPI_VERSION=2)
if(MSVC)
target_link_options(obs PRIVATE "LINKER:/IGNORE:4098" "LINKER:/IGNORE:4099")
target_link_libraries(obs PRIVATE OBS::w32-pthreads)
set_source_files_properties(
${CMAKE_CURRENT_SOURCE_DIR}../deps/libff/libff/ff-util.c
PROPERTIES COMPILE_FLAGS -Dinline=__inline)
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
target_link_options(obs PRIVATE /LARGEADDRESSAWARE)
endif()
add_subdirectory(win-update/updater)
include(cmake/os-windows.cmake)
elseif(OS_MACOS)
set_target_properties(
obs
PROPERTIES OUTPUT_NAME ${OBS_BUNDLE_NAME}
MACOSX_BUNDLE ON
MACOSX_BUNDLE_INFO_PLIST
${CMAKE_SOURCE_DIR}/cmake/bundle/macOS/Info.plist.in)
if(XCODE)
set_target_properties(
obs
PROPERTIES XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER
"${MACOSX_BUNDLE_GUI_IDENTIFIER}"
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME AppIcon
XCODE_ATTRIBUTE_PRODUCT_NAME "OBS")
set(APP_ICON_TARGET ${CMAKE_SOURCE_DIR}/cmake/bundle/macOS/Assets.xcassets)
target_sources(obs PRIVATE ${APP_ICON_TARGET})
set_source_files_properties(${APP_ICON_TARGET}
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
else()
set(APP_ICON_TARGET ${CMAKE_SOURCE_DIR}/cmake/bundle/macOS/AppIcon.iconset)
set(APP_ICON_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/AppIcon.icns)
add_custom_command(
OUTPUT ${APP_ICON_OUTPUT} COMMAND iconutil -c icns "${APP_ICON_TARGET}"
-o "${APP_ICON_OUTPUT}")
set(MACOSX_BUNDLE_ICON_FILE AppIcon.icns)
target_sources(obs PRIVATE ${APP_ICON_OUTPUT}
${CMAKE_CURRENT_SOURCE_DIR}/../AUTHORS)
set_source_files_properties(${APP_ICON_OUTPUT}
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
endif()
find_library(APPKIT Appkit)
find_library(AVFOUNDATION AVFoundation)
find_library(APPLICATIONSERVICES ApplicationServices)
mark_as_advanced(APPKIT AVFOUNDATION APPLICATIONSERVICES)
target_link_libraries(obs PRIVATE ${APPKIT} ${AVFOUNDATION}
${APPLICATIONSERVICES})
target_sources(obs PRIVATE platform-osx.mm)
target_sources(obs PRIVATE forms/OBSPermissions.ui window-permissions.cpp
window-permissions.hpp)
if(ENABLE_WHATSNEW)
find_library(SECURITY Security)
mark_as_advanced(SECURITY)
target_link_libraries(obs PRIVATE ${SECURITY} OBS::blake2)
target_sources(
obs
PRIVATE update/crypto-helpers.hpp update/crypto-helpers-mac.mm
update/shared-update.cpp update/shared-update.hpp
update/update-helpers.cpp update/update-helpers.hpp)
if(SPARKLE_APPCAST_URL AND SPARKLE_PUBLIC_KEY)
find_library(SPARKLE Sparkle)
mark_as_advanced(SPARKLE)
target_sources(obs PRIVATE update/mac-update.cpp update/mac-update.hpp
update/sparkle-updater.mm)
target_compile_definitions(obs PRIVATE ENABLE_SPARKLE_UPDATER)
target_link_libraries(obs PRIVATE ${SPARKLE})
# Enable Automatic Reference Counting for Sparkle wrapper
set_source_files_properties(update/sparkle-updater.mm
PROPERTIES COMPILE_FLAGS -fobjc-arc)
endif()
endif()
set_source_files_properties(platform-osx.mm PROPERTIES COMPILE_FLAGS
-fobjc-arc)
elseif(OS_POSIX)
target_sources(obs PRIVATE platform-x11.cpp)
target_link_libraries(obs PRIVATE Qt::GuiPrivate)
if(TARGET obspython)
find_package(Python REQUIRED COMPONENTS Interpreter Development)
target_link_libraries(obs PRIVATE Python::Python)
target_link_options(obs PRIVATE "LINKER:-no-as-needed")
endif()
if(NOT LINUX_PORTABLE)
add_subdirectory(xdg-data)
endif()
if(OS_FREEBSD)
target_link_libraries(obs PRIVATE procstat)
endif()
if(OS_LINUX AND ENABLE_WHATSNEW)
find_package(MbedTLS)
if(NOT MBEDTLS_FOUND)
obs_status(
FATAL_ERROR
"mbedTLS not found, but required for WhatsNew support on Linux")
endif()
target_sources(
obs
PRIVATE update/crypto-helpers.hpp update/crypto-helpers-mbedtls.cpp
update/shared-update.cpp update/shared-update.hpp
update/update-helpers.cpp update/update-helpers.hpp)
target_link_libraries(obs PRIVATE Mbedtls::Mbedtls OBS::blake2)
endif()
include(cmake/os-macos.cmake)
elseif(OS_LINUX)
include(cmake/os-linux.cmake)
elseif(OS_FREEBSD)
include(cmake/os-freebsd.cmake)
endif()
get_target_property(_SOURCES obs SOURCES)
set(_UI ${_SOURCES})
list(FILTER _UI INCLUDE REGEX ".*\\.ui?")
foreach(graphics_library IN ITEMS opengl metal d3d11)
string(TOUPPER ${graphics_library} graphics_library_U)
if(TARGET OBS::libobs-${graphics_library})
target_compile_definitions(obs-studio
PRIVATE DL_${graphics_library_U}="$<TARGET_FILE_NAME:OBS::libobs-${graphics_library}>")
else()
target_compile_definitions(obs-studio PRIVATE DL_${graphics_library_U}="")
endif()
endforeach()
source_group(
TREE "${CMAKE_CURRENT_SOURCE_DIR}/forms"
PREFIX "UI Files"
FILES ${_UI})
unset(_SOURCES)
unset(_UI)
define_graphic_modules(obs)
setup_obs_app(obs)
setup_target_resources(obs obs-studio)
add_target_resource(obs ${CMAKE_CURRENT_SOURCE_DIR}/../AUTHORS
obs-studio/authors)
set_target_properties_obs(obs-studio PROPERTIES FOLDER frontend OUTPUT_NAME obs)

View file

@ -0,0 +1,8 @@
if(TARGET OBS::browser-panels)
target_enable_feature(obs-studio "Browser panels" BROWSER_AVAILABLE)
target_link_libraries(obs-studio PRIVATE OBS::browser-panels)
target_sources(obs-studio PRIVATE window-dock-browser.cpp window-dock-browser.hpp window-extra-browsers.cpp
window-extra-browsers.hpp)
endif()

View file

@ -0,0 +1,2 @@
target_sources(obs-studio PRIVATE importers/importers.cpp importers/importers.hpp importers/classic.cpp
importers/sl.cpp importers/studio.cpp importers/xsplit.cpp)

View file

@ -0,0 +1,10 @@
if(RESTREAM_CLIENTID
AND RESTREAM_HASH
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()
target_disable_feature(obs-studio "Restream API connection")
set(RESTREAM_CLIENTID "")
set(RESTREAM_HASH "0")
endif()

View file

@ -0,0 +1,12 @@
if(SPARKLE_APPCAST_URL AND SPARKLE_PUBLIC_KEY)
find_library(SPARKLE Sparkle)
mark_as_advanced(SPARKLE)
target_sources(obs-studio PRIVATE update/mac-update.cpp update/mac-update.hpp update/sparkle-updater.mm)
set_source_files_properties(update/sparkle-updater.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
target_link_libraries(obs-studio PRIVATE ${SPARKLE})
target_enable_feature(obs-studio "Sparkle updater" ENABLE_SPARKLE_UPDATER)
else()
target_disable_feature(obs-studio "Sparkle updater")
endif()

View file

@ -0,0 +1,10 @@
if(TWITCH_CLIENTID
AND TWITCH_HASH
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()
target_disable_feature(obs-studio "Twitch API connection")
set(TWITCH_CLIENTID "")
set(TWITCH_HASH "0")
endif()

View file

@ -0,0 +1,29 @@
option(ENABLE_WHATSNEW "Enable WhatsNew dialog" ON)
if(NOT TARGET OBS::blake2)
add_subdirectory("${CMAKE_SOURCE_DIR}/deps/blake2" "${CMAKE_BINARY_DIR}/deps/blake2")
endif()
if(ENABLE_WHATSNEW AND TARGET OBS::browser-panels)
if(OS_MACOS)
find_library(SECURITY Security)
mark_as_advanced(SECURITY)
target_sources(obs-studio PRIVATE update/crypto-helpers.hpp update/crypto-helpers-mac.mm update/shared-update.cpp
update/shared-update.hpp update/update-helpers.cpp update/update-helpers.hpp)
target_link_libraries(obs-studio PRIVATE ${SECURITY} OBS::blake2)
include(cmake/feature-sparkle.cmake)
elseif(OS_LINUX)
find_package(MbedTLS REQUIRED)
target_link_libraries(obs-studio PRIVATE MbedTLS::MbedTLS OBS::blake2)
target_sources(
obs-studio PRIVATE update/crypto-helpers.hpp update/crypto-helpers-mbedtls.cpp 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)
endif()

View file

@ -0,0 +1,13 @@
if(YOUTUBE_CLIENTID
AND YOUTUBE_SECRET
AND YOUTUBE_CLIENTID_HASH
AND YOUTUBE_SECRET_HASH)
target_sources(obs-studio PRIVATE auth-youtube.cpp auth-youtube.hpp youtube-api-wrappers.cpp youtube-api-wrappers.hpp
window-youtube-actions.cpp window-youtube-actions.hpp)
target_enable_feature(obs-studio "YouTube API connection" YOUTUBE_ENABLED)
else()
target_disable_feature(obs-studio "YouTube API connection")
set(YOUTUBE_SECRET_HASH 0)
set(YOUTUBE_CLIENTID_HASH 0)
endif()

489
UI/cmake/legacy.cmake Normal file
View file

@ -0,0 +1,489 @@
add_subdirectory(obs-frontend-api)
option(ENABLE_UI "Enable building with UI (requires Qt)" ON)
if(NOT ENABLE_UI)
obs_status(DISABLED "OBS UI")
return()
endif()
project(obs)
# Legacy support
if(TARGET obs-browser
AND NOT TARGET OBS::browser-panels
AND BROWSER_PANEL_SUPPORT_ENABLED)
add_library(obs-browser-panels INTERFACE)
add_library(OBS::browser-panels ALIAS obs-browser-panels)
target_include_directories(obs-browser-panels INTERFACE ${CMAKE_SOURCE_DIR}/plugins/obs-browser/panel)
endif()
set(OAUTH_BASE_URL
"https://auth.obsproject.com/"
CACHE STRING "Default OAuth base URL")
mark_as_advanced(OAUTH_BASE_URL)
if(NOT DEFINED TWITCH_CLIENTID
OR "${TWITCH_CLIENTID}" STREQUAL ""
OR NOT DEFINED TWITCH_HASH
OR "${TWITCH_HASH}" STREQUAL ""
OR NOT TARGET OBS::browser-panels)
set(TWITCH_ENABLED OFF)
set(TWITCH_CLIENTID "")
set(TWITCH_HASH "0")
else()
set(TWITCH_ENABLED ON)
endif()
if(NOT DEFINED RESTREAM_CLIENTID
OR "${RESTREAM_CLIENTID}" STREQUAL ""
OR NOT DEFINED RESTREAM_HASH
OR "${RESTREAM_HASH}" STREQUAL ""
OR NOT TARGET OBS::browser-panels)
set(RESTREAM_ENABLED OFF)
set(RESTREAM_CLIENTID "")
set(RESTREAM_HASH "0")
else()
set(RESTREAM_ENABLED ON)
endif()
if(NOT DEFINED YOUTUBE_CLIENTID
OR "${YOUTUBE_CLIENTID}" STREQUAL ""
OR NOT DEFINED YOUTUBE_SECRET
OR "${YOUTUBE_SECRET}" STREQUAL ""
OR NOT DEFINED YOUTUBE_CLIENTID_HASH
OR "${YOUTUBE_CLIENTID_HASH}" STREQUAL ""
OR NOT DEFINED YOUTUBE_SECRET_HASH
OR "${YOUTUBE_SECRET_HASH}" STREQUAL "")
set(YOUTUBE_SECRET_HASH "0")
set(YOUTUBE_CLIENTID_HASH "0")
set(YOUTUBE_ENABLED OFF)
else()
set(YOUTUBE_ENABLED ON)
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ui-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/ui-config.h)
find_package(FFmpeg REQUIRED COMPONENTS avcodec avutil avformat)
find_package(CURL REQUIRED)
add_subdirectory(frontend-plugins)
add_executable(obs)
find_qt(COMPONENTS Widgets Network Svg Xml COMPONENTS_LINUX Gui)
target_link_libraries(obs PRIVATE Qt::Widgets Qt::Svg Qt::Xml Qt::Network)
set_target_properties(
obs
PROPERTIES AUTOMOC ON
AUTOUIC ON
AUTORCC ON
AUTOUIC_SEARCH_PATHS "forms;forms/source-toolbar")
if(_QT_VERSION EQUAL 6 AND OS_WINDOWS)
set_target_properties(obs PROPERTIES AUTORCC_OPTIONS "--format-version;1")
endif()
target_include_directories(obs PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
target_sources(obs PRIVATE forms/obs.qrc)
target_sources(
obs
PRIVATE forms/AutoConfigFinishPage.ui
forms/AutoConfigStartPage.ui
forms/AutoConfigStartPage.ui
forms/AutoConfigStreamPage.ui
forms/AutoConfigTestPage.ui
forms/AutoConfigVideoPage.ui
forms/ColorSelect.ui
forms/OBSAbout.ui
forms/OBSAdvAudio.ui
forms/OBSBasic.ui
forms/OBSBasicFilters.ui
forms/OBSBasicInteraction.ui
forms/OBSBasicSettings.ui
forms/OBSBasicSourceSelect.ui
forms/OBSBasicTransform.ui
forms/OBSBasicVCamConfig.ui
forms/OBSExtraBrowsers.ui
forms/OBSImporter.ui
forms/OBSLogReply.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
PRIVATE auth-oauth.cpp
auth-oauth.hpp
auth-listener.cpp
auth-listener.hpp
obf.c
obf.h
obs-app.cpp
obs-app.hpp
obs-proxy-style.cpp
obs-proxy-style.hpp
api-interface.cpp
auth-base.cpp
auth-base.hpp
display-helpers.hpp
platform.hpp
qt-display.cpp
qt-display.hpp
qt-wrappers.cpp
qt-wrappers.hpp
ui-validation.cpp
ui-validation.hpp
multiview.cpp
multiview.hpp
${CMAKE_SOURCE_DIR}/deps/json11/json11.cpp
${CMAKE_SOURCE_DIR}/deps/json11/json11.hpp
${CMAKE_SOURCE_DIR}/deps/libff/libff/ff-util.c
${CMAKE_SOURCE_DIR}/deps/libff/libff/ff-util.h
${CMAKE_CURRENT_BINARY_DIR}/ui-config.h)
target_sources(
obs
PRIVATE adv-audio-control.cpp
adv-audio-control.hpp
audio-encoders.cpp
audio-encoders.hpp
balance-slider.hpp
clickable-label.hpp
double-slider.cpp
double-slider.hpp
horizontal-scroll-area.cpp
horizontal-scroll-area.hpp
item-widget-helpers.cpp
item-widget-helpers.hpp
context-bar-controls.cpp
context-bar-controls.hpp
expand-checkbox.hpp
focus-list.cpp
focus-list.hpp
hotkey-edit.cpp
hotkey-edit.hpp
lineedit-autoresize.cpp
lineedit-autoresize.hpp
locked-checkbox.cpp
locked-checkbox.hpp
log-viewer.cpp
log-viewer.hpp
media-controls.cpp
media-controls.hpp
media-slider.cpp
media-slider.hpp
menu-button.cpp
menu-button.hpp
mute-checkbox.hpp
plain-text-edit.cpp
plain-text-edit.hpp
properties-view.cpp
properties-view.hpp
properties-view.moc.hpp
record-button.cpp
record-button.hpp
remote-text.cpp
remote-text.hpp
scene-tree.cpp
scene-tree.hpp
screenshot-obj.hpp
slider-absoluteset-style.cpp
slider-absoluteset-style.hpp
slider-ignorewheel.cpp
slider-ignorewheel.hpp
source-label.cpp
source-label.hpp
spinbox-ignorewheel.cpp
spinbox-ignorewheel.hpp
source-tree.cpp
source-tree.hpp
url-push-button.cpp
url-push-button.hpp
undo-stack-obs.cpp
undo-stack-obs.hpp
volume-control.cpp
volume-control.hpp
vertical-scroll-area.cpp
vertical-scroll-area.hpp
visibility-checkbox.cpp
visibility-checkbox.hpp
visibility-item-widget.cpp
visibility-item-widget.hpp)
target_sources(
obs
PRIVATE window-basic-about.cpp
window-basic-about.hpp
window-basic-auto-config.cpp
window-basic-auto-config.hpp
window-basic-auto-config-test.cpp
window-basic-adv-audio.cpp
window-basic-adv-audio.hpp
window-basic-filters.cpp
window-basic-filters.hpp
window-basic-interaction.cpp
window-basic-interaction.hpp
window-basic-main.cpp
window-basic-main.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-preview.cpp
window-basic-properties.cpp
window-basic-properties.hpp
window-basic-settings.cpp
window-basic-settings.hpp
window-basic-settings-a11y.cpp
window-basic-settings-stream.cpp
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-preview.hpp
window-basic-vcam.hpp
window-basic-vcam-config.cpp
window-basic-vcam-config.hpp
window-dock.cpp
window-dock.hpp
window-importer.cpp
window-importer.hpp
window-log-reply.hpp
window-main.hpp
window-missing-files.cpp
window-missing-files.hpp
window-namedialog.cpp
window-namedialog.hpp
window-log-reply.cpp
window-projector.cpp
window-projector.hpp
window-remux.cpp
window-remux.hpp)
target_sources(obs PRIVATE importers/importers.cpp importers/importers.hpp importers/classic.cpp importers/sl.cpp
importers/studio.cpp importers/xsplit.cpp)
target_compile_features(obs PRIVATE cxx_std_17)
target_include_directories(obs PRIVATE ${CMAKE_SOURCE_DIR}/deps/json11 ${CMAKE_SOURCE_DIR}/deps/libff)
target_link_libraries(obs PRIVATE CURL::libcurl FFmpeg::avcodec FFmpeg::avutil FFmpeg::avformat OBS::libobs
OBS::frontend-api)
set_target_properties(obs PROPERTIES FOLDER "frontend")
if(TARGET OBS::browser-panels)
get_target_property(_PANEL_INCLUDE_DIRECTORY OBS::browser-panels INTERFACE_INCLUDE_DIRECTORIES)
target_include_directories(obs PRIVATE ${_PANEL_INCLUDE_DIRECTORY})
target_compile_definitions(obs PRIVATE BROWSER_AVAILABLE)
target_sources(obs PRIVATE window-dock-browser.cpp window-dock-browser.hpp window-extra-browsers.cpp
window-extra-browsers.hpp)
if(TWITCH_ENABLED)
target_sources(obs PRIVATE auth-twitch.cpp auth-twitch.hpp)
endif()
if(RESTREAM_ENABLED)
target_sources(obs PRIVATE auth-restream.cpp auth-restream.hpp)
endif()
if(OS_WINDOWS OR OS_MACOS)
set(ENABLE_WHATSNEW
ON
CACHE INTERNAL "Enable WhatsNew dialog")
elseif(OS_LINUX)
option(ENABLE_WHATSNEW "Enable WhatsNew dialog" ON)
endif()
if(ENABLE_WHATSNEW)
target_compile_definitions(obs PRIVATE WHATSNEW_ENABLED)
endif()
endif()
if(YOUTUBE_ENABLED)
target_sources(obs PRIVATE auth-youtube.cpp auth-youtube.hpp youtube-api-wrappers.cpp youtube-api-wrappers.hpp
window-youtube-actions.cpp window-youtube-actions.hpp)
endif()
if(OS_WINDOWS)
set_target_properties(obs PROPERTIES WIN32_EXECUTABLE ON OUTPUT_NAME "obs${_ARCH_SUFFIX}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/obs.rc.in ${CMAKE_BINARY_DIR}/obs.rc)
find_package(Detours REQUIRED)
target_sources(
obs
PRIVATE obs.manifest
platform-windows.cpp
win-dll-blocklist.c
update/update-window.cpp
update/update-window.hpp
update/win-update.cpp
update/win-update.hpp
update/shared-update.cpp
update/shared-update.hpp
update/update-helpers.cpp
update/update-helpers.hpp
update/crypto-helpers-mbedtls.cpp
update/crypto-helpers.hpp
${CMAKE_BINARY_DIR}/obs.rc)
if(_QT_VERSION EQUAL 5)
find_qt(COMPONENTS WinExtras)
target_link_libraries(obs PRIVATE Qt::WinExtras)
endif()
find_package(MbedTLS)
target_link_libraries(obs PRIVATE Mbedtls::Mbedtls OBS::blake2 Detours::Detours)
target_compile_features(obs PRIVATE cxx_std_17)
target_compile_definitions(obs PRIVATE UNICODE _UNICODE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS
PSAPI_VERSION=2)
if(MSVC)
target_link_options(obs PRIVATE "LINKER:/IGNORE:4098" "LINKER:/IGNORE:4099")
target_link_libraries(obs PRIVATE OBS::w32-pthreads)
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}../deps/libff/libff/ff-util.c PROPERTIES COMPILE_FLAGS
-Dinline=__inline)
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
target_link_options(obs PRIVATE /LARGEADDRESSAWARE)
endif()
add_subdirectory(win-update/updater)
elseif(OS_MACOS)
set_target_properties(
obs
PROPERTIES OUTPUT_NAME ${OBS_BUNDLE_NAME}
MACOSX_BUNDLE ON
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/cmake/bundle/macOS/Info.plist.in)
if(XCODE)
set_target_properties(
obs
PROPERTIES XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "${MACOSX_BUNDLE_GUI_IDENTIFIER}"
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME AppIcon
XCODE_ATTRIBUTE_PRODUCT_NAME "OBS")
set(APP_ICON_TARGET ${CMAKE_SOURCE_DIR}/cmake/bundle/macOS/Assets.xcassets)
target_sources(obs PRIVATE ${APP_ICON_TARGET})
set_source_files_properties(${APP_ICON_TARGET} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
else()
set(APP_ICON_TARGET ${CMAKE_SOURCE_DIR}/cmake/bundle/macOS/AppIcon.iconset)
set(APP_ICON_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/AppIcon.icns)
add_custom_command(OUTPUT ${APP_ICON_OUTPUT} COMMAND iconutil -c icns "${APP_ICON_TARGET}" -o "${APP_ICON_OUTPUT}")
set(MACOSX_BUNDLE_ICON_FILE AppIcon.icns)
target_sources(obs PRIVATE ${APP_ICON_OUTPUT} ${CMAKE_CURRENT_SOURCE_DIR}/../AUTHORS)
set_source_files_properties(${APP_ICON_OUTPUT} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
endif()
find_library(APPKIT Appkit)
find_library(AVFOUNDATION AVFoundation)
find_library(APPLICATIONSERVICES ApplicationServices)
mark_as_advanced(APPKIT AVFOUNDATION APPLICATIONSERVICES)
target_link_libraries(obs PRIVATE ${APPKIT} ${AVFOUNDATION} ${APPLICATIONSERVICES})
target_sources(obs PRIVATE platform-osx.mm)
target_sources(obs PRIVATE forms/OBSPermissions.ui window-permissions.cpp window-permissions.hpp)
if(ENABLE_WHATSNEW)
find_library(SECURITY Security)
mark_as_advanced(SECURITY)
target_link_libraries(obs PRIVATE ${SECURITY} OBS::blake2)
target_sources(obs PRIVATE update/crypto-helpers.hpp update/crypto-helpers-mac.mm update/shared-update.cpp
update/shared-update.hpp update/update-helpers.cpp update/update-helpers.hpp)
if(SPARKLE_APPCAST_URL AND SPARKLE_PUBLIC_KEY)
find_library(SPARKLE Sparkle)
mark_as_advanced(SPARKLE)
target_sources(obs PRIVATE update/mac-update.cpp update/mac-update.hpp update/sparkle-updater.mm)
target_compile_definitions(obs PRIVATE ENABLE_SPARKLE_UPDATER)
target_link_libraries(obs PRIVATE ${SPARKLE})
# Enable Automatic Reference Counting for Sparkle wrapper
set_source_files_properties(update/sparkle-updater.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
endif()
endif()
set_source_files_properties(platform-osx.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
elseif(OS_POSIX)
target_sources(obs PRIVATE platform-x11.cpp)
target_link_libraries(obs PRIVATE Qt::GuiPrivate)
target_compile_definitions(obs PRIVATE OBS_INSTALL_PREFIX="${OBS_INSTALL_PREFIX}")
if(TARGET obspython)
find_package(Python REQUIRED COMPONENTS Interpreter Development)
target_link_libraries(obs PRIVATE Python::Python)
target_link_options(obs PRIVATE "LINKER:-no-as-needed")
endif()
if(NOT LINUX_PORTABLE)
add_subdirectory(xdg-data)
endif()
if(OS_FREEBSD)
target_link_libraries(obs PRIVATE procstat)
endif()
if(OS_LINUX AND ENABLE_WHATSNEW)
find_package(MbedTLS)
if(NOT MBEDTLS_FOUND)
obs_status(FATAL_ERROR "mbedTLS not found, but required for WhatsNew support on Linux")
endif()
target_sources(obs PRIVATE update/crypto-helpers.hpp update/crypto-helpers-mbedtls.cpp update/shared-update.cpp
update/shared-update.hpp update/update-helpers.cpp update/update-helpers.hpp)
target_link_libraries(obs PRIVATE Mbedtls::Mbedtls OBS::blake2)
endif()
endif()
get_target_property(_SOURCES obs SOURCES)
set(_UI ${_SOURCES})
list(FILTER _UI INCLUDE REGEX ".*\\.ui?")
source_group(
TREE "${CMAKE_CURRENT_SOURCE_DIR}/forms"
PREFIX "UI Files"
FILES ${_UI})
unset(_SOURCES)
unset(_UI)
define_graphic_modules(obs)
setup_obs_app(obs)
setup_target_resources(obs obs-studio)
add_target_resource(obs ${CMAKE_CURRENT_SOURCE_DIR}/../AUTHORS obs-studio/authors)

View file

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>com.obsproject.Studio</id>
<launchable type="desktop-id">com.obsproject.Studio.desktop</launchable>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0</project_license>
<name>OBS Studio</name>
<developer_name>OBS Project</developer_name>
<summary>Live streaming and video recording software</summary>
<description>
<p>Free and open source software for video capturing, recording, and live streaming.</p>
<p>Features:</p>
<ul>
<li>High performance real time video/audio capturing and mixing. Create scenes made up of multiple sources including window captures, images, text, browser windows, webcams, capture cards and more.</li>
<li>Set up an unlimited number of scenes you can switch between seamlessly via custom transitions.</li>
<li>Intuitive audio mixer with per-source filters such as noise gate, noise suppression, and gain. Take full control with VST plugin support.</li>
<li>Powerful and easy to use configuration options. Add new Sources, duplicate existing ones, and adjust their properties effortlessly.</li>
<li>Streamlined Settings panel gives you access to a wide array of configuration options to tweak every aspect of your broadcast or recording.</li>
<li>Modular 'Dock' UI allows you to rearrange the layout exactly as you like. You can even pop out each individual Dock to its own window.</li>
</ul>
<p>Create Professional Productions:</p>
<ul>
<li>Choose from a number of different and customizable transitions for when you switch between your scenes or add your own stinger video files.</li>
<li>Set hotkeys for nearly every sort of action, such as switching between scenes, starting/stopping streams or recordings, muting audio sources, push to talk, and more.</li>
<li>Studio Mode lets you preview your scenes and sources before pushing them live. Adjust your scenes and sources or create new ones and ensure they're perfect before your viewers ever see them.</li>
<li>Get a high level view of your production using the Multiview. Monitor 8 different scenes and easily cue or transition to any of them with merely a single or double click.</li>
</ul>
</description>
<url type="homepage">https://obsproject.com</url>
<url type="bugtracker">https://github.com/obsproject/obs-studio/issues</url>
<url type="donation">https://obsproject.com/contribute</url>
<url type="translate">https://crowdin.com/project/obs-studio</url>
<screenshots>
<screenshot type="default">
<image>https://obsproject.com/assets/images/OBSDemoApp2610.png</image>
</screenshot>
</screenshots>
<content_rating type="oars-1.1"/>
<kudos>
<kudo>ModernToolkit</kudo>
<kudo>HiDpiIcon</kudo>
</kudos>
<releases>
<release version="@OBS_VERSION@" date="@APPDATA_RELEASE_DATE@"/>
</releases>
</component>

View file

@ -0,0 +1,97 @@
[Desktop Entry]
Version=1.0
Name=OBS Studio
GenericName=Streaming/Recording Software
Comment=Free and Open Source Streaming/Recording Software
Exec=obs
Icon=com.obsproject.Studio
Terminal=false
Type=Application
Categories=AudioVideo;Recorder;
StartupNotify=true
StartupWMClass=obs
GenericName[an_ES]=Programa de retransmisión/gravación
Comment[an_ES]=Program de retransmisión/gravación libre y de codigo ubierto
GenericName[ar_SA]=برامج البث / التسجيل
Comment[ar_SA]=برنامج بث / تسجيل مجاني ومفتوح المصدر
GenericName[bn_BD]=িি/ি
Comment[bn_BD]=ি িি/ি
GenericName[ca_ES]=Programa de retransmissió/enregistrament
Comment[ca_ES]=Programa de retransmissió/enregistrament de codi lliure i gratuït
GenericName[cs_CZ]=Software pro vysílání a nahrávání
Comment[cs_CZ]=Svobodný software pro vysílání a nahrávání
GenericName[da_DK]=Streaming-/optagelsessoftware
Comment[da_DK]=Gratis og open-source streaming-/optagelsessoftware
GenericName[de_DE]=Streaming-/Aufnahme-Software
Comment[de_DE]=Freie und Open-Source-Streaming-/Aufnahme-Software
GenericName[el_GR]=Λογισμικό Ροής/Καταγραφής
Comment[el_GR]=Δωρεαν Λογισμικό Streaming/Kαταγραφή ανοιχτου κωδικα
GenericName[en_GB]=Streaming/Recording Software
Comment[en_GB]=Free and Open Source Streaming/Recording Software
GenericName[es_ES]=Disfusion digital/ Software de grabacion
Comment[es_ES]=Difusion Digital/Software de grabacion Gratis y con Fuentes Abiertas
GenericName[et_EE]=Video voogesituse ja salvestuse tarkvara
Comment[et_EE]=Tasuta ja avatud lähtekoodiga video voogesituse ja salvestuse tarkvara
GenericName[fa_IR]=نرم افزار جریان/ضبط
Comment[fa_IR]=نرم افزار منبع باز و رایگان جریان/ضبط
GenericName[fi_FI]=Striimaus-/tallennusohjelmisto
Comment[fi_FI]=Ilmainen ja avoimen lähdekoodin striimaus-/tallennusohjelmisto
GenericName[fil_PH]=Software para sa Streaming/Recording
Comment[fil_PH]=Libre at Open Source na Streaming/Recording Software
GenericName[fr_FR]=Logiciel de diffusion/enregistrement
Comment[fr_FR]=Logiciel de diffusion/enregistrement gratuit et Open Source
GenericName[gd_GB]=Bathar-bog sruthaidh/clàraidh
Comment[gd_GB]=Bathar-bog sruthaidh/clàraidh saor le bun-tùs fosgailte
GenericName[he_IL]=תוכנה לשידורים חיים והקלטה
Comment[he_IL]=תכנה חינמית בקוד פתוח לשידורים חיים ולהקלטה
GenericName[hi_IN]=ि/िि
Comment[hi_IN]= ि/िि
GenericName[hr_HR]=Softver za emitiranje/snimanje
Comment[hr_HR]=Slobodan softver otvorenog koda za emitiranje/snimanje
GenericName[hu_HU]=Közvetítő/rögzítő szoftver
Comment[hu_HU]=Szabad és nyílt forráskódú közvetítő/rögzítő szoftver
GenericName[id_ID]=Perangkat Lunak Streaming/Perekaman
Comment[id_ID]=Perangkat Lunak Streaming/Perekaman Gratis dan Sumber Terbuka
GenericName[it_IT]=Software per dirette e registrazione schermo
Comment[it_IT]=Software Libero e Open Source Streaming/Registrazione
GenericName[ja_JP]=/
Comment[ja_JP]=/
GenericName[ka_GE]= /
Comment[ka_GE]= , /
GenericName[kmr_TR]=Nermalava weşandin/tomarkirin-ê
Comment[kmr_TR]=Nermalava weşandin/tomarkirin-ê belaş û çavkaniya azad
GenericName[ko_KR]=
Comment[ko_KR]=
GenericName[ms_MY]=Perisian Penstriman/Rakaman
Comment[ms_MY]=Perisian Penstriman/Rakaman Bersumber Terbuka dan Bebas
GenericName[nb_NO]=Strømming- og Opptaksprogramvare
Comment[nb_NO]=Gratis Strømming- og Opptaksprogramvare med Åpen Kildekode
GenericName[nl_NL]=Streaming/Opname Software
Comment[nl_NL]=Vrij en Open Source Streaming/Opname Sofware
GenericName[pl_PL]=Oprogramowanie do transmisji strumieniowej/nagrywania
Comment[pl_PL]=Darmowe i otwarte oprogramowanie do transmisji strumieniowej/nagrywania
GenericName[pt_BR]=Software de Streaming/Gravação
Comment[pt_BR]=Software de Streaming/Gravação de Código Aberto e Livre
GenericName[pt_PT]=Programa de transmissão/gravação
Comment[pt_PT]=Programa de transmissão/gravação livre e de código aberto
GenericName[ro_RO]=Program de Streaming/Înregistrare
Comment[ro_RO]=Program de streaming / înregistrare gratuit și open source
GenericName[ru_RU]=Программа для видеостриминга и видеозаписи
Comment[ru_RU]=Свободное и открытое ПО для видеостриминга и видеозаписи
GenericName[sk_SK]=Streamovací/Nahrávací Software
Comment[sk_SK]=Bezplatný a otvorený streamovací/nahrávací software
GenericName[sl_SI]=Pretočna/snemalna programska oprema
Comment[sl_SI]=Brezplačni in odprtokodna programska oprema za pretakanje/snemanje
GenericName[sv_SE]=Programvara för strömning/inspelning
Comment[sv_SE]=Fri programvara för strömning/inspelning med öppen källkod
GenericName[tr_TR]=Yayın/Kayıt Yazılımı
Comment[tr_TR]=Ücretsiz ve Açık Kaynaklı Yayın/Kayıt Yazılımı
GenericName[uk_UA]=Програма для трансляцій/запису
Comment[uk_UA]=Вільне та відкрите програмне забезпечення для трансляцій/запису
GenericName[vi_VN]=Phn mm ghi hình/phát lung
Comment[vi_VN]=Phn mm ghi hình / phát lung m và min phí
GenericName[zh_CN]=/
Comment[zh_CN]=
GenericName[zh_TW]=
Comment[zh_TW]=

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

View file

@ -0,0 +1,92 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 26.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 993 993" style="enable-background:new 0 0 993 993;" xml:space="preserve">
<style type="text/css">
.st0{fill:url(#SVGID_1_);}
.st1{fill:url(#SVGID_00000062171159965967627490000013605884846004172698_);}
.st2{fill:url(#SVGID-2_00000085966066984138215510000013018799571900533434_);}
.st3{clip-path:url(#SVGID_00000023257072852279316340000004281102206337855156_);}
.st4{fill:url(#SVGID_00000177446033621631838710000001370584907163434138_);}
.st5{clip-path:url(#SVGID_00000136385553608229244970000014654043435100792964_);}
.st6{fill:url(#SVGID_00000126306410582640054500000000964390405037519506_);}
.st7{fill:url(#SVGID_00000109020757643166282930000006684795936706346369_);}
</style>
<radialGradient id="SVGID_1_" cx="514.5" cy="477.5" r="496.5" gradientTransform="matrix(1 0 0 -1 -18 974)" gradientUnits="userSpaceOnUse">
<stop offset="0.9134" style="stop-color:#000000"/>
<stop offset="1" style="stop-color:#000000;stop-opacity:0"/>
</radialGradient>
<path class="st0" d="M496.5,0C770.7,0,993,222.3,993,496.5S770.7,993,496.5,993S0,770.7,0,496.5S222.3,0,496.5,0"/>
<radialGradient id="SVGID_00000163033830155146975860000008434547654242457221_" cx="512.0591" cy="481.8788" r="486.2727" gradientTransform="matrix(1 0 0 -1 -18 974)" gradientUnits="userSpaceOnUse">
<stop offset="0.99" style="stop-color:#FFFFFF"/>
<stop offset="0.9951" style="stop-color:#FDFDFD"/>
<stop offset="0.9969" style="stop-color:#F6F6F6"/>
<stop offset="0.9982" style="stop-color:#EBEBEB"/>
<stop offset="0.9992" style="stop-color:#DADADA"/>
<stop offset="1" style="stop-color:#C7C7C7"/>
</radialGradient>
<path style="fill:url(#SVGID_00000163033830155146975860000008434547654242457221_);" d="M494.1,5.8
c268.6,0,486.3,217.7,486.3,486.3S762.6,978.4,494.1,978.4S7.8,760.7,7.8,492.1S225.5,5.8,494.1,5.8"/>
<radialGradient id="SVGID-2_00000052072577768947982130000002178866272689676469_" cx="512.0615" cy="481.8788" r="444.1224" gradientTransform="matrix(1 0 0 -1 -18 974)" gradientUnits="userSpaceOnUse">
<stop offset="0.99" style="stop-color:#000000;stop-opacity:0.5"/>
<stop offset="1" style="stop-color:#000000;stop-opacity:0"/>
</radialGradient>
<path id="SVGID-2" style="fill:url(#SVGID-2_00000052072577768947982130000002178866272689676469_);" d="M49.9,492.1
c0,245.3,198.8,444.1,444.1,444.1s444.1-198.8,444.1-444.1C938.2,246.8,739.3,48,494.1,48S49.9,246.8,49.9,492.1"/>
<g>
<defs>
<path id="SVGID_00000020370725417039028330000004494903873571563917_" d="M49.9,492.1c0,245.3,198.8,444.1,444.1,444.1
s444.1-198.8,444.1-444.1C938.2,246.8,739.3,48,494.1,48S49.9,246.8,49.9,492.1"/>
</defs>
<clipPath id="SVGID_00000089541126356498003530000018124973888634789552_">
<use xlink:href="#SVGID_00000020370725417039028330000004494903873571563917_" style="overflow:visible;"/>
</clipPath>
<g style="clip-path:url(#SVGID_00000089541126356498003530000018124973888634789552_);">
<radialGradient id="SVGID_00000150812931774303044310000016741052045410067889_" cx="494.0614" cy="501.8788" r="444.1224" gradientTransform="matrix(1 0 0 -1 0 994)" gradientUnits="userSpaceOnUse">
<stop offset="0.99" style="stop-color:#000000;stop-opacity:0.5"/>
<stop offset="1" style="stop-color:#000000;stop-opacity:0"/>
</radialGradient>
<rect x="49.9" y="48" style="fill:url(#SVGID_00000150812931774303044310000016741052045410067889_);" width="888.2" height="888.2"/>
</g>
</g>
<g>
<defs>
<path id="SVGID_00000018236686936268748280000002431340190722277274_" d="M53.6,492.1c0,243.3,197.2,440.5,440.5,440.5
s440.5-197.2,440.5-440.5c0-243.3-197.2-440.5-440.5-440.5S53.6,248.9,53.6,492.1"/>
</defs>
<clipPath id="SVGID_00000071558824708772608600000007232665395714776193_">
<use xlink:href="#SVGID_00000018236686936268748280000002431340190722277274_" style="overflow:visible;"/>
</clipPath>
<g style="clip-path:url(#SVGID_00000071558824708772608600000007232665395714776193_);">
<radialGradient id="SVGID_00000075157454629254526220000014209612016984828065_" cx="433.7207" cy="-472.889" r="4.6533" gradientTransform="matrix(94.6543 0 0 94.6543 -40559.457 45253.0898)" gradientUnits="userSpaceOnUse">
<stop offset="0" style="stop-color:#000000"/>
<stop offset="1" style="stop-color:#322F32"/>
</radialGradient>
<rect x="53.6" y="51.7" style="fill:url(#SVGID_00000075157454629254526220000014209612016984828065_);" width="880.9" height="880.9"/>
</g>
</g>
<radialGradient id="SVGID_00000092427181212153090570000016417065628950216588_" cx="578.8901" cy="482.3703" r="353.9427" gradientTransform="matrix(1 0 0 -1.0971 -18 982.5089)" gradientUnits="userSpaceOnUse">
<stop offset="0" style="stop-color:#C2C0C2"/>
<stop offset="1" style="stop-color:#EBEBEB"/>
</radialGradient>
<path style="fill:url(#SVGID_00000092427181212153090570000016417065628950216588_);" d="M666.9,350.5
c-54.8,95.4-176.6,128.4-272,73.6c-1.8-1-3.5-2.1-5.2-3.1c-16.7-10.3-31.9-23.1-44.9-37.8c-34.4-38.8-52.3-89.4-49.9-141.1
c0.3-5.8,0.8-11.6,1.5-17.3c0.7-5.7,1.7-11.3,3-16.9c1.3-5.7,2.8-11.4,4.5-17c1.7-5.4,3.7-10.8,5.9-16.1c2.3-5.5,4.8-10.9,7.5-16.1
c2.9-5.5,6.1-10.9,9.5-16.2c3.1-4.8,6.5-9.5,10-14.1c3.9-5,8-9.7,12.3-14.3c4.4-4.6,8.9-9,13.7-13.2c4.8-4.3,9.9-8.2,15.1-12
c2.7-1.9,5.4-3.8,8.2-5.6C268,143.7,219.6,287.3,277.1,406.9c0.5,1.1,1.1,2.3,1.7,3.4c0.3,0.5,0.5,1,0.8,1.5
c0.1,0.3,0.3,0.6,0.5,0.9c0.3,0.4,0.4,0.3,0.9,0.3c2.6,0,5.2,0,7.7,0c4.8,0.1,9.5,0.4,14.3,0.8c90.3,8.5,163.5,76.9,178.2,166.4
c3.2,19.9,3.4,40.2,0.6,60.2c-5.3,37.7-21.3,73-46.2,101.9c-14.2,16.5-31,30.6-49.8,41.8c-37.4,22.1-81,31.4-124.2,26.5
c-7.8-0.9-15.6-2.2-23.2-4c-5-1.2-9.9-2.5-14.7-4.1c21.8,9.7,44.9,16.1,68.5,19c22.1,2.7,44.4,2.5,66.4-0.8
c39.3-5.9,76.7-21.3,108.7-44.9c23.5-17.3,43.7-38.7,59.7-63.1c0.7-1.1,1.4-2.1,2.1-3.2c0.3-0.4,0.9-1.1,0.8-1.5
c-0.3-0.7-0.6-1.3-1.1-1.9c-1.3-2.5-2.6-5-3.8-7.6c-2.5-5.1-4.7-10.4-6.7-15.7c-4.1-10.8-7.2-22-9.3-33.4c-4.6-24.5-4.6-49.5,0-74
c3.9-20.8,11.1-40.8,21.4-59.3c34.8-63.2,101-102.6,173.1-103.1c4.9,0,9.8,0.1,14.7,0.4c4.7,0.3,9.4,0.8,14.1,1.4
c4.6,0.6,9.2,1.4,13.8,2.4c4.5,0.9,8.9,2,13.4,3.3c4.3,1.2,8.6,2.6,12.8,4.1c4.3,1.5,8.5,3.2,12.7,5.1c4.3,1.9,8.4,3.9,12.6,6
c4.1,2.2,8.1,4.5,12.1,6.9c3.7,2.3,7.4,4.7,10.9,7.3c3.7,2.6,7.2,5.4,10.7,8.2c3.6,2.9,7.1,6,10.5,9.2c3.6,3.4,7.1,6.9,10.4,10.6
c3.3,3.6,6.5,7.4,9.6,11.3c3.4,4.3,6.6,8.8,9.7,13.4c3.1,4.7,6,9.6,8.7,14.5c3.8,6.9,7.1,14.1,10.1,21.4c3.2,8,5.8,16.1,8,24.4
c-5.8-44.3-23.7-86.1-51.7-120.9c-20.6-25.6-46.1-46.9-75-62.5c-29.7-16-62.3-25.6-95.9-28.3C672.6,350.8,669.8,350.6,666.9,350.5z"
/>
</svg>

After

Width:  |  Height:  |  Size: 6.6 KiB

View file

@ -0,0 +1,68 @@
{
"images" : [
{
"filename" : "icon_16x16.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"filename" : "icon_16x16@2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"filename" : "icon_32x32.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"filename" : "icon_32x32@2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"filename" : "icon_128x128.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"filename" : "icon_128x128@2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"filename" : "icon_256x256.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"filename" : "icon_256x256@2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"filename" : "icon_512x512.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"filename" : "icon_512x512@2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

View file

@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

View file

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>OBS</string>
<key>CFBundleIconFile</key>
<string>AppIcon</string>
<key>CFBundleIdentifier</key>
<string>com.obsproject.obs-studio</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>OBS</string>
<key>CFBundleDisplayName</key>
<string>OBS Studio</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
<key>CFBundleVersion</key>
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>NSHighResolutionCapable</key>
<true/>
<key>LSMinimumSystemVersion</key>
<string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
<key>LSAppNapIsDisabled</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>OBS needs to access the camera to enable camera sources to work.</string>
<key>NSMicrophoneUsageDescription</key>
<string>OBS needs to access the microphone to enable audio input.</string>
<key>NSHumanReadableCopyright</key>
<string>(c) 2012-${CURRENT_YEAR} Hugh Bailey</string>
<key>SUFeedURL</key>
<string>${SPARKLE_APPCAST_URL}</string>
<key>SUPublicEDKey</key>
<string>${SPARKLE_PUBLIC_KEY}</string>
</dict>
</plist>

View file

@ -0,0 +1,36 @@
-----BEGIN PUBLIC KEY-----
MIIGPDCCBC4GByqGSM44BAEwggQhAoICAQCZZZ2y7H2GJmMfP4KQihJTJOoiGNUw
mue6sqMbH+utRykRnSKBZux6R665eRFMpNgrgFO1TLLGbdD2U31KiGtCvFJOmOl3
+QP055BuXjEG36NU7AWEFLAlbDlr/2D3oumq3Ib3iMnnr9RrVztJ2VFOvVio1eWr
ZxboVwKPK8D6BqsWiv15vbYlJnTC4Fls6ySmdjVBxwoPlTaMu1ysi5DfbIZ93s5u
aQt1FvXuWtPBWjyVUORcNbcWf49E5R2pV0OSBK95Hw2/wXz4vmj+w92dTePGnVaW
Me4CoF5PIeZILwp6DCLStX4eW2WG1NChJTC8zeQ/3bMMoGyKM/MadyvrDqMywsKY
caxkIwHrDKOEdXXGo80dIwZMMLipPA8DKhx5ojphfkeXjIhKSx+49knXT3ED5okE
Wai7tGUXj/8D8sGh+7b+AVsdujvr4v8WQaZiKUOZ2IIHOg3VLz9T9v0zet1Yt987
KNymFcp2CHeJ6KnDP/ZGQ6Nl0HsPxUgscsXV+R2FEc8Q1j0Ukkuxnopa0E4/huUu
gjyRzpXD734qFMDf7LcXca6qNjBor6gVj5sRyRKCpZ+KQfMUlr8jp506ztYSyeJu
dxJV30tQgztwkbrs02CqOt4Z3Peo6sdht7hWKSPVwmja3tq8/TfUSSoo6wKYN9/w
Mf3dVeRF8hCzJQIVAJnzuzmzQhCKPiQnl3jh5qGII2XfAoICAQCCVATAff89ceHj
ROHEbHTQFpVxJ/kRZPfxnU46DSw79Tih7tthV68oakPSOTP3cx/Tga0GwogarZ9N
F2VVan5w9OQSSewXsr5UDT5bnmJF+h+JB7TMy+sXZBYobUqjlUd5VtKc8RsN86P4
s7xbK0mA+hfe+27r18JT81/eH3xUfh7UOUGSdMN2Ch9f7RFSMZIgUAZUzu2K3ODp
hPgtc2QJ8QVAp7GLvQgw8ZUME/ChZslyBIyJvYgUIxfxlgRWYro5pQT7/ngkgdXo
wlghHKkldwMuY3zaFdhPnFNuEUEtc18ILsbz0+AnagCUd6n+3safskCRqLIHMOY6
iLBSZPX9hJQhVCqSqz1VNDDww8FNa/fojJ1Lr/TI0I+0Ib2pCiY2LChXUqGY5SLZ
2KNs5qFsyZP+I0L8YsGwqvUYyFwk7Ok224n0NtaOwqpLCrtXd/i6DaDNiaoJuwJC
1ELCfaZivorgkC5rhBt2H7qWUAR+EtrFE/gb0k/G5EIhjYql7onGbX+G2re38vQA
fg1pzguhig2dafP/BxMLZrn1Gg61xzmEYPuS9gclktaf675srv8GVb46VkOxXL+D
YvTmpJPP7UUOVlmAMCo4j4y09MW3jq9TDp42VTLeZVubyjslGnavlnq1O+ZyXUye
1FMeby65sIbSHHHwoFnRv3hLSEXI5gOCAgYAAoICAQCUkYnZkPfHfOJZI403xUYP
CE/bLpkza074Xo6EXElsWRnpQgNTx+JFOvItgj3v0OkIqDin9UredKOwfkiftslV
jxUVKA6I5kwnGvCpvTpQMLyLjq+VQr+J2D6eId6tV/iajhdu5r4JThU8KllT7Ywb
NAur34ftLNCVAMRUaDNeEoHfePgderW384e+lbvpmtifmBluammGSxxRtUsdjvJZ
BFkhaJu86CKxcU7D1lbPVOtV/jaxz6d16VdGcfBdi2LzXZzZtYpT9XGPX3NF+xii
spAURWsoe11LTRXF+eJhgCm5iIDN3kh1HEQKYKAVpmrcM0aFzk/NpS+tFyU72vaq
IRSSJw/aa1oELOAakG5oPldc4RcYWl32sbnVwXHO7TZvgTrBSC10o65MAC5CHP/s
b07heDYAIt7re7szvOYq+c/9zAMAlu3pcO8MqaXYMmybdHBXHQ2b+DdJWHmIUWcX
CbUzr09vzGkJAvqsXqbmJPr8aixrO75DhT0iDTILLWe/GWK51nf+Tg0pNxVgGyAl
BqvRqqo7SSDu9FMkwQesFFHhuoHLyEHwVPJ+sMQTNwQcm9c6YuW8EYDRSkeKLWYk
3fkjG+Pe9uVE8a1taDg3FjSY0UqjUT6XMw+i0Lajyus2L6wFBwrrGM6E4xa6x1CC
MGjmuSOlPA1umQsToIcO4g==
-----END PUBLIC KEY-----

View file

@ -0,0 +1,14 @@
<!--?xml version="1.0" encoding="UTF-8"?-->
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>

2
UI/cmake/macos/qt.conf Normal file
View file

@ -0,0 +1,2 @@
[Paths]
Plugins = PlugIns

View file

@ -0,0 +1,9 @@
target_sources(obs-studio PRIVATE platform-x11.cpp)
target_compile_definitions(obs-studio PRIVATE OBS_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")
target_link_libraries(obs-studio PRIVATE Qt::GuiPrivate procstat)
if(TARGET OBS::python)
find_package(Python REQUIRED COMPONENTS Interpreter Development)
target_link_libraries(obs-studio PRIVATE Python::Python)
target_link_options(obs-studio PRIVATE LINKER:-no-as-needed)
endif()

50
UI/cmake/os-linux.cmake Normal file
View file

@ -0,0 +1,50 @@
target_sources(obs-studio PRIVATE platform-x11.cpp)
target_compile_definitions(obs-studio PRIVATE OBS_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")
target_link_libraries(obs-studio PRIVATE Qt::GuiPrivate)
if(TARGET OBS::python)
find_package(Python REQUIRED COMPONENTS Interpreter Development)
target_link_libraries(obs-studio PRIVATE Python::Python)
target_link_options(obs-studio PRIVATE LINKER:-no-as-needed)
endif()
if(NOT DEFINED APPDATA_RELEASE_DATE)
if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
execute_process(
COMMAND git log --tags -1 --pretty=%cd --date=short
OUTPUT_VARIABLE APPDATA_RELEASE_DATE
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
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()
file(TIMESTAMP "${CMAKE_SOURCE_DIR}/CMakeLists.txt" APPDATA_RELEASE_DATE "%Y-%m-%d")
endif()
endif()
configure_file(cmake/linux/com.obsproject.Studio.appdata.xml.in com.obsproject.Studio.appdata.xml)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.obsproject.Studio.appdata.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)
install(
FILES cmake/linux/icons/obs-logo-256.png
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/256x256/apps"
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)
install(
FILES cmake/linux/icons/obs-logo-scalable.svg
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps"
RENAME com.obsproject.Studio.svg)

17
UI/cmake/os-macos.cmake Normal file
View file

@ -0,0 +1,17 @@
if(NOT XCODE)
target_add_resource(obs-studio "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/Assets.xcassets")
endif()
find_library(APPKIT Appkit)
find_library(AVFOUNDATION AVFoundation)
find_library(APPLICATIONSERVICES ApplicationServices)
mark_as_advanced(APPKIT AVFOUNDATION APPLICATIONSERVICES)
target_sources(obs-studio PRIVATE platform-osx.mm forms/OBSPermissions.ui window-permissions.cpp window-permissions.hpp)
set_source_files_properties(platform-osx.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
target_link_libraries(obs-studio PRIVATE ${APPKIT} ${AVFOUNDATION} ${APPLICATIONSERVICES})
target_compile_options(obs-studio PRIVATE -Wno-error=float-conversion -Wno-error=implicit-int-conversion
-Wno-error=shorten-64-to-32)

55
UI/cmake/os-windows.cmake Normal file
View file

@ -0,0 +1,55 @@
if(NOT TARGET OBS::blake2)
add_subdirectory("${CMAKE_SOURCE_DIR}/deps/blake2" "${CMAKE_BINARY_DIR}/deps/blake2")
endif()
if(NOT TARGET OBS::w32-pthreads)
add_subdirectory("${CMAKE_SOURCE_DIR}/deps/w32-pthreads" "${CMAKE_BINARY_DIR}/deps/w32-pthreads")
endif()
find_package(MbedTLS)
find_package(Detours REQUIRED)
configure_file(cmake/windows/obs.rc.in obs.rc)
target_sources(
obs-studio
PRIVATE obs.rc
platform-windows.cpp
win-dll-blocklist.c
cmake/windows/obs.manifest
update/crypto-helpers-mbedtls.cpp
update/crypto-helpers.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)
target_link_libraries(obs-studio PRIVATE crypt32 OBS::blake2 OBS::w32-pthreads MbedTLS::MbedTLS Detours::Detours)
target_compile_options(obs-studio PRIVATE PSAPI_VERSION=2)
target_link_options(obs-studio PRIVATE /IGNORE:4098 /IGNORE:4099)
add_library(obs-update-helpers INTERFACE EXCLUDE_FROM_ALL)
add_library(OBS::update-helpers ALIAS obs-update-helpers)
target_sources(obs-update-helpers INTERFACE win-update/win-update-helpers.cpp win-update/win-update-helpers.hpp)
target_include_directories(obs-update-helpers INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/win-update")
add_subdirectory(win-update/updater)
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>/$<$<BOOL:${OBS_WINDOWS_LEGACY_DIRS}>:bin/>$<TARGET_FILE_NAME:obs-studio>"
VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/rundir/$<CONFIG>$<$<BOOL:${OBS_WINDOWS_LEGACY_DIRS}>:/bin>")

View file

@ -0,0 +1,68 @@
target_sources(
obs-studio
PRIVATE adv-audio-control.cpp
adv-audio-control.hpp
audio-encoders.cpp
audio-encoders.hpp
balance-slider.hpp
clickable-label.hpp
double-slider.cpp
double-slider.hpp
horizontal-scroll-area.cpp
horizontal-scroll-area.hpp
item-widget-helpers.cpp
item-widget-helpers.hpp
context-bar-controls.cpp
context-bar-controls.hpp
expand-checkbox.hpp
focus-list.cpp
focus-list.hpp
hotkey-edit.cpp
hotkey-edit.hpp
lineedit-autoresize.cpp
lineedit-autoresize.hpp
locked-checkbox.cpp
locked-checkbox.hpp
log-viewer.cpp
log-viewer.hpp
media-controls.cpp
media-controls.hpp
media-slider.cpp
media-slider.hpp
menu-button.cpp
menu-button.hpp
mute-checkbox.hpp
plain-text-edit.cpp
plain-text-edit.hpp
properties-view.cpp
properties-view.hpp
properties-view.moc.hpp
record-button.cpp
record-button.hpp
remote-text.cpp
remote-text.hpp
scene-tree.cpp
scene-tree.hpp
screenshot-obj.hpp
slider-absoluteset-style.cpp
slider-absoluteset-style.hpp
slider-ignorewheel.cpp
slider-ignorewheel.hpp
source-label.cpp
source-label.hpp
spinbox-ignorewheel.cpp
spinbox-ignorewheel.hpp
source-tree.cpp
source-tree.hpp
url-push-button.cpp
url-push-button.hpp
undo-stack-obs.cpp
undo-stack-obs.hpp
volume-control.cpp
volume-control.hpp
vertical-scroll-area.cpp
vertical-scroll-area.hpp
visibility-checkbox.cpp
visibility-checkbox.hpp
visibility-item-widget.cpp
visibility-item-widget.hpp)

56
UI/cmake/ui-qt.cmake Normal file
View file

@ -0,0 +1,56 @@
find_qt(COMPONENTS Widgets Network Svg Xml COMPONENTS_LINUX Gui)
target_link_libraries(obs-studio PRIVATE Qt::Widgets Qt::Svg Qt::Xml Qt::Network)
set_target_properties(
obs-studio
PROPERTIES AUTOMOC ON
AUTOUIC ON
AUTORCC ON)
set_property(
TARGET obs-studio
APPEND
PROPERTY AUTOUIC_SEARCH_PATHS forms forms/source-toolbar)
set(_qt_sources
forms/obs.qrc
forms/AutoConfigFinishPage.ui
forms/AutoConfigStartPage.ui
forms/AutoConfigStartPage.ui
forms/AutoConfigStreamPage.ui
forms/AutoConfigTestPage.ui
forms/AutoConfigVideoPage.ui
forms/ColorSelect.ui
forms/OBSAbout.ui
forms/OBSAdvAudio.ui
forms/OBSBasic.ui
forms/OBSBasicFilters.ui
forms/OBSBasicInteraction.ui
forms/OBSBasicSettings.ui
forms/OBSBasicSourceSelect.ui
forms/OBSBasicTransform.ui
forms/OBSBasicVCamConfig.ui
forms/OBSExtraBrowsers.ui
forms/OBSImporter.ui
forms/OBSLogReply.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})
unset(_qt_sources)

58
UI/cmake/ui-windows.cmake Normal file
View file

@ -0,0 +1,58 @@
target_sources(
obs-studio
PRIVATE window-basic-about.cpp
window-basic-about.hpp
window-basic-adv-audio.cpp
window-basic-adv-audio.hpp
window-basic-auto-config.cpp
window-basic-auto-config.hpp
window-basic-auto-config-test.cpp
window-basic-filters.cpp
window-basic-filters.hpp
window-basic-interaction.cpp
window-basic-interaction.hpp
window-basic-main.cpp
window-basic-main.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-preview.cpp
window-basic-properties.cpp
window-basic-properties.hpp
window-basic-settings.cpp
window-basic-settings.hpp
window-basic-settings-a11y.cpp
window-basic-settings-stream.cpp
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-preview.hpp
window-basic-vcam.hpp
window-basic-vcam-config.cpp
window-basic-vcam-config.hpp
window-dock.cpp
window-dock.hpp
window-importer.cpp
window-importer.hpp
window-main.hpp
window-missing-files.cpp
window-missing-files.hpp
window-namedialog.cpp
window-namedialog.hpp
window-log-reply.cpp
window-log-reply.hpp
window-projector.cpp
window-projector.hpp
window-remux.cpp
window-remux.hpp)

View file

@ -1,4 +1,4 @@
add_subdirectory(aja-output-ui)
add_subdirectory(decklink-captions)
add_subdirectory(decklink-output-ui)
add_subdirectory(frontend-tools)
add_subdirectory(decklink-captions)
add_subdirectory(aja-output-ui)

View file

@ -1,109 +1,89 @@
project(aja-output-ui)
cmake_minimum_required(VERSION 3.16...3.25)
legacy_check()
if(NOT ENABLE_AJA)
target_disable(aja-output-ui)
return()
endif()
find_package(LibAJANTV2 REQUIRED)
find_qt(COMPONENTS Widgets COMPONENTS_LINUX Gui)
add_library(aja-output-ui MODULE)
add_library(OBS::aja-output-ui ALIAS aja-output-ui)
find_qt(COMPONENTS Widgets COMPONENTS_LINUX Gui)
set_target_properties(
aja-output-ui
PROPERTIES AUTOMOC ON
AUTOUIC ON
AUTORCC ON
AUTOUIC_SEARCH_PATHS "forms")
if(_QT_VERSION EQUAL 6 AND OS_WINDOWS)
set_target_properties(aja-output-ui PROPERTIES AUTORCC_OPTIONS
"--format-version;1")
endif()
target_sources(aja-output-ui PRIVATE forms/output.ui)
target_sources(
aja-output-ui
PRIVATE AJAOutputUI.h
AJAOutputUI.cpp
aja-ui-main.cpp
aja-ui-main.h
${CMAKE_SOURCE_DIR}/plugins/aja/aja-card-manager.cpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-card-manager.hpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-common.cpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-common.hpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-enums.hpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-presets.cpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-presets.hpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-props.cpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-props.hpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-routing.cpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-routing.hpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-ui-props.hpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-vpid-data.cpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-vpid-data.hpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-widget-io.cpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-widget-io.hpp
${CMAKE_SOURCE_DIR}/UI/double-slider.cpp
${CMAKE_SOURCE_DIR}/UI/double-slider.hpp
${CMAKE_SOURCE_DIR}/UI/plain-text-edit.hpp
${CMAKE_SOURCE_DIR}/UI/plain-text-edit.cpp
${CMAKE_SOURCE_DIR}/UI/properties-view.hpp
${CMAKE_SOURCE_DIR}/UI/properties-view.cpp
${CMAKE_SOURCE_DIR}/UI/properties-view.moc.hpp
${CMAKE_SOURCE_DIR}/UI/qt-wrappers.cpp
${CMAKE_SOURCE_DIR}/UI/qt-wrappers.hpp
${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.cpp
${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.hpp
${CMAKE_SOURCE_DIR}/UI/slider-ignorewheel.cpp
${CMAKE_SOURCE_DIR}/UI/slider-ignorewheel.hpp
${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.cpp
${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.hpp)
"${CMAKE_SOURCE_DIR}/plugins/aja/aja-card-manager.cpp"
"${CMAKE_SOURCE_DIR}/plugins/aja/aja-card-manager.hpp"
"${CMAKE_SOURCE_DIR}/plugins/aja/aja-common.cpp"
"${CMAKE_SOURCE_DIR}/plugins/aja/aja-common.hpp"
"${CMAKE_SOURCE_DIR}/plugins/aja/aja-enums.hpp"
"${CMAKE_SOURCE_DIR}/plugins/aja/aja-presets.cpp"
"${CMAKE_SOURCE_DIR}/plugins/aja/aja-presets.hpp"
"${CMAKE_SOURCE_DIR}/plugins/aja/aja-props.cpp"
"${CMAKE_SOURCE_DIR}/plugins/aja/aja-props.hpp"
"${CMAKE_SOURCE_DIR}/plugins/aja/aja-routing.cpp"
"${CMAKE_SOURCE_DIR}/plugins/aja/aja-routing.hpp"
"${CMAKE_SOURCE_DIR}/plugins/aja/aja-ui-props.hpp"
"${CMAKE_SOURCE_DIR}/plugins/aja/aja-vpid-data.cpp"
"${CMAKE_SOURCE_DIR}/plugins/aja/aja-vpid-data.hpp"
"${CMAKE_SOURCE_DIR}/plugins/aja/aja-widget-io.cpp"
"${CMAKE_SOURCE_DIR}/plugins/aja/aja-widget-io.hpp"
"${CMAKE_SOURCE_DIR}/UI/double-slider.cpp"
"${CMAKE_SOURCE_DIR}/UI/double-slider.hpp"
"${CMAKE_SOURCE_DIR}/UI/plain-text-edit.hpp"
"${CMAKE_SOURCE_DIR}/UI/plain-text-edit.cpp"
"${CMAKE_SOURCE_DIR}/UI/properties-view.hpp"
"${CMAKE_SOURCE_DIR}/UI/properties-view.cpp"
"${CMAKE_SOURCE_DIR}/UI/properties-view.moc.hpp"
"${CMAKE_SOURCE_DIR}/UI/qt-wrappers.cpp"
"${CMAKE_SOURCE_DIR}/UI/qt-wrappers.hpp"
"${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.cpp"
"${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.hpp"
"${CMAKE_SOURCE_DIR}/UI/slider-ignorewheel.cpp"
"${CMAKE_SOURCE_DIR}/UI/slider-ignorewheel.hpp"
"${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.cpp"
"${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.hpp")
target_link_libraries(aja-output-ui PRIVATE OBS::libobs OBS::frontend-api
Qt::Widgets AJA::LibAJANTV2)
target_sources(aja-output-ui PRIVATE forms/output.ui)
if(OS_MACOS)
target_link_libraries(aja-output-ui PRIVATE OBS::libobs OBS::frontend-api Qt::Widgets AJA::LibAJANTV2)
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)
target_compile_options(aja-output-ui PRIVATE /wd4996)
target_link_libraries(aja-output-ui PRIVATE ws2_32.lib setupapi.lib Winmm.lib netapi32.lib Shlwapi.lib)
target_link_options(aja-output-ui PRIVATE /IGNORE:4099)
set_property(
TARGET aja-output-ui
APPEND
PROPERTY AUTORCC_OPTIONS --format-version 1)
elseif(OS_MACOS)
find_library(IOKIT_FRAMEWORK Iokit)
find_library(COREFOUNDATION_LIBRARY CoreFoundation)
find_library(APPKIT_FRAMEWORK AppKit)
target_link_libraries(aja-output-ui PRIVATE ${IOKIT} ${COREFOUNDATION}
${APPKIT})
elseif(OS_WINDOWS)
set(MODULE_DESCRIPTION "OBS AJA Output UI")
configure_file(${CMAKE_SOURCE_DIR}/cmake/bundle/windows/obs-module.rc.in
aja-output-ui.rc)
target_sources(aja-output-ui PRIVATE aja-output-ui.rc)
target_compile_options(aja-output-ui PRIVATE /wd4996)
target_link_libraries(aja-output-ui PRIVATE ws2_32.lib setupapi.lib Winmm.lib
netapi32.lib Shlwapi.lib)
target_link_options(aja-output-ui PRIVATE "LINKER:/IGNORE:4099")
else()
target_link_libraries(aja-output-ui PRIVATE ${IOKIT} ${COREFOUNDATION} ${APPKIT})
target_compile_options(aja-output-ui PRIVATE -Wno-error=deprecated-declarations)
elseif(OS_LINUX OR OS_FREEBSD)
find_package(X11 REQUIRED)
target_link_libraries(aja-output-ui PRIVATE X11::X11 Qt::GuiPrivate)
endif()
if(NOT MSVC)
target_compile_options(aja-output-ui
PRIVATE -Wno-error=deprecated-declarations)
endif()
set_target_properties(aja-output-ui PROPERTIES FOLDER "frontend" PREFIX "")
get_target_property(_SOURCES aja-output-ui SOURCES)
set(_UI ${_SOURCES})
list(FILTER _UI INCLUDE REGEX ".*\\.ui?")
source_group(
TREE "${CMAKE_CURRENT_SOURCE_DIR}/forms"
PREFIX "UI Files"
FILES ${_UI})
unset(_SOURCES)
unset(_UI)
setup_plugin_target(aja-output-ui)
set_target_properties_obs(
aja-output-ui
PROPERTIES FOLDER frontend
PREFIX ""
AUTOMOC ON
AUTOUIC ON
AUTORCC ON
AUTOUIC_SEARCH_PATHS forms)

View file

@ -0,0 +1,103 @@
project(aja-output-ui)
if(NOT ENABLE_AJA)
return()
endif()
find_package(LibAJANTV2 REQUIRED)
add_library(aja-output-ui MODULE)
add_library(OBS::aja-output-ui ALIAS aja-output-ui)
find_qt(COMPONENTS Widgets COMPONENTS_LINUX Gui)
set_target_properties(
aja-output-ui
PROPERTIES AUTOMOC ON
AUTOUIC ON
AUTORCC ON
AUTOUIC_SEARCH_PATHS "forms")
if(_QT_VERSION EQUAL 6 AND OS_WINDOWS)
set_target_properties(aja-output-ui PROPERTIES AUTORCC_OPTIONS "--format-version;1")
endif()
target_sources(aja-output-ui PRIVATE forms/output.ui)
target_sources(
aja-output-ui
PRIVATE AJAOutputUI.h
AJAOutputUI.cpp
aja-ui-main.cpp
aja-ui-main.h
${CMAKE_SOURCE_DIR}/plugins/aja/aja-card-manager.cpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-card-manager.hpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-common.cpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-common.hpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-enums.hpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-presets.cpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-presets.hpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-props.cpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-props.hpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-routing.cpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-routing.hpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-ui-props.hpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-vpid-data.cpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-vpid-data.hpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-widget-io.cpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-widget-io.hpp
${CMAKE_SOURCE_DIR}/UI/double-slider.cpp
${CMAKE_SOURCE_DIR}/UI/double-slider.hpp
${CMAKE_SOURCE_DIR}/UI/plain-text-edit.hpp
${CMAKE_SOURCE_DIR}/UI/plain-text-edit.cpp
${CMAKE_SOURCE_DIR}/UI/properties-view.hpp
${CMAKE_SOURCE_DIR}/UI/properties-view.cpp
${CMAKE_SOURCE_DIR}/UI/properties-view.moc.hpp
${CMAKE_SOURCE_DIR}/UI/qt-wrappers.cpp
${CMAKE_SOURCE_DIR}/UI/qt-wrappers.hpp
${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.cpp
${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.hpp
${CMAKE_SOURCE_DIR}/UI/slider-ignorewheel.cpp
${CMAKE_SOURCE_DIR}/UI/slider-ignorewheel.hpp
${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.cpp
${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.hpp)
target_link_libraries(aja-output-ui PRIVATE OBS::libobs OBS::frontend-api Qt::Widgets AJA::LibAJANTV2)
if(OS_MACOS)
find_library(IOKIT_FRAMEWORK Iokit)
find_library(COREFOUNDATION_LIBRARY CoreFoundation)
find_library(APPKIT_FRAMEWORK AppKit)
target_link_libraries(aja-output-ui PRIVATE ${IOKIT} ${COREFOUNDATION} ${APPKIT})
elseif(OS_WINDOWS)
set(MODULE_DESCRIPTION "OBS AJA Output UI")
configure_file(${CMAKE_SOURCE_DIR}/cmake/bundle/windows/obs-module.rc.in aja-output-ui.rc)
target_sources(aja-output-ui PRIVATE aja-output-ui.rc)
target_compile_options(aja-output-ui PRIVATE /wd4996)
target_link_libraries(aja-output-ui PRIVATE ws2_32.lib setupapi.lib Winmm.lib netapi32.lib Shlwapi.lib)
target_link_options(aja-output-ui PRIVATE "LINKER:/IGNORE:4099")
else()
find_package(X11 REQUIRED)
target_link_libraries(aja-output-ui PRIVATE X11::X11 Qt::GuiPrivate)
endif()
if(NOT MSVC)
target_compile_options(aja-output-ui PRIVATE -Wno-error=deprecated-declarations)
endif()
set_target_properties(aja-output-ui PROPERTIES FOLDER "frontend" PREFIX "")
get_target_property(_SOURCES aja-output-ui SOURCES)
set(_UI ${_SOURCES})
list(FILTER _UI INCLUDE REGEX ".*\\.ui?")
source_group(
TREE "${CMAKE_CURRENT_SOURCE_DIR}/forms"
PREFIX "UI Files"
FILES ${_UI})
unset(_SOURCES)
unset(_UI)
setup_plugin_target(aja-output-ui)

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>aja-output-ui</string>
<key>CFBundleIdentifier</key>
<string>com.obsproject.aja-output-ui</string>
<key>CFBundleVersion</key>
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
<key>CFBundleShortVersionString</key>
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleExecutable</key>
<string>aja-output-ui</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>LSMinimumSystemVersion</key>
<string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key>
<string>(c) 2012-${CURRENT_YEAR} Hugh Bailey</string>
</dict>
</plist>

View file

@ -0,0 +1,24 @@
1 VERSIONINFO
FILEVERSION ${OBS_VERSION_MAJOR},${OBS_VERSION_MINOR},${OBS_VERSION_PATCH},0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "${OBS_COMPANY_NAME}"
VALUE "FileDescription", "OBS AJA Output UI"
VALUE "FileVersion", "${OBS_VERSION_CANONICAL}"
VALUE "ProductName", "${OBS_PRODUCT_NAME}"
VALUE "ProductVersion", "${OBS_VERSION_CANONICAL}"
VALUE "Comments", "${OBS_COMMENTS}"
VALUE "LegalCopyright", "${OBS_LEGAL_COPYRIGHT}"
VALUE "InternalName", "aja-output-ui"
VALUE "OriginalFilename", "aja-output-ui"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 0x04B0
END
END

View file

@ -1,66 +1,43 @@
project(decklink-captions)
cmake_minimum_required(VERSION 3.16...3.25)
legacy_check()
if(NOT ENABLE_DECKLINK)
target_disable(decklink-captions)
return()
endif()
find_qt(COMPONENTS Widgets)
add_library(decklink-captions MODULE)
add_library(OBS::decklink-captions ALIAS decklink-captions)
find_qt(COMPONENTS Widgets)
target_sources(decklink-captions PRIVATE decklink-captions.cpp decklink-captions.h forms/captions.ui)
target_link_libraries(decklink-captions PRIVATE OBS::frontend-api OBS::libobs Qt::Widgets)
target_link_libraries(decklink-captions PRIVATE Qt::Widgets)
if(OS_WINDOWS)
configure_file(cmake/windows/obs-module.rc.in decklink-captions.rc)
target_sources(decklink-captions PRIVATE decklink-captions.rc)
set_target_properties(
decklink-captions
PROPERTIES AUTOMOC ON
AUTOUIC ON
AUTORCC ON
AUTOUIC_SEARCH_PATHS "forms")
if(_QT_VERSION EQUAL 6 AND OS_WINDOWS)
set_target_properties(decklink-captions PROPERTIES AUTORCC_OPTIONS
"--format-version;1")
endif()
target_compile_features(decklink-captions PRIVATE cxx_std_17)
target_sources(decklink-captions PRIVATE forms/captions.ui)
target_sources(decklink-captions PRIVATE decklink-captions.cpp
decklink-captions.h)
target_link_libraries(decklink-captions PRIVATE OBS::frontend-api OBS::libobs)
if(OS_MACOS)
set_property(
TARGET decklink-captions
APPEND
PROPERTY AUTORCC_OPTIONS --format-version 1)
elseif(OS_MACOS)
find_library(COCOA Cocoa)
mark_as_advanced(COCOA)
target_link_libraries(decklink-captions PRIVATE ${COCOA})
elseif(OS_POSIX)
elseif(OS_LINUX OR OS_FREEBSD)
find_package(X11 REQUIRED)
mark_as_advanced(X11)
target_link_libraries(decklink-captions PRIVATE X11::X11)
elseif(OS_WINDOWS)
set(MODULE_DESCRIPTION "OBS DeckLink Captions module")
configure_file(${CMAKE_SOURCE_DIR}/cmake/bundle/windows/obs-module.rc.in
decklink-captions.rc)
target_sources(decklink-captions PRIVATE decklink-captions.rc)
endif()
set_target_properties(decklink-captions PROPERTIES FOLDER "plugins/decklink"
PREFIX "")
get_target_property(_SOURCES decklink-captions SOURCES)
set(_UI ${_SOURCES})
list(FILTER _UI INCLUDE REGEX ".*\\.ui?")
source_group(
TREE "${CMAKE_CURRENT_SOURCE_DIR}/forms"
PREFIX "UI Files"
FILES ${_UI})
unset(_SOURCES)
unset(_UI)
setup_plugin_target(decklink-captions)
set_target_properties_obs(
decklink-captions
PROPERTIES FOLDER plugins/decklink
PREFIX ""
AUTOMOC ON
AUTOUIC ON
AUTORCC ON
AUTOUIC_SEARCH_PATHS forms)

View file

@ -0,0 +1,62 @@
project(decklink-captions)
if(NOT ENABLE_DECKLINK)
return()
endif()
add_library(decklink-captions MODULE)
add_library(OBS::decklink-captions ALIAS decklink-captions)
find_qt(COMPONENTS Widgets)
target_link_libraries(decklink-captions PRIVATE Qt::Widgets)
set_target_properties(
decklink-captions
PROPERTIES AUTOMOC ON
AUTOUIC ON
AUTORCC ON
AUTOUIC_SEARCH_PATHS "forms")
if(_QT_VERSION EQUAL 6 AND OS_WINDOWS)
set_target_properties(decklink-captions PROPERTIES AUTORCC_OPTIONS "--format-version;1")
endif()
target_compile_features(decklink-captions PRIVATE cxx_std_17)
target_sources(decklink-captions PRIVATE forms/captions.ui)
target_sources(decklink-captions PRIVATE decklink-captions.cpp decklink-captions.h)
target_link_libraries(decklink-captions PRIVATE OBS::frontend-api OBS::libobs)
if(OS_MACOS)
find_library(COCOA Cocoa)
mark_as_advanced(COCOA)
target_link_libraries(decklink-captions PRIVATE ${COCOA})
elseif(OS_POSIX)
find_package(X11 REQUIRED)
mark_as_advanced(X11)
target_link_libraries(decklink-captions PRIVATE X11::X11)
elseif(OS_WINDOWS)
set(MODULE_DESCRIPTION "OBS DeckLink Captions module")
configure_file(${CMAKE_SOURCE_DIR}/cmake/bundle/windows/obs-module.rc.in decklink-captions.rc)
target_sources(decklink-captions PRIVATE decklink-captions.rc)
endif()
set_target_properties(decklink-captions PROPERTIES FOLDER "plugins/decklink" PREFIX "")
get_target_property(_SOURCES decklink-captions SOURCES)
set(_UI ${_SOURCES})
list(FILTER _UI INCLUDE REGEX ".*\\.ui?")
source_group(
TREE "${CMAKE_CURRENT_SOURCE_DIR}/forms"
PREFIX "UI Files"
FILES ${_UI})
unset(_SOURCES)
unset(_UI)
setup_plugin_target(decklink-captions)

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>decklink-captions</string>
<key>CFBundleIdentifier</key>
<string>com.obsproject.decklink-captions</string>
<key>CFBundleVersion</key>
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
<key>CFBundleShortVersionString</key>
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleExecutable</key>
<string>decklink-captions</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>LSMinimumSystemVersion</key>
<string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key>
<string>(c) 2012-${CURRENT_YEAR} Hugh Bailey</string>
</dict>
</plist>

View file

@ -0,0 +1,24 @@
1 VERSIONINFO
FILEVERSION ${OBS_VERSION_MAJOR},${OBS_VERSION_MINOR},${OBS_VERSION_PATCH},0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "${OBS_COMPANY_NAME}"
VALUE "FileDescription", "OBS DeckLink Captions module"
VALUE "FileVersion", "${OBS_VERSION_CANONICAL}"
VALUE "ProductName", "${OBS_PRODUCT_NAME}"
VALUE "ProductVersion", "${OBS_VERSION_CANONICAL}"
VALUE "Comments", "${OBS_COMMENTS}"
VALUE "LegalCopyright", "${OBS_LEGAL_COPYRIGHT}"
VALUE "InternalName", "decklink-captions"
VALUE "OriginalFilename", "decklink-captions"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 0x04B0
END
END

View file

@ -1,25 +1,16 @@
project(decklink-output-ui)
cmake_minimum_required(VERSION 3.16...3.25)
legacy_check()
if(NOT ENABLE_DECKLINK)
target_disable(decklink-output-ui)
return()
endif()
add_library(decklink-output-ui MODULE)
add_library(OBS::decklink-output-ui ALIAS decklink-output-ui)
find_qt(COMPONENTS Widgets COMPONENTS_LINUX Gui)
set_target_properties(
decklink-output-ui
PROPERTIES AUTOMOC ON
AUTOUIC ON
AUTORCC ON
AUTOUIC_SEARCH_PATHS "forms")
if(_QT_VERSION EQUAL 6 AND OS_WINDOWS)
set_target_properties(decklink-output-ui PROPERTIES AUTORCC_OPTIONS
"--format-version;1")
endif()
add_library(decklink-output-ui MODULE)
add_library(OBS::decklink-output-ui ALIAS decklink-output-ui)
target_sources(decklink-output-ui PRIVATE forms/output.ui)
@ -29,56 +20,47 @@ target_sources(
DecklinkOutputUI.h
decklink-ui-main.cpp
decklink-ui-main.h
${CMAKE_SOURCE_DIR}/UI/double-slider.cpp
${CMAKE_SOURCE_DIR}/UI/double-slider.hpp
${CMAKE_SOURCE_DIR}/UI/plain-text-edit.hpp
${CMAKE_SOURCE_DIR}/UI/plain-text-edit.cpp
${CMAKE_SOURCE_DIR}/UI/properties-view.hpp
${CMAKE_SOURCE_DIR}/UI/properties-view.cpp
${CMAKE_SOURCE_DIR}/UI/properties-view.moc.hpp
${CMAKE_SOURCE_DIR}/UI/qt-wrappers.hpp
${CMAKE_SOURCE_DIR}/UI/qt-wrappers.cpp
${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.cpp
${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.hpp
${CMAKE_SOURCE_DIR}/UI/slider-ignorewheel.cpp
${CMAKE_SOURCE_DIR}/UI/slider-ignorewheel.hpp
${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.hpp
${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.cpp)
"${CMAKE_SOURCE_DIR}/UI/double-slider.cpp"
"${CMAKE_SOURCE_DIR}/UI/double-slider.hpp"
"${CMAKE_SOURCE_DIR}/UI/plain-text-edit.hpp"
"${CMAKE_SOURCE_DIR}/UI/plain-text-edit.cpp"
"${CMAKE_SOURCE_DIR}/UI/properties-view.hpp"
"${CMAKE_SOURCE_DIR}/UI/properties-view.cpp"
"${CMAKE_SOURCE_DIR}/UI/properties-view.moc.hpp"
"${CMAKE_SOURCE_DIR}/UI/qt-wrappers.hpp"
"${CMAKE_SOURCE_DIR}/UI/qt-wrappers.cpp"
"${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.cpp"
"${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.hpp"
"${CMAKE_SOURCE_DIR}/UI/slider-ignorewheel.cpp"
"${CMAKE_SOURCE_DIR}/UI/slider-ignorewheel.hpp"
"${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.hpp"
"${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.cpp")
target_link_libraries(decklink-output-ui PRIVATE OBS::libobs OBS::frontend-api
Qt::Widgets)
target_compile_features(decklink-output-ui PRIVATE cxx_std_17)
set_target_properties(decklink-output-ui PROPERTIES FOLDER "frontend" PREFIX "")
target_link_libraries(decklink-output-ui PRIVATE OBS::libobs OBS::frontend-api Qt::Widgets)
if(OS_WINDOWS)
set(MODULE_DESCRIPTION "OBS Decklink Output UI")
configure_file(${CMAKE_SOURCE_DIR}/cmake/bundle/windows/obs-module.rc.in
decklink-output-ui.rc)
configure_file(cmake/windows/obs-module.rc.in decklink-output-ui.rc)
target_sources(decklink-output-ui PRIVATE decklink-output-ui.rc)
set_property(
TARGET decklink-output-ui
APPEND
PROPERTY AUTORCC_OPTIONS --format-version 1)
elseif(OS_MACOS)
find_library(COCOA Cocoa)
mark_as_advanced(COCOA)
target_link_libraries(decklink-output-ui PRIVATE ${COCOA})
elseif(OS_POSIX)
elseif(OS_LINUX OR OS_FREEBSD)
find_package(X11 REQUIRED)
target_link_libraries(decklink-output-ui PRIVATE X11::X11 Qt::GuiPrivate)
endif()
get_target_property(_SOURCES decklink-output-ui SOURCES)
set(_UI ${_SOURCES})
list(FILTER _UI INCLUDE REGEX ".*\\.ui?")
source_group(
TREE "${CMAKE_CURRENT_SOURCE_DIR}/forms"
PREFIX "UI Files"
FILES ${_UI})
unset(_SOURCES)
unset(_UI)
setup_plugin_target(decklink-output-ui)
set_target_properties_obs(
decklink-output-ui
PROPERTIES FOLDER frontend
PREFIX ""
AUTOMOC ON
AUTOUIC ON
AUTORCC ON
AUTOUIC_SEARCH_PATHS forms)

View file

@ -0,0 +1,81 @@
project(decklink-output-ui)
if(NOT ENABLE_DECKLINK)
return()
endif()
add_library(decklink-output-ui MODULE)
add_library(OBS::decklink-output-ui ALIAS decklink-output-ui)
find_qt(COMPONENTS Widgets COMPONENTS_LINUX Gui)
set_target_properties(
decklink-output-ui
PROPERTIES AUTOMOC ON
AUTOUIC ON
AUTORCC ON
AUTOUIC_SEARCH_PATHS "forms")
if(_QT_VERSION EQUAL 6 AND OS_WINDOWS)
set_target_properties(decklink-output-ui PROPERTIES AUTORCC_OPTIONS "--format-version;1")
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
${CMAKE_SOURCE_DIR}/UI/double-slider.cpp
${CMAKE_SOURCE_DIR}/UI/double-slider.hpp
${CMAKE_SOURCE_DIR}/UI/plain-text-edit.hpp
${CMAKE_SOURCE_DIR}/UI/plain-text-edit.cpp
${CMAKE_SOURCE_DIR}/UI/properties-view.hpp
${CMAKE_SOURCE_DIR}/UI/properties-view.cpp
${CMAKE_SOURCE_DIR}/UI/properties-view.moc.hpp
${CMAKE_SOURCE_DIR}/UI/qt-wrappers.hpp
${CMAKE_SOURCE_DIR}/UI/qt-wrappers.cpp
${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.cpp
${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.hpp
${CMAKE_SOURCE_DIR}/UI/slider-ignorewheel.cpp
${CMAKE_SOURCE_DIR}/UI/slider-ignorewheel.hpp
${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.hpp
${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.cpp)
target_link_libraries(decklink-output-ui PRIVATE OBS::libobs OBS::frontend-api Qt::Widgets)
target_compile_features(decklink-output-ui PRIVATE cxx_std_17)
set_target_properties(decklink-output-ui PROPERTIES FOLDER "frontend" PREFIX "")
if(OS_WINDOWS)
set(MODULE_DESCRIPTION "OBS Decklink Output UI")
configure_file(${CMAKE_SOURCE_DIR}/cmake/bundle/windows/obs-module.rc.in decklink-output-ui.rc)
target_sources(decklink-output-ui PRIVATE decklink-output-ui.rc)
elseif(OS_MACOS)
find_library(COCOA Cocoa)
mark_as_advanced(COCOA)
target_link_libraries(decklink-output-ui PRIVATE ${COCOA})
elseif(OS_POSIX)
find_package(X11 REQUIRED)
target_link_libraries(decklink-output-ui PRIVATE X11::X11 Qt::GuiPrivate)
endif()
get_target_property(_SOURCES decklink-output-ui SOURCES)
set(_UI ${_SOURCES})
list(FILTER _UI INCLUDE REGEX ".*\\.ui?")
source_group(
TREE "${CMAKE_CURRENT_SOURCE_DIR}/forms"
PREFIX "UI Files"
FILES ${_UI})
unset(_SOURCES)
unset(_UI)
setup_plugin_target(decklink-output-ui)

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>decklink-output-ui</string>
<key>CFBundleIdentifier</key>
<string>com.obsproject.decklink-output-ui</string>
<key>CFBundleVersion</key>
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
<key>CFBundleShortVersionString</key>
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleExecutable</key>
<string>decklink-output-ui</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>LSMinimumSystemVersion</key>
<string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key>
<string>(c) 2012-${CURRENT_YEAR} Hugh Bailey</string>
</dict>
</plist>

View file

@ -0,0 +1,24 @@
1 VERSIONINFO
FILEVERSION ${OBS_VERSION_MAJOR},${OBS_VERSION_MINOR},${OBS_VERSION_PATCH},0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "${OBS_COMPANY_NAME}"
VALUE "FileDescription", "OBS Decklink Output UI"
VALUE "FileVersion", "${OBS_VERSION_CANONICAL}"
VALUE "ProductName", "${OBS_PRODUCT_NAME}"
VALUE "ProductVersion", "${OBS_VERSION_CANONICAL}"
VALUE "Comments", "${OBS_COMMENTS}"
VALUE "LegalCopyright", "${OBS_LEGAL_COPYRIGHT}"
VALUE "InternalName", "decklink-output-ui"
VALUE "OriginalFilename", "decklink-output-ui"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 0x04B0
END
END

View file

@ -1,25 +1,11 @@
project(frontend-tools)
cmake_minimum_required(VERSION 3.16...3.25)
add_library(frontend-tools MODULE)
add_library(OBS::frontend-tools ALIAS frontend-tools)
legacy_check()
find_qt(COMPONENTS Widgets COMPONENTS_LINUX Gui)
set_target_properties(
frontend-tools
PROPERTIES AUTOMOC ON
AUTOUIC ON
AUTORCC ON
AUTOUIC_SEARCH_PATHS "forms")
if(_QT_VERSION EQUAL 6 AND OS_WINDOWS)
set_target_properties(frontend-tools PROPERTIES AUTORCC_OPTIONS
"--format-version;1")
endif()
target_sources(
frontend-tools PRIVATE forms/auto-scene-switcher.ui forms/captions.ui
forms/output-timer.ui forms/scripts.ui)
add_library(frontend-tools MODULE)
add_library(OBS::frontend-tools ALIAS frontend-tools)
target_sources(
frontend-tools
@ -29,56 +15,40 @@ target_sources(
output-timer.hpp
tool-helpers.hpp
output-timer.cpp
${CMAKE_SOURCE_DIR}/UI/double-slider.cpp
${CMAKE_SOURCE_DIR}/UI/double-slider.hpp
${CMAKE_SOURCE_DIR}/UI/horizontal-scroll-area.cpp
${CMAKE_SOURCE_DIR}/UI/horizontal-scroll-area.hpp
${CMAKE_SOURCE_DIR}/UI/properties-view.cpp
${CMAKE_SOURCE_DIR}/UI/properties-view.hpp
${CMAKE_SOURCE_DIR}/UI/properties-view.moc.hpp
${CMAKE_SOURCE_DIR}/UI/qt-wrappers.cpp
${CMAKE_SOURCE_DIR}/UI/qt-wrappers.hpp
${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.cpp
${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.hpp
${CMAKE_SOURCE_DIR}/UI/slider-ignorewheel.cpp
${CMAKE_SOURCE_DIR}/UI/slider-ignorewheel.hpp
${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.hpp
${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.cpp
${CMAKE_SOURCE_DIR}/UI/plain-text-edit.cpp
${CMAKE_SOURCE_DIR}/UI/plain-text-edit.hpp)
"${CMAKE_SOURCE_DIR}/UI/double-slider.cpp"
"${CMAKE_SOURCE_DIR}/UI/double-slider.hpp"
"${CMAKE_SOURCE_DIR}/UI/horizontal-scroll-area.cpp"
"${CMAKE_SOURCE_DIR}/UI/horizontal-scroll-area.hpp"
"${CMAKE_SOURCE_DIR}/UI/properties-view.cpp"
"${CMAKE_SOURCE_DIR}/UI/properties-view.hpp"
"${CMAKE_SOURCE_DIR}/UI/properties-view.moc.hpp"
"${CMAKE_SOURCE_DIR}/UI/qt-wrappers.cpp"
"${CMAKE_SOURCE_DIR}/UI/qt-wrappers.hpp"
"${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.cpp"
"${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.hpp"
"${CMAKE_SOURCE_DIR}/UI/slider-ignorewheel.cpp"
"${CMAKE_SOURCE_DIR}/UI/slider-ignorewheel.hpp"
"${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.hpp"
"${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.cpp"
"${CMAKE_SOURCE_DIR}/UI/plain-text-edit.cpp"
"${CMAKE_SOURCE_DIR}/UI/plain-text-edit.hpp")
target_compile_features(frontend-tools PRIVATE cxx_std_17)
target_sources(frontend-tools PRIVATE forms/auto-scene-switcher.ui forms/captions.ui forms/output-timer.ui
forms/scripts.ui)
target_link_libraries(frontend-tools PRIVATE OBS::frontend-api OBS::libobs
Qt::Widgets)
target_link_libraries(frontend-tools PRIVATE OBS::frontend-api OBS::libobs Qt::Widgets
$<$<PLATFORM_ID:Linux,FreeBSD>:Qt::GuiPrivate>)
if(OS_POSIX AND NOT OS_MACOS)
target_link_libraries(frontend-tools PRIVATE Qt::GuiPrivate)
endif()
add_subdirectory("${CMAKE_SOURCE_DIR}/deps/obs-scripting" "${CMAKE_BINARY_DIR}/deps/obs-scripting")
if(ENABLE_SCRIPTING AND TARGET OBS::scripting)
target_compile_definitions(frontend-tools PRIVATE ENABLE_SCRIPTING)
target_sources(frontend-tools PRIVATE scripts.cpp scripts.hpp)
target_link_libraries(frontend-tools PRIVATE OBS::scripting)
if(TARGET obslua)
target_compile_definitions(frontend-tools PRIVATE LUAJIT_FOUND)
endif()
if(TARGET obspython)
target_compile_definitions(frontend-tools PRIVATE Python_FOUND)
endif()
target_enable_feature(frontend-tools "Scripting Support (Frontend)" ENABLE_SCRIPTING)
endif()
set_target_properties(frontend-tools PROPERTIES FOLDER "frontend" PREFIX "")
if(OS_WINDOWS)
set(MODULE_DESCRIPTION "OBS Frontend Tools")
configure_file(${CMAKE_SOURCE_DIR}/cmake/bundle/windows/obs-module.rc.in
frontend-tools.rc)
configure_file(cmake/windows/obs-module.rc.in frontend-tools.rc)
target_sources(
frontend-tools
PRIVATE auto-scene-switcher-win.cpp
@ -92,32 +62,32 @@ if(OS_WINDOWS)
captions-mssapi-stream.cpp
captions-mssapi-stream.hpp)
set_property(
TARGET frontend-tools
APPEND
PROPERTY AUTORCC_OPTIONS --format-version 1)
elseif(OS_MACOS)
find_library(COCOA Cocoa)
mark_as_advanced(COCOA)
target_link_libraries(frontend-tools PRIVATE ${COCOA})
target_sources(frontend-tools PRIVATE auto-scene-switcher-osx.mm)
set_source_files_properties(auto-scene-switcher-osx.mm
PROPERTIES COMPILE_FLAGS -fobjc-arc)
elseif(OS_POSIX)
set_target_properties(frontend-tools PROPERTIES XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES)
if(NOT XCODE)
set_source_files_properties(auto-scene-switcher-osx.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
endif()
elseif(OS_LINUX OR OS_FREEBSD)
find_package(X11 REQUIRED)
target_link_libraries(frontend-tools PRIVATE X11::X11)
target_sources(frontend-tools PRIVATE auto-scene-switcher-nix.cpp)
endif()
get_target_property(_SOURCES frontend-tools SOURCES)
set(_UI ${_SOURCES})
list(FILTER _UI INCLUDE REGEX ".*\\.ui?")
source_group(
TREE "${CMAKE_CURRENT_SOURCE_DIR}/forms"
PREFIX "UI Files"
FILES ${_UI})
unset(_SOURCES)
unset(_UI)
setup_plugin_target(frontend-tools)
set_target_properties_obs(
frontend-tools
PROPERTIES FOLDER frontend
PREFIX ""
AUTOMOC ON
AUTOUIC ON
AUTORCC ON
AUTOUIC_SEARCH_PATHS forms)

View file

@ -0,0 +1,118 @@
project(frontend-tools)
add_library(frontend-tools MODULE)
add_library(OBS::frontend-tools ALIAS frontend-tools)
find_qt(COMPONENTS Widgets COMPONENTS_LINUX Gui)
set_target_properties(
frontend-tools
PROPERTIES AUTOMOC ON
AUTOUIC ON
AUTORCC ON
AUTOUIC_SEARCH_PATHS "forms")
if(_QT_VERSION EQUAL 6 AND OS_WINDOWS)
set_target_properties(frontend-tools PROPERTIES AUTORCC_OPTIONS "--format-version;1")
endif()
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 frontend-tools.c
auto-scene-switcher.hpp
auto-scene-switcher.cpp
output-timer.hpp
tool-helpers.hpp
output-timer.cpp
${CMAKE_SOURCE_DIR}/UI/double-slider.cpp
${CMAKE_SOURCE_DIR}/UI/double-slider.hpp
${CMAKE_SOURCE_DIR}/UI/horizontal-scroll-area.cpp
${CMAKE_SOURCE_DIR}/UI/horizontal-scroll-area.hpp
${CMAKE_SOURCE_DIR}/UI/properties-view.cpp
${CMAKE_SOURCE_DIR}/UI/properties-view.hpp
${CMAKE_SOURCE_DIR}/UI/properties-view.moc.hpp
${CMAKE_SOURCE_DIR}/UI/qt-wrappers.cpp
${CMAKE_SOURCE_DIR}/UI/qt-wrappers.hpp
${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.cpp
${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.hpp
${CMAKE_SOURCE_DIR}/UI/slider-ignorewheel.cpp
${CMAKE_SOURCE_DIR}/UI/slider-ignorewheel.hpp
${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.hpp
${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.cpp
${CMAKE_SOURCE_DIR}/UI/plain-text-edit.cpp
${CMAKE_SOURCE_DIR}/UI/plain-text-edit.hpp)
target_compile_features(frontend-tools PRIVATE cxx_std_17)
target_link_libraries(frontend-tools PRIVATE OBS::frontend-api OBS::libobs Qt::Widgets)
if(OS_POSIX AND NOT OS_MACOS)
target_link_libraries(frontend-tools PRIVATE Qt::GuiPrivate)
endif()
if(ENABLE_SCRIPTING AND TARGET OBS::scripting)
target_compile_definitions(frontend-tools PRIVATE ENABLE_SCRIPTING)
target_sources(frontend-tools PRIVATE scripts.cpp scripts.hpp)
target_link_libraries(frontend-tools PRIVATE OBS::scripting)
if(TARGET obslua)
target_compile_definitions(frontend-tools PRIVATE LUAJIT_FOUND)
endif()
if(TARGET obspython)
target_compile_definitions(frontend-tools PRIVATE Python_FOUND)
endif()
endif()
set_target_properties(frontend-tools PROPERTIES FOLDER "frontend" PREFIX "")
if(OS_WINDOWS)
set(MODULE_DESCRIPTION "OBS Frontend Tools")
configure_file(${CMAKE_SOURCE_DIR}/cmake/bundle/windows/obs-module.rc.in frontend-tools.rc)
target_sources(
frontend-tools
PRIVATE auto-scene-switcher-win.cpp
frontend-tools.rc
captions.cpp
captions.hpp
captions-handler.cpp
captions-handler.hpp
captions-mssapi.cpp
captions-mssapi.hpp
captions-mssapi-stream.cpp
captions-mssapi-stream.hpp)
elseif(OS_MACOS)
find_library(COCOA Cocoa)
mark_as_advanced(COCOA)
target_link_libraries(frontend-tools PRIVATE ${COCOA})
target_sources(frontend-tools PRIVATE auto-scene-switcher-osx.mm)
set_source_files_properties(auto-scene-switcher-osx.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
elseif(OS_POSIX)
find_package(X11 REQUIRED)
target_link_libraries(frontend-tools PRIVATE X11::X11)
target_sources(frontend-tools PRIVATE auto-scene-switcher-nix.cpp)
endif()
get_target_property(_SOURCES frontend-tools SOURCES)
set(_UI ${_SOURCES})
list(FILTER _UI INCLUDE REGEX ".*\\.ui?")
source_group(
TREE "${CMAKE_CURRENT_SOURCE_DIR}/forms"
PREFIX "UI Files"
FILES ${_UI})
unset(_SOURCES)
unset(_UI)
setup_plugin_target(frontend-tools)

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>frontend-tools</string>
<key>CFBundleIdentifier</key>
<string>com.obsproject.frontend-tools</string>
<key>CFBundleVersion</key>
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
<key>CFBundleShortVersionString</key>
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleExecutable</key>
<string>frontend-tools</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>LSMinimumSystemVersion</key>
<string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key>
<string>(c) 2012-${CURRENT_YEAR} Hugh Bailey</string>
</dict>
</plist>

View file

@ -0,0 +1,24 @@
1 VERSIONINFO
FILEVERSION ${OBS_VERSION_MAJOR},${OBS_VERSION_MINOR},${OBS_VERSION_PATCH},0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "${OBS_COMPANY_NAME}"
VALUE "FileDescription", "OBS Frontend Tools"
VALUE "FileVersion", "${OBS_VERSION_CANONICAL}"
VALUE "ProductName", "${OBS_PRODUCT_NAME}"
VALUE "ProductVersion", "${OBS_VERSION_CANONICAL}"
VALUE "Comments", "${OBS_COMMENTS}"
VALUE "LegalCopyright", "${OBS_LEGAL_COPYRIGHT}"
VALUE "InternalName", "frontend-tools"
VALUE "OriginalFilename", "frontend-tools"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 0x04B0
END
END

View file

@ -1,40 +1,23 @@
if(POLICY CMP0090)
cmake_policy(SET CMP0090 NEW)
endif()
cmake_minimum_required(VERSION 3.16...3.25)
project(obs-frontend-api)
legacy_check()
add_library(obs-frontend-api SHARED)
add_library(OBS::frontend-api ALIAS obs-frontend-api)
target_sources(obs-frontend-api PRIVATE obs-frontend-api.h obs-frontend-api.cpp
obs-frontend-internal.hpp)
target_sources(obs-frontend-api PRIVATE obs-frontend-api.h obs-frontend-api.cpp obs-frontend-internal.hpp)
target_link_libraries(obs-frontend-api PRIVATE OBS::libobs)
target_compile_features(obs-frontend-api PUBLIC cxx_auto_type cxx_std_17
c_std_11)
target_include_directories(
obs-frontend-api PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${OBS_INCLUDE_DESTINATION}>)
set_target_properties(
obs-frontend-api
PROPERTIES FOLDER "frontend"
VERSION "${OBS_VERSION_MAJOR}"
SOVERSION "0"
PUBLIC_HEADER obs-frontend-api.h)
target_include_directories(obs-frontend-api PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>")
if(OS_WINDOWS)
set(MODULE_DESCRIPTION "OBS Frontend API")
configure_file(${CMAKE_SOURCE_DIR}/cmake/bundle/windows/obs-module.rc.in
obs-frontend-api.rc)
configure_file(cmake/windows/obs-module.rc.in obs-frontend-api.rc)
target_sources(obs-frontend-api PRIVATE obs-frontend-api.rc)
elseif(OS_MACOS)
set_target_properties(obs-frontend-api PROPERTIES SOVERSION "1")
set_target_properties(obs-frontend-api PROPERTIES SOVERSION 1)
endif()
setup_binary_target(obs-frontend-api)
export_target(obs-frontend-api)
set_target_properties_obs(obs-frontend-api PROPERTIES FOLDER frontend PREFIX "" PUBLIC_HEADER obs-frontend-api.h)
target_export(obs-frontend-api)

View file

@ -0,0 +1,36 @@
if(POLICY CMP0090)
cmake_policy(SET CMP0090 NEW)
endif()
project(obs-frontend-api)
add_library(obs-frontend-api SHARED)
add_library(OBS::frontend-api ALIAS obs-frontend-api)
target_sources(obs-frontend-api PRIVATE obs-frontend-api.h obs-frontend-api.cpp obs-frontend-internal.hpp)
target_link_libraries(obs-frontend-api PRIVATE OBS::libobs)
target_compile_features(obs-frontend-api PUBLIC cxx_auto_type cxx_std_17 c_std_11)
target_include_directories(obs-frontend-api PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${OBS_INCLUDE_DESTINATION}>)
set_target_properties(
obs-frontend-api
PROPERTIES FOLDER "frontend"
VERSION "${OBS_VERSION_MAJOR}"
SOVERSION "0"
PUBLIC_HEADER obs-frontend-api.h)
if(OS_WINDOWS)
set(MODULE_DESCRIPTION "OBS Frontend API")
configure_file(${CMAKE_SOURCE_DIR}/cmake/bundle/windows/obs-module.rc.in obs-frontend-api.rc)
target_sources(obs-frontend-api PRIVATE obs-frontend-api.rc)
elseif(OS_MACOS)
set_target_properties(obs-frontend-api PROPERTIES SOVERSION "1")
endif()
setup_binary_target(obs-frontend-api)
export_target(obs-frontend-api)

View file

@ -1,4 +1,8 @@
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_dependency(OBS::libobs REQUIRED)
include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
check_required_components("@PROJECT_NAME@")

View file

@ -0,0 +1,24 @@
1 VERSIONINFO
FILEVERSION ${OBS_VERSION_MAJOR},${OBS_VERSION_MINOR},${OBS_VERSION_PATCH},0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "${OBS_COMPANY_NAME}"
VALUE "FileDescription", "OBS Frontend API"
VALUE "FileVersion", "${OBS_VERSION_CANONICAL}"
VALUE "ProductName", "${OBS_PRODUCT_NAME}"
VALUE "ProductVersion", "${OBS_VERSION_CANONICAL}"
VALUE "Comments", "${OBS_COMMENTS}"
VALUE "LegalCopyright", "${OBS_LEGAL_COPYRIGHT}"
VALUE "InternalName", "obs-frontend-api"
VALUE "OriginalFilename", "obs-frontend-api"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 0x04B0
END
END

View file

@ -1,34 +1,15 @@
#pragma once
#ifndef TRUE
#define TRUE 1
#endif
#ifndef ON
#define ON 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef OFF
#define OFF 0
#endif
#cmakedefine USE_XDG
#define OAUTH_BASE_URL "@OAUTH_BASE_URL@"
#define TWITCH_ENABLED @TWITCH_ENABLED@
#define TWITCH_CLIENTID "@TWITCH_CLIENTID@"
#define TWITCH_HASH 0x@TWITCH_HASH@
#define RESTREAM_ENABLED @RESTREAM_ENABLED@
#define RESTREAM_CLIENTID "@RESTREAM_CLIENTID@"
#define RESTREAM_HASH 0x@RESTREAM_HASH@
#define YOUTUBE_ENABLED @YOUTUBE_ENABLED@
#define YOUTUBE_CLIENTID "@YOUTUBE_CLIENTID@"
#define YOUTUBE_SECRET "@YOUTUBE_SECRET@"
#define YOUTUBE_CLIENTID_HASH 0x@YOUTUBE_CLIENTID_HASH@

View file

@ -1,44 +1,42 @@
project(updater)
cmake_minimum_required(VERSION 3.24...3.25)
legacy_check()
option(ENABLE_UPDATER "Build with Windows updater" ON)
if(NOT ENABLE_UPDATER)
message(STATUS "OBS: DISABLED Windows updater")
target_disable_feature(obs "Windows updater")
return()
endif()
find_package(zstd)
if(NOT TARGET OBS::json11)
add_subdirectory("${CMAKE_SOURCE_DIR}/deps/json11" "${CMAKE_BINARY_DIR}/deps/json11")
endif()
add_executable(updater WIN32)
target_sources(
updater
PRIVATE updater.cpp
updater.hpp
patch.cpp
http.cpp
hash.cpp
resource.h
updater.rc
init-hook-files.c
updater.manifest
PRIVATE hash.cpp
helpers.cpp
helpers.hpp
${CMAKE_SOURCE_DIR}/deps/json11/json11.hpp
${CMAKE_SOURCE_DIR}/deps/json11/json11.cpp)
target_include_directories(updater PRIVATE ${CMAKE_SOURCE_DIR}/libobs
${CMAKE_SOURCE_DIR}/deps/json11)
http.cpp
init-hook-files.c
patch.cpp
resource.h
updater.cpp
updater.hpp
updater.manifest
updater.rc)
target_compile_options(updater PRIVATE $<IF:$<CONFIG:DEBUG>,/MTd,/MT> "/utf-8")
target_compile_definitions(updater PRIVATE NOMINMAX "PSAPI_VERSION=2")
if(MSVC)
target_compile_options(updater PRIVATE $<IF:$<CONFIG:DEBUG>,/MTd,/MT>)
target_compile_options(updater PRIVATE "/utf-8")
target_link_options(updater PRIVATE "LINKER:/IGNORE:4098")
endif()
target_include_directories(updater PRIVATE "${CMAKE_SOURCE_DIR}/libobs" "${CMAKE_SOURCE_DIR}/UI/win-update")
target_link_libraries(updater PRIVATE OBS::blake2 zstd::libzstd_static comctl32
shell32 winhttp)
target_link_libraries(updater PRIVATE OBS::blake2 OBS::json11 zstd::libzstd_static comctl32 shell32 winhttp)
target_link_options(updater PRIVATE /IGNORE:4098)
set_target_properties(updater PROPERTIES FOLDER "frontend")
set_target_properties_obs(updater PROPERTIES FOLDER frontend OUTPUT_NAME updater)

View file

@ -0,0 +1,42 @@
project(updater)
option(ENABLE_UPDATER "Build with Windows updater" ON)
if(NOT ENABLE_UPDATER)
message(STATUS "OBS: DISABLED Windows updater")
return()
endif()
find_package(zstd)
add_executable(updater WIN32)
target_sources(
updater
PRIVATE updater.cpp
updater.hpp
patch.cpp
http.cpp
hash.cpp
resource.h
updater.rc
init-hook-files.c
updater.manifest
helpers.cpp
helpers.hpp
${CMAKE_SOURCE_DIR}/deps/json11/json11.hpp
${CMAKE_SOURCE_DIR}/deps/json11/json11.cpp)
target_include_directories(updater PRIVATE ${CMAKE_SOURCE_DIR}/libobs ${CMAKE_SOURCE_DIR}/deps/json11)
target_compile_definitions(updater PRIVATE NOMINMAX "PSAPI_VERSION=2")
if(MSVC)
target_compile_options(updater PRIVATE $<IF:$<CONFIG:DEBUG>,/MTd,/MT>)
target_compile_options(updater PRIVATE "/utf-8")
target_link_options(updater PRIVATE "LINKER:/IGNORE:4098")
endif()
target_link_libraries(updater PRIVATE OBS::blake2 zstd::libzstd_static comctl32 shell32 winhttp)
set_target_properties(updater PROPERTIES FOLDER "frontend")

View file

@ -6,8 +6,7 @@ if(NOT DEFINED APPDATA_RELEASE_DATE)
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_STRIP_TRAILING_WHITESPACE)
else()
file(TIMESTAMP "${CMAKE_SOURCE_DIR}/CMakeLists.txt" APPDATA_RELEASE_DATE
"%Y-%m-%d")
file(TIMESTAMP "${CMAKE_SOURCE_DIR}/CMakeLists.txt" APPDATA_RELEASE_DATE "%Y-%m-%d")
endif()
endif()
@ -23,14 +22,12 @@ if(NOT DEFINED GIT_HASH)
endif()
endif()
configure_file(com.obsproject.Studio.appdata.xml.in
com.obsproject.Studio.appdata.xml)
configure_file(com.obsproject.Studio.appdata.xml.in com.obsproject.Studio.appdata.xml)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/com.obsproject.Studio.appdata.xml
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo)
install(FILES com.obsproject.Studio.desktop
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
install(FILES com.obsproject.Studio.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
install(
FILES icons/obs-logo-128.png

View file

@ -11,21 +11,17 @@ if(OS_WINDOWS AND MSVC)
file(
GENERATE
OUTPUT "${CMAKE_BINARY_DIR}/ALL_BUILD.vcxproj.user"
INPUT "${CMAKE_SOURCE_DIR}/cmake/bundle/windows/ALL_BUILD.vcxproj.user.in"
)
INPUT "${CMAKE_SOURCE_DIR}/cmake/bundle/windows/ALL_BUILD.vcxproj.user.in")
endif()
# CMake 3.24 introduces a bug mistakenly interpreting MSVC as supporting
# `-pthread`
# CMake 3.24 introduces a bug mistakenly interpreting MSVC as supporting `-pthread`
if(${CMAKE_VERSION} VERSION_EQUAL "3.24.0")
set(THREADS_HAVE_PTHREAD_ARG OFF)
endif()
# Check for Win SDK version 10.0.20348 or above
obs_status(
STATUS "Windows API version is ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
string(REPLACE "." ";" WINAPI_VER
"${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
obs_status(STATUS "Windows API version is ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
string(REPLACE "." ";" WINAPI_VER "${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
list(GET WINAPI_VER 0 WINAPI_VER_MAJOR)
list(GET WINAPI_VER 1 WINAPI_VER_MINOR)
@ -45,10 +41,8 @@ if(OS_WINDOWS AND MSVC)
endif()
if(NOT WINAPI_COMPATIBLE)
obs_status(
FATAL_ERROR
"OBS requires Windows 10 SDK version 10.0.20348.0 and above to compile.\n"
"Please download the most recent Windows 10 SDK in order to compile.")
obs_status(FATAL_ERROR "OBS requires Windows 10 SDK version 10.0.20348.0 and above to compile.\n"
"Please download the most recent Windows 10 SDK in order to compile.")
endif()
add_compile_options(
@ -76,12 +70,8 @@ if(OS_WINDOWS AND MSVC)
/std:c17)
add_link_options(
"LINKER:/Brepro"
"LINKER:/OPT:REF"
"LINKER:/WX"
"$<$<NOT:$<EQUAL:${CMAKE_SIZEOF_VOID_P},8>>:LINKER\:/SAFESEH\:NO>"
"$<$<CONFIG:DEBUG>:LINKER\:/INCREMENTAL\:NO>"
"$<$<CONFIG:RELWITHDEBINFO>:LINKER\:/INCREMENTAL\:NO;/OPT:ICF>")
"LINKER:/Brepro" "LINKER:/OPT:REF" "LINKER:/WX" "$<$<NOT:$<EQUAL:${CMAKE_SIZEOF_VOID_P},8>>:LINKER\:/SAFESEH\:NO>"
"$<$<CONFIG:DEBUG>:LINKER\:/INCREMENTAL\:NO>" "$<$<CONFIG:RELWITHDEBINFO>:LINKER\:/INCREMENTAL\:NO;/OPT:ICF>")
else()
find_program(CCACHE_PROGRAM "ccache")
set(CCACHE_SUPPORT
@ -147,8 +137,7 @@ else()
string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} LOWERCASE_CMAKE_SYSTEM_PROCESSOR)
endif()
if(LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES
"(i[3-6]86|x86|x64|x86_64|amd64|e2k)")
if(LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|x86|x64|x86_64|amd64|e2k)")
if(NOT MSVC AND NOT CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
set(ARCH_SIMD_FLAGS -mmmx -msse -msse2)
endif()
@ -156,15 +145,12 @@ elseif(LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64(le)?")
set(ARCH_SIMD_DEFINES -DNO_WARN_X86_INTRINSICS)
set(ARCH_SIMD_FLAGS -mvsx)
else()
if(CMAKE_C_COMPILER_ID MATCHES "^(Apple)?Clang|GNU"
OR CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang|GNU")
if(CMAKE_C_COMPILER_ID MATCHES "^(Apple)?Clang|GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang|GNU")
check_c_compiler_flag("-fopenmp-simd" C_COMPILER_SUPPORTS_OPENMP_SIMD)
check_cxx_compiler_flag("-fopenmp-simd" CXX_COMPILER_SUPPORTS_OPENMP_SIMD)
set(ARCH_SIMD_FLAGS
-DSIMDE_ENABLE_OPENMP
"$<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:C_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>"
"$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:CXX_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>"
)
-DSIMDE_ENABLE_OPENMP "$<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:C_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>"
"$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:CXX_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>")
endif()
endif()
@ -178,15 +164,13 @@ if(LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "e2k")
"-Wno-sign-compare"
"-Wno-bad-return-value-type"
"-Wno-maybe-uninitialized")
check_c_compiler_flag(${TEST_C_FLAG}
C_COMPILER_SUPPORTS_FLAG_${TEST_C_FLAG})
check_c_compiler_flag(${TEST_C_FLAG} C_COMPILER_SUPPORTS_FLAG_${TEST_C_FLAG})
if(C_COMPILER_SUPPORTS_FLAG_${TEST_C_FLAG})
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} ${TEST_C_FLAG})
endif()
endforeach()
foreach(TEST_CXX_FLAG "-Wno-invalid-offsetof" "-Wno-maybe-uninitialized")
check_cxx_compiler_flag(${TEST_CXX_FLAG}
CXX_COMPILER_SUPPORTS_FLAG_${TEST_CXX_FLAG})
check_cxx_compiler_flag(${TEST_CXX_FLAG} CXX_COMPILER_SUPPORTS_FLAG_${TEST_CXX_FLAG})
if(CXX_COMPILER_SUPPORTS_FLAG_${TEST_CXX_FLAG})
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${TEST_CXX_FLAG})
endif()

View file

@ -89,13 +89,9 @@ file(
"${FFMPEG_avcodec_INCLUDE_DIR}/bin${_bin_suffix}/libbz2*.dll"
"${FFMPEG_avcodec_INCLUDE_DIR}/bin${_bin_suffix}/zlib*.dll")
file(
GLOB
X264_BIN_FILES
"${X264_INCLUDE_DIR}/../bin${_bin_suffix}/libx264-*.dll"
"${X264_INCLUDE_DIR}/../bin/libx264-*.dll"
"${X264_INCLUDE_DIR}/bin/libx264-*.dll"
"${X264_INCLUDE_DIR}/bin${_bin_suffix}/libx264-*.dll")
file(GLOB X264_BIN_FILES "${X264_INCLUDE_DIR}/../bin${_bin_suffix}/libx264-*.dll"
"${X264_INCLUDE_DIR}/../bin/libx264-*.dll" "${X264_INCLUDE_DIR}/bin/libx264-*.dll"
"${X264_INCLUDE_DIR}/bin${_bin_suffix}/libx264-*.dll")
file(
GLOB
@ -111,13 +107,9 @@ file(
"${FREETYPE_INCLUDE_DIR_ft2build}/../bin${_bin_suffix}/freetype.dll"
"${FREETYPE_INCLUDE_DIR_ft2build}/../bin/freetype.dll")
file(
GLOB
LIBFDK_BIN_FILES
"${Libfdk_INCLUDE_DIR}/../bin${_bin_suffix}/libfdk*-*.dll"
"${Libfdk_INCLUDE_DIR}/../bin/libfdk*-*.dll"
"${Libfdk_INCLUDE_DIR}/bin/libfdk*-*.dll"
"${Libfdk_INCLUDE_DIR}/bin${_bin_suffix}/libfdk*-*.dll")
file(GLOB LIBFDK_BIN_FILES "${Libfdk_INCLUDE_DIR}/../bin${_bin_suffix}/libfdk*-*.dll"
"${Libfdk_INCLUDE_DIR}/../bin/libfdk*-*.dll" "${Libfdk_INCLUDE_DIR}/bin/libfdk*-*.dll"
"${Libfdk_INCLUDE_DIR}/bin${_bin_suffix}/libfdk*-*.dll")
file(
GLOB
@ -132,8 +124,7 @@ file(
"${SSL_INCLUDE_DIR}/bin/libeay32*.dll")
if(NOT DEFINED CURL_INCLUDE_DIR AND TARGET CURL::libcurl)
get_target_property(CURL_INCLUDE_DIR CURL::libcurl
INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(CURL_INCLUDE_DIR CURL::libcurl INTERFACE_INCLUDE_DIRECTORIES)
endif()
file(
@ -166,17 +157,11 @@ endif()
file(GLOB ZLIB_BIN_FILES "${ZLIB_BIN_PATH}/zlib*.dll")
if(NOT ZLIB_BIN_FILES)
file(
GLOB
ZLIB_BIN_FILES
"${ZLIB_INCLUDE_DIR}/../bin${_bin_suffix}/zlib*.dll"
"${ZLIB_INCLUDE_DIR}/../bin/zlib*.dll"
"${ZLIB_INCLUDE_DIR}/bin${_bin_suffix}/zlib*.dll"
"${ZLIB_INCLUDE_DIR}/bin/zlib*.dll")
file(GLOB ZLIB_BIN_FILES "${ZLIB_INCLUDE_DIR}/../bin${_bin_suffix}/zlib*.dll" "${ZLIB_INCLUDE_DIR}/../bin/zlib*.dll"
"${ZLIB_INCLUDE_DIR}/bin${_bin_suffix}/zlib*.dll" "${ZLIB_INCLUDE_DIR}/bin/zlib*.dll")
endif()
file(GLOB RNNOISE_BIN_FILES
"${RNNOISE_INCLUDE_DIR}/../bin${_bin_suffix}/rnnoise*.dll"
file(GLOB RNNOISE_BIN_FILES "${RNNOISE_INCLUDE_DIR}/../bin${_bin_suffix}/rnnoise*.dll"
"${RNNOISE_INCLUDE_DIR}/../bin/rnnoise*.dll")
set(QtCore_DIR "${Qt${_QT_VERSION}Core_DIR}")
@ -198,18 +183,11 @@ file(
"${QtCore_BIN_DIR}/Qt${_QT_VERSION}Networkd.dll"
"${QtCore_BIN_DIR}/libGLESv2d.dll"
"${QtCore_BIN_DIR}/libEGLd.dll")
file(GLOB QT_DEBUG_PLAT_BIN_FILES
"${QtCore_PLUGIN_DIR}/platforms/qwindowsd.dll")
file(GLOB QT_DEBUG_STYLES_BIN_FILES
"${QtCore_PLUGIN_DIR}/styles/qwindowsvistastyled.dll")
file(GLOB QT_DEBUG_ICONENGINE_BIN_FILES
"${QtCore_PLUGIN_DIR}/iconengines/qsvgicond.dll")
file(
GLOB
QT_DEBUG_IMAGEFORMATS_BIN_FILES
"${QtCore_PLUGIN_DIR}/imageformats/qsvgd.dll"
"${QtCore_PLUGIN_DIR}/imageformats/qgifd.dll"
"${QtCore_PLUGIN_DIR}/imageformats/qjpegd.dll")
file(GLOB QT_DEBUG_PLAT_BIN_FILES "${QtCore_PLUGIN_DIR}/platforms/qwindowsd.dll")
file(GLOB QT_DEBUG_STYLES_BIN_FILES "${QtCore_PLUGIN_DIR}/styles/qwindowsvistastyled.dll")
file(GLOB QT_DEBUG_ICONENGINE_BIN_FILES "${QtCore_PLUGIN_DIR}/iconengines/qsvgicond.dll")
file(GLOB QT_DEBUG_IMAGEFORMATS_BIN_FILES "${QtCore_PLUGIN_DIR}/imageformats/qsvgd.dll"
"${QtCore_PLUGIN_DIR}/imageformats/qgifd.dll" "${QtCore_PLUGIN_DIR}/imageformats/qjpegd.dll")
file(
GLOB
@ -224,14 +202,10 @@ file(
"${QtCore_BIN_DIR}/libGLESv2.dll"
"${QtCore_BIN_DIR}/libEGL.dll")
file(GLOB QT_PLAT_BIN_FILES "${QtCore_PLUGIN_DIR}/platforms/qwindows.dll")
file(GLOB QT_STYLES_BIN_FILES
"${QtCore_PLUGIN_DIR}/styles/qwindowsvistastyle.dll")
file(GLOB QT_ICONENGINE_BIN_FILES
"${QtCore_PLUGIN_DIR}/iconengines/qsvgicon.dll")
file(
GLOB QT_IMAGEFORMATS_BIN_FILES "${QtCore_PLUGIN_DIR}/imageformats/qsvg.dll"
"${QtCore_PLUGIN_DIR}/imageformats/qgif.dll"
"${QtCore_PLUGIN_DIR}/imageformats/qjpeg.dll")
file(GLOB QT_STYLES_BIN_FILES "${QtCore_PLUGIN_DIR}/styles/qwindowsvistastyle.dll")
file(GLOB QT_ICONENGINE_BIN_FILES "${QtCore_PLUGIN_DIR}/iconengines/qsvgicon.dll")
file(GLOB QT_IMAGEFORMATS_BIN_FILES "${QtCore_PLUGIN_DIR}/imageformats/qsvg.dll"
"${QtCore_PLUGIN_DIR}/imageformats/qgif.dll" "${QtCore_PLUGIN_DIR}/imageformats/qjpeg.dll")
file(GLOB QT_ICU_BIN_FILES "${QtCore_BIN_DIR}/icu*.dll")
@ -302,8 +276,7 @@ obs_status(STATUS "Qt Debug files: ${QT_DEBUG_BIN_FILES}")
obs_status(STATUS "Qt Debug Platform files: ${QT_DEBUG_PLAT_BIN_FILES}")
obs_status(STATUS "Qt Debug Styles files: ${QT_DEBUG_STYLES_BIN_FILES}")
obs_status(STATUS "Qt Debug Iconengine files: ${QT_DEBUG_ICONENGINE_BIN_FILES}")
obs_status(STATUS
"Qt Debug Imageformat files: ${QT_DEBUG_IMAGEFORMATS_BIN_FILES}")
obs_status(STATUS "Qt Debug Imageformat files: ${QT_DEBUG_IMAGEFORMATS_BIN_FILES}")
obs_status(STATUS "Qt Release files: ${QT_BIN_FILES}")
obs_status(STATUS "Qt Release Platform files: ${QT_PLAT_BIN_FILES}")
obs_status(STATUS "Qt Release Styles files: ${QT_STYLES_BIN_FILES}")
@ -312,166 +285,80 @@ obs_status(STATUS "Qt Release Imageformat files: ${QT_IMAGEFORMATS_BIN_FILES}")
obs_status(STATUS "Qt ICU files: ${QT_ICU_BIN_FILES}")
foreach(BinFile ${ALL_BASE_BIN_FILES})
obs_status(
STATUS
"copying ${BinFile} to ${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}"
)
file(
COPY "${BinFile}"
DESTINATION
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}/")
obs_status(STATUS "copying ${BinFile} to ${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}")
file(COPY "${BinFile}" DESTINATION "${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}/")
endforeach()
foreach(BinFile ${ALL_REL_BIN_FILES})
obs_status(
STATUS
"copying ${BinFile} to ${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}r"
)
file(
COPY "${BinFile}"
DESTINATION
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}r/")
obs_status(STATUS "copying ${BinFile} to ${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}r")
file(COPY "${BinFile}" DESTINATION "${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}r/")
endforeach()
foreach(BinFile ${ALL_DBG_BIN_FILES})
obs_status(
STATUS
"copying ${BinFile} to ${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}d"
)
file(
COPY "${BinFile}"
DESTINATION
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}d/")
obs_status(STATUS "copying ${BinFile} to ${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}d")
file(COPY "${BinFile}" DESTINATION "${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}d/")
endforeach()
foreach(BinFile ${ALL_PLATFORM_BIN_FILES})
make_directory(
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}/platforms")
file(
COPY "${BinFile}"
DESTINATION
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}/platforms/"
)
make_directory("${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}/platforms")
file(COPY "${BinFile}" DESTINATION "${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}/platforms/")
endforeach()
foreach(BinFile ${ALL_PLATFORM_REL_BIN_FILES})
make_directory(
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}r/platforms"
)
file(
COPY "${BinFile}"
DESTINATION
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}r/platforms/"
)
make_directory("${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}r/platforms")
file(COPY "${BinFile}" DESTINATION "${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}r/platforms/")
endforeach()
foreach(BinFile ${ALL_PLATFORM_DBG_BIN_FILES})
make_directory(
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}d/platforms"
)
file(
COPY "${BinFile}"
DESTINATION
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}d/platforms/"
)
make_directory("${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}d/platforms")
file(COPY "${BinFile}" DESTINATION "${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}d/platforms/")
endforeach()
foreach(BinFile ${ALL_STYLES_BIN_FILES})
make_directory(
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}/styles")
file(
COPY "${BinFile}"
DESTINATION
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}/styles/")
make_directory("${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}/styles")
file(COPY "${BinFile}" DESTINATION "${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}/styles/")
endforeach()
foreach(BinFile ${ALL_STYLES_REL_BIN_FILES})
make_directory(
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}r/styles")
file(
COPY "${BinFile}"
DESTINATION
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}r/styles/"
)
make_directory("${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}r/styles")
file(COPY "${BinFile}" DESTINATION "${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}r/styles/")
endforeach()
foreach(BinFile ${ALL_STYLES_DBG_BIN_FILES})
make_directory(
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}d/styles")
file(
COPY "${BinFile}"
DESTINATION
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}d/styles/"
)
make_directory("${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}d/styles")
file(COPY "${BinFile}" DESTINATION "${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}d/styles/")
endforeach()
foreach(BinFile ${ALL_ICONENGINE_BIN_FILES})
make_directory(
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}/iconengines"
)
file(
COPY "${BinFile}"
DESTINATION
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}/iconengines/"
)
make_directory("${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}/iconengines")
file(COPY "${BinFile}" DESTINATION "${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}/iconengines/")
endforeach()
foreach(BinFile ${ALL_ICONENGINE_REL_BIN_FILES})
make_directory(
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}r/iconengines"
)
file(
COPY "${BinFile}"
DESTINATION
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}r/iconengines/"
)
make_directory("${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}r/iconengines")
file(COPY "${BinFile}" DESTINATION "${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}r/iconengines/")
endforeach()
foreach(BinFile ${ALL_ICONENGINE_DBG_BIN_FILES})
make_directory(
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}d/iconengines"
)
file(
COPY "${BinFile}"
DESTINATION
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}d/iconengines/"
)
make_directory("${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}d/iconengines")
file(COPY "${BinFile}" DESTINATION "${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}d/iconengines/")
endforeach()
foreach(BinFile ${ALL_IMAGEFORMATS_BIN_FILES})
make_directory(
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}/imageformats"
)
file(
COPY "${BinFile}"
DESTINATION
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}/imageformats/"
)
make_directory("${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}/imageformats")
file(COPY "${BinFile}" DESTINATION "${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}/imageformats/")
endforeach()
foreach(BinFile ${ALL_IMAGEFORMATS_REL_BIN_FILES})
make_directory(
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}r/imageformats"
)
file(
COPY "${BinFile}"
DESTINATION
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}r/imageformats/"
)
make_directory("${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}r/imageformats")
file(COPY "${BinFile}" DESTINATION "${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}r/imageformats/")
endforeach()
foreach(BinFile ${ALL_IMAGEFORMATS_DBG_BIN_FILES})
make_directory(
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}d/imageformats"
)
file(
COPY "${BinFile}"
DESTINATION
"${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}d/imageformats/"
)
make_directory("${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}d/imageformats")
file(COPY "${BinFile}" DESTINATION "${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}d/imageformats/")
endforeach()
set(COPIED_DEPENDENCIES
TRUE
CACHE BOOL "Dependencies have been copied, set to false to copy again"
FORCE)
CACHE BOOL "Dependencies have been copied, set to false to copy again" FORCE)

View file

@ -155,16 +155,14 @@ endfunction()
function(install_obs_plugin)
obs_status(
DEPRECATION
"The install_obs_plugin command is deprecated and will be removed soon. Use 'setup_plugin_target' instead."
)
"The install_obs_plugin command is deprecated and will be removed soon. Use 'setup_plugin_target' instead.")
_install_obs_plugin(${ARGV})
endfunction()
function(install_obs_datatarget)
obs_status(
DEPRECATION
"The install_obs_datatarget function is deprecated and will be removed soon. Use 'setup_target_resources' instead."
)
"The install_obs_datatarget function is deprecated and will be removed soon. Use 'setup_target_resources' instead.")
_install_obs_datatarget(${ARGV})
endfunction()
@ -176,10 +174,7 @@ endfunction()
function(__deprecated_feature VAR ACCESS)
if(ACCESS STREQUAL "UNKNOWN_READ_ACCESS")
obs_status(
DEPRECATION
"The feature enabled by '${VAR}' is deprecated and will soon be removed from OBS."
)
obs_status(DEPRECATION "The feature enabled by '${VAR}' is deprecated and will soon be removed from OBS.")
endif()
endfunction()

View file

@ -48,12 +48,9 @@ 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]*$")
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_RELEASE[ \t]+([0-9]+).*" "\\1"
_version_release "${_version_string}")
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_RELEASE[ \t]+([0-9]+).*" "\\1" _version_release "${_version_string}")
set(AMF_VERSION "${_version_major}.${_version_minor}.${_version_release}")
unset(_version_major)
@ -67,11 +64,9 @@ else()
endif()
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin|Windows")
set(AMF_ERROR_REASON
"Ensure that obs-deps is provided as part of CMAKE_PREFIX_PATH.")
set(AMF_ERROR_REASON "Ensure that obs-deps is provided as part of CMAKE_PREFIX_PATH.")
elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|FreeBSD")
set(AMF_ERROR_REASON
"Ensure AMF headers are available in local library paths.")
set(AMF_ERROR_REASON "Ensure AMF headers are available in local library paths.")
endif()
find_package_handle_standard_args(
@ -84,8 +79,7 @@ unset(AMF_ERROR_REASON)
if(AMF_FOUND)
if(NOT TARGET AMF::AMF)
add_library(AMF::AMF INTERFACE IMPORTED)
set_target_properties(AMF::AMF PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${AMF_INCLUDE_DIR}")
set_target_properties(AMF::AMF PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${AMF_INCLUDE_DIR}")
endif()
endif()

View file

@ -53,19 +53,11 @@ find_path(
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,11 +66,9 @@ else()
endif()
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin|Windows")
set(Asio_ERROR_REASON
"Ensure that obs-deps is provided as part of CMAKE_PREFIX_PATH.")
set(Asio_ERROR_REASON "Ensure that obs-deps is provided as part of CMAKE_PREFIX_PATH.")
elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|FreeBSD")
set(Asio_ERROR_REASON
"Ensure Asio library is available in local include paths.")
set(Asio_ERROR_REASON "Ensure Asio library is available in local include paths.")
endif()
find_package_handle_standard_args(
@ -91,8 +81,7 @@ unset(Asio_ERROR_REASON)
if(Asio_FOUND)
if(NOT TARGET Asio::Asio)
add_library(Asio::Asio INTERFACE IMPORTED)
set_target_properties(Asio::Asio PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${Asio_INCLUDE_DIR}")
set_target_properties(Asio::Asio PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${Asio_INCLUDE_DIR}")
endif()
endif()

View file

@ -8,8 +8,7 @@ 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"
)
"Please download a CEF distribution for your appropriate architecture and specify CEF_ROOT_DIR to its location")
endif()
find_path(CEF_INCLUDE_DIR "include/cef_version.h" HINTS ${CEF_ROOT_DIR})
@ -25,10 +24,8 @@ if(OS_MACOS)
CEFWRAPPER_LIBRARY
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)
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)
elseif(OS_POSIX)
find_library(
@ -41,8 +38,7 @@ elseif(OS_POSIX)
CEFWRAPPER_LIBRARY
NAMES libcef_dll_wrapper.a
NO_DEFAULT_PATH
PATHS ${CEF_ROOT_DIR}/build/libcef_dll_wrapper
${CEF_ROOT_DIR}/libcef_dll_wrapper)
PATHS ${CEF_ROOT_DIR}/build/libcef_dll_wrapper ${CEF_ROOT_DIR}/libcef_dll_wrapper)
else()
find_library(
@ -53,43 +49,32 @@ else()
find_library(
CEFWRAPPER_LIBRARY
NAMES cef_dll_wrapper libcef_dll_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)
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)
if(OS_WINDOWS)
find_library(
CEFWRAPPER_LIBRARY_DEBUG
NAMES cef_dll_wrapper libcef_dll_wrapper
PATHS ${CEF_ROOT_DIR}/build/libcef_dll/Debug
${CEF_ROOT_DIR}/build/libcef_dll_wrapper/Debug)
PATHS ${CEF_ROOT_DIR}/build/libcef_dll/Debug ${CEF_ROOT_DIR}/build/libcef_dll_wrapper/Debug)
endif()
endif()
mark_as_advanced(CEFWRAPPER_LIBRARY CEFWRAPPER_LIBRARY_DEBUG)
if(NOT CEF_LIBRARY)
message(
WARNING
"Could NOT find Chromium Embedded Framework library (missing: CEF_LIBRARY)"
)
message(WARNING "Could NOT find Chromium Embedded Framework library (missing: CEF_LIBRARY)")
set(CEF_FOUND FALSE)
return()
endif()
if(NOT CEFWRAPPER_LIBRARY)
message(
WARNING
"Could NOT find Chromium Embedded Framework wrapper library (missing: CEFWRAPPER_LIBRARY)"
)
message(WARNING "Could NOT find Chromium Embedded Framework wrapper library (missing: CEFWRAPPER_LIBRARY)")
set(CEF_FOUND FALSE)
return()
endif()
message(
STATUS
"Found Chromium Embedded Framework: ${CEF_LIBRARY};${CEF_WRAPPER_LIBRARY}")
message(STATUS "Found Chromium Embedded Framework: ${CEF_LIBRARY};${CEF_WRAPPER_LIBRARY}")
if(OS_WINDOWS)
set(CEF_LIBRARIES ${CEF_LIBRARY} ${CEFWRAPPER_LIBRARY})
@ -108,8 +93,7 @@ else()
endif()
endif()
find_package_handle_standard_args(CEF DEFAULT_MSG CEF_LIBRARY
CEFWRAPPER_LIBRARY CEF_INCLUDE_DIR)
find_package_handle_standard_args(CEF DEFAULT_MSG CEF_LIBRARY CEFWRAPPER_LIBRARY CEF_INCLUDE_DIR)
mark_as_advanced(CEF_LIBRARY CEF_WRAPPER_LIBRARY CEF_LIBRARIES CEF_INCLUDE_DIR)
@ -118,35 +102,27 @@ if(NOT TARGET CEF::Wrapper)
add_library(CEF::Wrapper UNKNOWN IMPORTED)
add_library(CEF::Library UNKNOWN IMPORTED)
set_target_properties(CEF::Wrapper PROPERTIES IMPORTED_LOCATION
${CEFWRAPPER_LIBRARY})
set_target_properties(CEF::Wrapper PROPERTIES IMPORTED_LOCATION ${CEFWRAPPER_LIBRARY})
set_target_properties(CEF::Library PROPERTIES IMPORTED_LOCATION
${CEF_LIBRARY})
set_target_properties(CEF::Library PROPERTIES IMPORTED_LOCATION ${CEF_LIBRARY})
if(DEFINED CEFWRAPPER_LIBRARY_DEBUG)
set_target_properties(CEF::Wrapper PROPERTIES IMPORTED_LOCATION_DEBUG
${CEFWRAPPER_LIBRARY_DEBUG})
set_target_properties(CEF::Wrapper PROPERTIES IMPORTED_LOCATION_DEBUG ${CEFWRAPPER_LIBRARY_DEBUG})
endif()
else()
add_library(CEF::Wrapper INTERFACE IMPORTED)
add_library(CEF::Library INTERFACE IMPORTED)
set_target_properties(CEF::Wrapper PROPERTIES IMPORTED_LIBNAME
${CEFWRAPPER_LIBRARY})
set_target_properties(CEF::Wrapper PROPERTIES IMPORTED_LIBNAME ${CEFWRAPPER_LIBRARY})
set_target_properties(CEF::Library PROPERTIES IMPORTED_LIBNAME
${CEF_LIBRARY})
set_target_properties(CEF::Library PROPERTIES IMPORTED_LIBNAME ${CEF_LIBRARY})
if(DEFINED CEFWRAPPER_LIBRARY_DEBUG)
set_target_properties(CEF::Wrapper PROPERTIES IMPORTED_LIBNAME_DEBUG
${CEFWRAPPER_LIBRARY_DEBUG})
set_target_properties(CEF::Wrapper PROPERTIES IMPORTED_LIBNAME_DEBUG ${CEFWRAPPER_LIBRARY_DEBUG})
endif()
endif()
set_target_properties(CEF::Wrapper PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${CEF_INCLUDE_DIR}")
set_target_properties(CEF::Wrapper PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CEF_INCLUDE_DIR}")
set_target_properties(CEF::Library PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${CEF_INCLUDE_DIR}")
set_target_properties(CEF::Library PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CEF_INCLUDE_DIR}")
endif()

View file

@ -22,16 +22,14 @@ endif()
find_path(
DETOURS_INCLUDE_DIR
NAMES detours.h
HINTS ENV DETOURS_PATH ${DETOURS_PATH} ${CMAKE_SOURCE_DIR}/${DETOURS_PATH}
${_DETOURS_INCLUDE_DIRS}
HINTS ENV DETOURS_PATH ${DETOURS_PATH} ${CMAKE_SOURCE_DIR}/${DETOURS_PATH} ${_DETOURS_INCLUDE_DIRS}
PATHS /usr/include /usr/local/include /opt/local/include /sw/include
PATH_SUFFIXES include)
find_library(
DETOURS_LIB
NAMES ${_DETOURS_LIBRARIES} detours
HINTS ENV DETOURS_PATH ${DETOURS_PATH} ${CMAKE_SOURCE_DIR}/${DETOURS_PATH}
${_DETOURS_LIBRARY_DIRS}
HINTS ENV DETOURS_PATH ${DETOURS_PATH} ${CMAKE_SOURCE_DIR}/${DETOURS_PATH} ${_DETOURS_LIBRARY_DIRS}
PATHS /usr/lib /usr/local/lib /opt/local/lib /sw/lib
PATH_SUFFIXES
lib${_lib_suffix}
@ -48,8 +46,7 @@ find_library(
../bin)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Detours DEFAULT_MSG DETOURS_LIB
DETOURS_INCLUDE_DIR)
find_package_handle_standard_args(Detours DEFAULT_MSG DETOURS_LIB DETOURS_INCLUDE_DIR)
mark_as_advanced(DETOURS_INCLUDE_DIR DETOURS_LIB)
if(DETOURS_FOUND)
@ -59,17 +56,13 @@ if(DETOURS_FOUND)
if(NOT TARGET Detours::Detours)
if(IS_ABSOLUTE "${DETOURS_LIBRARIES}")
add_library(Detours::Detours UNKNOWN IMPORTED)
set_target_properties(Detours::Detours PROPERTIES IMPORTED_LOCATION
"${DETOURS_LIBRARIES}")
set_target_properties(Detours::Detours PROPERTIES IMPORTED_LOCATION "${DETOURS_LIBRARIES}")
else()
add_library(Detours::Detours INTERFACE IMPORTED)
set_target_properties(Detours::Detours PROPERTIES IMPORTED_LIBNAME
"${DETOURS_LIBRARIES}")
set_target_properties(Detours::Detours PROPERTIES IMPORTED_LIBNAME "${DETOURS_LIBRARIES}")
endif()
set_target_properties(
Detours::Detours PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${DETOURS_INCLUDE_DIRS}")
set_target_properties(Detours::Detours PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${DETOURS_INCLUDE_DIRS}")
endif()
endif()

View file

@ -1,3 +1,4 @@
# cmake-format: off
#
# This module defines the following variables:
#
@ -17,6 +18,7 @@
# FFMPEG_<component>_VERSION_MICRO - The components micro version
#
# <component> is the uppercase name of the component
# cmake-format: on
find_package(PkgConfig QUIET)
@ -42,16 +44,14 @@ function(find_ffmpeg_library component header)
find_path(
FFMPEG_${component}_INCLUDE_DIR
NAMES "lib${component}/${header}" "lib${component}/version.h"
HINTS ENV FFMPEG_PATH ${FFMPEG_PATH} ${CMAKE_SOURCE_DIR}/${FFMPEG_PATH}
${PC_FFMPEG_${component}_INCLUDE_DIRS}
HINTS ENV FFMPEG_PATH ${FFMPEG_PATH} ${CMAKE_SOURCE_DIR}/${FFMPEG_PATH} ${PC_FFMPEG_${component}_INCLUDE_DIRS}
PATHS /usr/include /usr/local/include /opt/local/include /sw/include
PATH_SUFFIXES ffmpeg libav include)
find_library(
FFMPEG_${component}_LIBRARY
NAMES "${component}" "lib${component}"
HINTS ENV FFMPEG_PATH ${FFMPEG_PATH} ${CMAKE_SOURCE_DIR}/${FFMPEG_PATH}
${PC_FFMPEG_${component}_LIBRARY_DIRS}
HINTS ENV FFMPEG_PATH ${FFMPEG_PATH} ${CMAKE_SOURCE_DIR}/${FFMPEG_PATH} ${PC_FFMPEG_${component}_LIBRARY_DIRS}
PATHS /usr/lib /usr/local/lib /opt/local/lib /sw/lib
PATH_SUFFIXES
lib${_lib_suffix}
@ -102,14 +102,10 @@ function(find_ffmpeg_library component header)
set(_vfile "${FFMPEG_${component}_INCLUDE_DIR}/lib${component}/version.h")
if(EXISTS "${_vfile}")
file(STRINGS "${_vfile}" _version_parse
REGEX "^.*VERSION_(MAJOR|MINOR|MICRO)[ \t]+[0-9]+[ \t]*$")
string(REGEX REPLACE ".*VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" _major
"${_version_parse}")
string(REGEX REPLACE ".*VERSION_MINOR[ \t]+([0-9]+).*" "\\1" _minor
"${_version_parse}")
string(REGEX REPLACE ".*VERSION_MICRO[ \t]+([0-9]+).*" "\\1" _micro
"${_version_parse}")
file(STRINGS "${_vfile}" _version_parse REGEX "^.*VERSION_(MAJOR|MINOR|MICRO)[ \t]+[0-9]+[ \t]*$")
string(REGEX REPLACE ".*VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" _major "${_version_parse}")
string(REGEX REPLACE ".*VERSION_MINOR[ \t]+([0-9]+).*" "\\1" _minor "${_version_parse}")
string(REGEX REPLACE ".*VERSION_MICRO[ \t]+([0-9]+).*" "\\1" _micro "${_version_parse}")
set(FFMPEG_${component_u}_VERSION_MAJOR
"${_major}"
@ -168,8 +164,7 @@ include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
FFmpeg
FOUND_VAR FFMPEG_FOUND
REQUIRED_VARS FFMPEG_${_first_comp}_LIBRARIES
FFMPEG_${_first_comp}_INCLUDE_DIRS
REQUIRED_VARS FFMPEG_${_first_comp}_LIBRARIES FFMPEG_${_first_comp}_INCLUDE_DIRS
VERSION_VAR FFMPEG_${_first_comp}_VERSION_STRING
HANDLE_COMPONENTS)
@ -180,20 +175,14 @@ if(FFMPEG_FOUND)
if(FFMPEG_${component_u}_FOUND)
if(IS_ABSOLUTE "${FFMPEG_${component_u}_LIBRARIES}")
add_library(FFmpeg::${component} UNKNOWN IMPORTED)
set_target_properties(
FFmpeg::${component}
PROPERTIES IMPORTED_LOCATION "${FFMPEG_${component_u}_LIBRARIES}")
set_target_properties(FFmpeg::${component} PROPERTIES IMPORTED_LOCATION "${FFMPEG_${component_u}_LIBRARIES}")
else()
add_library(FFmpeg::${component} INTERFACE IMPORTED)
set_target_properties(
FFmpeg::${component}
PROPERTIES IMPORTED_LIBNAME "${FFMPEG_${component_u}_LIBRARIES}")
set_target_properties(FFmpeg::${component} PROPERTIES IMPORTED_LIBNAME "${FFMPEG_${component_u}_LIBRARIES}")
endif()
set_target_properties(
FFmpeg::${component}
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${FFMPEG_${component_u}_INCLUDE_DIRS}")
set_target_properties(FFmpeg::${component} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${FFMPEG_${component_u}_INCLUDE_DIRS}")
endif()
endif()
endforeach()

View file

@ -1,3 +1,4 @@
# cmake-format: off
# * Try to find Gio Once done this will define
#
# GIO_FOUND - system has Gio GIO_INCLUDE_DIRS - the Gio include directory
@ -6,6 +7,7 @@
# Use pkg-config to get the directories and then use these values in the
# find_path() and find_library() calls
# cmake-format: on
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
@ -36,17 +38,14 @@ if(GIO_FOUND)
if(NOT TARGET GIO::GIO)
if(IS_ABSOLUTE "${GIO_LIBRARIES}")
add_library(GIO::GIO UNKNOWN IMPORTED)
set_target_properties(GIO::GIO PROPERTIES IMPORTED_LOCATION
"${GIO_LIBRARIES}")
set_target_properties(GIO::GIO PROPERTIES IMPORTED_LOCATION "${GIO_LIBRARIES}")
else()
add_library(GIO::GIO INTERFACE IMPORTED)
set_target_properties(GIO::GIO PROPERTIES IMPORTED_LIBNAME
"${GIO_LIBRARIES}")
set_target_properties(GIO::GIO PROPERTIES IMPORTED_LIBNAME "${GIO_LIBRARIES}")
endif()
# Special case for gio, as both the
set_target_properties(GIO::GIO PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${_GIO_INCLUDE_DIRS}")
set_target_properties(GIO::GIO PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${_GIO_INCLUDE_DIRS}")
target_compile_options(GIO::GIO INTERFACE ${_GIO_CFLAGS})
endif()

View file

@ -1,3 +1,4 @@
# cmake-format: off
# * Try to find jack-2.6 Once done this will define
#
# JACK_FOUND - system has jack JACK_INCLUDE_DIRS - the jack include directory
@ -10,13 +11,13 @@
# Redistribution and use is allowed according to the terms of the New BSD
# license. For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
# cmake-format: on
if(JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
# in cache already
set(JACK_FOUND TRUE)
else(JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
# use pkg-config to get the directories and then use these values in the
# FIND_PATH() and FIND_LIBRARY() calls
# use pkg-config to get the directories and then use these values in the FIND_PATH() and FIND_LIBRARY() calls
if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
include(UsePkgConfig)
pkgconfig(jack _JACK_INCLUDEDIR _JACK_LIBDIR _JACK_LDFLAGS _JACK_CFLAGS)
@ -29,8 +30,7 @@ else(JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
find_path(
JACK_INCLUDE_DIR
NAMES jack/jack.h
PATHS ${_JACK_INCLUDE_DIRS} /usr/include /usr/local/include
/opt/local/include /sw/include)
PATHS ${_JACK_INCLUDE_DIRS} /usr/include /usr/local/include /opt/local/include /sw/include)
find_library(
JACK_LIBRARY
@ -54,16 +54,13 @@ else(JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
if(NOT TARGET Jack::Jack)
if(IS_ABSOLUTE "${JACK_LIBRARIES}")
add_library(Jack::Jack UNKNOWN IMPORTED)
set_target_properties(Jack::Jack PROPERTIES IMPORTED_LOCATION
"${JACK_LIBRARIES}")
set_target_properties(Jack::Jack PROPERTIES IMPORTED_LOCATION "${JACK_LIBRARIES}")
else()
add_library(Jack::Jack INTERFACE IMPORTED)
set_target_properties(Jack::Jack PROPERTIES IMPORTED_LIBNAME
"${JACK_LIBRARIES}")
set_target_properties(Jack::Jack PROPERTIES IMPORTED_LIBNAME "${JACK_LIBRARIES}")
endif()
set_target_properties(Jack::Jack PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${JACK_INCLUDE_DIRS}")
set_target_properties(Jack::Jack PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${JACK_INCLUDE_DIRS}")
endif()
else(JACK_FOUND)
if(JACK_FIND_REQUIRED)
@ -71,8 +68,7 @@ else(JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
endif(JACK_FIND_REQUIRED)
endif(JACK_FOUND)
# show the JACK_INCLUDE_DIRS and JACK_LIBRARIES variables only in the advanced
# view
# show the JACK_INCLUDE_DIRS and JACK_LIBRARIES variables only in the advanced view
mark_as_advanced(JACK_INCLUDE_DIRS JACK_LIBRARIES)
endif(JACK_LIBRARIES AND JACK_INCLUDE_DIRS)

View file

@ -16,15 +16,13 @@ endif()
find_path(
Jansson_INCLUDE_DIR
NAMES jansson.h
HINTS ENV JANSSON_PATH ${JANSSON_PATH} ${CMAKE_SOURCE_DIR}/${JANSSON_PATH}
${_JANSSON_INCLUDE_DIRS}
HINTS ENV JANSSON_PATH ${JANSSON_PATH} ${CMAKE_SOURCE_DIR}/${JANSSON_PATH} ${_JANSSON_INCLUDE_DIRS}
PATHS /usr/include /usr/local/include /opt/local/include /sw/include)
find_library(
Jansson_LIB
NAMES ${_JANSSON_LIBRARIES} jansson libjansson
HINTS ENV JANSSON_PATH ${JANSSON_PATH} ${CMAKE_SOURCE_DIR}/${JANSSON_PATH}
${_JANSSON_LIBRARY_DIRS}
HINTS ENV JANSSON_PATH ${JANSSON_PATH} ${CMAKE_SOURCE_DIR}/${JANSSON_PATH} ${_JANSSON_LIBRARY_DIRS}
PATHS /usr/lib /usr/local/lib /opt/local/lib /sw/lib
PATH_SUFFIXES
lib${_lib_suffix}
@ -45,10 +43,9 @@ if(JANSSON_VERSION)
elseif(_JANSSON_FOUND AND _JANSSON_VERSION)
set(_JANSSON_VERSION_STRING "${_JANSSON_VERSION}")
elseif(EXISTS "${Jansson_INCLUDE_DIR}/jansson.h")
file(STRINGS "${Jansson_INCLUDE_DIR}/jansson.h" _jansson_version_parse
REGEX "#define[ \t]+JANSSON_VERSION[ \t]+.+")
string(REGEX REPLACE ".*#define[ \t]+JANSSON_VERSION[ \t]+\"(.+)\".*" "\\1"
_JANSSON_VERSION_STRING "${_jansson_version_parse}")
file(STRINGS "${Jansson_INCLUDE_DIR}/jansson.h" _jansson_version_parse REGEX "#define[ \t]+JANSSON_VERSION[ \t]+.+")
string(REGEX REPLACE ".*#define[ \t]+JANSSON_VERSION[ \t]+\"(.+)\".*" "\\1" _JANSSON_VERSION_STRING
"${_jansson_version_parse}")
else()
if(NOT Jansson_FIND_QUIETLY)
message(WARNING "Failed to find Jansson version")
@ -72,16 +69,12 @@ if(JANSSON_FOUND)
if(NOT TARGET Jansson::Jansson)
if(IS_ABSOLUTE "${JANSSON_LIBRARIES}")
add_library(Jansson::Jansson UNKNOWN IMPORTED GLOBAL)
set_target_properties(Jansson::Jansson PROPERTIES IMPORTED_LOCATION
"${JANSSON_LIBRARIES}")
set_target_properties(Jansson::Jansson PROPERTIES IMPORTED_LOCATION "${JANSSON_LIBRARIES}")
else()
add_library(Jansson::Jansson INTERFACE IMPORTED GLOBAL)
set_target_properties(Jansson::Jansson PROPERTIES IMPORTED_LIBNAME
"${JANSSON_LIBRARIES}")
set_target_properties(Jansson::Jansson PROPERTIES IMPORTED_LIBNAME "${JANSSON_LIBRARIES}")
endif()
set_target_properties(
Jansson::Jansson PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${JANSSON_INCLUDE_DIRS}")
set_target_properties(Jansson::Jansson PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${JANSSON_INCLUDE_DIRS}")
endif()
endif()

View file

@ -95,16 +95,14 @@ find_library(
../bin)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LibAJANTV2 DEFAULT_MSG
AJA_LIBRARIES_INCLUDE_DIR AJA_NTV2_LIB)
find_package_handle_standard_args(LibAJANTV2 DEFAULT_MSG AJA_LIBRARIES_INCLUDE_DIR AJA_NTV2_LIB)
mark_as_advanced(AJA_LIBRARIES_INCLUDE_DIR AJA_NTV2_LIB)
if(LIBAJANTV2_FOUND)
set(AJA_LIBRARIES_INCLUDE_DIR ${AJA_LIBRARIES_INCLUDE_DIR}/ajalibraries)
set(AJA_LIBRARIES_INCLUDE_DIRS
${AJA_LIBRARIES_INCLUDE_DIR} ${AJA_LIBRARIES_INCLUDE_DIR}/ajaanc
${AJA_LIBRARIES_INCLUDE_DIR}/ajabase ${AJA_LIBRARIES_INCLUDE_DIR}/ajantv2
${AJA_LIBRARIES_INCLUDE_DIR}/ajantv2/includes)
${AJA_LIBRARIES_INCLUDE_DIR} ${AJA_LIBRARIES_INCLUDE_DIR}/ajaanc ${AJA_LIBRARIES_INCLUDE_DIR}/ajabase
${AJA_LIBRARIES_INCLUDE_DIR}/ajantv2 ${AJA_LIBRARIES_INCLUDE_DIR}/ajantv2/includes)
set(LIBAJANTV2_LIBRARIES ${AJA_NTV2_LIB})
if(AJA_NTV2_DEBUG_LIB STREQUAL "AJA_NTV2_DEBUG_LIB-NOTFOUND")
@ -117,35 +115,26 @@ if(LIBAJANTV2_FOUND)
if(NOT TARGET AJA::LibAJANTV2)
if(IS_ABSOLUTE "${LIBAJANTV2_LIBRARIES}")
add_library(AJA::LibAJANTV2 UNKNOWN IMPORTED)
set_target_properties(
AJA::LibAJANTV2 PROPERTIES IMPORTED_LOCATION "${LIBAJANTV2_LIBRARIES}")
set_target_properties(AJA::LibAJANTV2 PROPERTIES IMPORTED_LOCATION "${LIBAJANTV2_LIBRARIES}")
if(DEFINED LIBAJANTV2_DEBUG_LIBRARIES)
set_target_properties(
AJA::LibAJANTV2 PROPERTIES IMPORTED_LOCATION_DEBUG
"${LIBAJANTV2_DEBUG_LIBRARIES}")
set_target_properties(AJA::LibAJANTV2 PROPERTIES IMPORTED_LOCATION_DEBUG "${LIBAJANTV2_DEBUG_LIBRARIES}")
endif()
else()
add_library(AJA::LibAJANTV2 INTERFACE IMPORTED)
set_target_properties(
AJA::LibAJANTV2 PROPERTIES IMPORTED_LIBNAME "${LIBAJANTV2_LIBRARIES}")
set_target_properties(AJA::LibAJANTV2 PROPERTIES IMPORTED_LIBNAME "${LIBAJANTV2_LIBRARIES}")
if(DEFINED LIBAJANTV2_DEBUG_LIBRARIES)
set_target_properties(
AJA::LibAJANTV2 PROPERTIES IMPORTED_LIBNAME_DEBUG
"${LIBAJANTV2_DEBUG_LIBRARIES}")
set_target_properties(AJA::LibAJANTV2 PROPERTIES IMPORTED_LIBNAME_DEBUG "${LIBAJANTV2_DEBUG_LIBRARIES}")
endif()
endif()
set_target_properties(
AJA::LibAJANTV2 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${LIBAJANTV2_INCLUDE_DIRS}")
set_target_properties(AJA::LibAJANTV2 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBAJANTV2_INCLUDE_DIRS}")
target_compile_definitions(
AJA::LibAJANTV2
INTERFACE "$<$<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>")
"$<$<BOOL:${OS_MACOS}>:AJAMac;AJA_MAC>" "$<$<BOOL:${OS_LINUX}>:AJA_LINUX;AJALinux>")
endif()
endif()

View file

@ -1,8 +1,8 @@
# Stripped down version of
# https://gitlab.kitware.com/cmake/cmake/blob/e1409101c99f7a3487990e9927e8bd0e275f564f/Source/Modules/FindLibUUID.cmake
#
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or
# https://cmake.org/licensing for details.
#
# Once done these will be defined:
#
@ -26,9 +26,7 @@ if(LibUUID_FOUND)
set(LibUUID_LIBRARIES ${LibUUID_LIBRARY})
if(NOT TARGET LibUUID::LibUUID)
add_library(LibUUID::LibUUID UNKNOWN IMPORTED)
set_target_properties(
LibUUID::LibUUID
PROPERTIES IMPORTED_LOCATION "${LibUUID_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${LibUUID_INCLUDE_DIRS}")
set_target_properties(LibUUID::LibUUID PROPERTIES IMPORTED_LOCATION "${LibUUID_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${LibUUID_INCLUDE_DIRS}")
endif()
endif()

View file

@ -17,16 +17,14 @@ endif()
find_path(
VLC_INCLUDE_DIR
NAMES libvlc.h
HINTS ENV VLC_PATH ${VLC_PATH} ${CMAKE_SOURCE_DIR}/${VLC_PATH}
${_VLC_INCLUDE_DIRS}
HINTS ENV VLC_PATH ${VLC_PATH} ${CMAKE_SOURCE_DIR}/${VLC_PATH} ${_VLC_INCLUDE_DIRS}
PATHS /usr/include /usr/local/include /opt/local/include /sw/include
PATH_SUFFIXES vlc include/vlc include)
find_library(
VLC_LIB
NAMES ${_VLC_LIBRARIES} VLC libVLC
HINTS ENV VLC_PATH ${VLC_PATH} ${CMAKE_SOURCE_DIR}/${VLC_PATH}
${_VLC_LIBRARY_DIRS}
HINTS ENV VLC_PATH ${VLC_PATH} ${CMAKE_SOURCE_DIR}/${VLC_PATH} ${_VLC_LIBRARY_DIRS}
PATHS /usr/lib /usr/local/lib /opt/local/lib /sw/lib
PATH_SUFFIXES
lib${_lib_suffix}
@ -53,7 +51,6 @@ if(LIBVLC_FOUND)
if(NOT TARGET VLC::LibVLC)
add_library(VLC::LibVLC INTERFACE IMPORTED)
set_target_properties(VLC::LibVLC PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${LIBVLC_INCLUDE_DIRS}")
set_target_properties(VLC::LibVLC PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBVLC_INCLUDE_DIRS}")
endif()
endif()

View file

@ -20,8 +20,7 @@ find_library(
PATHS /usr/lib /usr/local/lib /opt/local/lib)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Libdrm DEFAULT_MSG LIBDRM_LIB
LIBDRM_INCLUDE_DIR)
find_package_handle_standard_args(Libdrm DEFAULT_MSG LIBDRM_LIB LIBDRM_INCLUDE_DIR)
mark_as_advanced(LIBDRM_INCLUDE_DIR LIBDRM_LIB)
if(LIBDRM_FOUND)
@ -30,8 +29,6 @@ if(LIBDRM_FOUND)
if(NOT TARGET Libdrm::Libdrm)
add_library(Libdrm::Libdrm INTERFACE IMPORTED)
set_target_properties(
Libdrm::Libdrm PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${LIBDRM_INCLUDE_DIRS}")
set_target_properties(Libdrm::Libdrm PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBDRM_INCLUDE_DIRS}")
endif()
endif()

View file

@ -20,16 +20,14 @@ endif()
find_path(
Libfdk_INCLUDE_DIR
NAMES fdk-aac/aacenc_lib.h
HINTS ENV LIBFDK_PATH ${LIBFDK_PATH} ${CMAKE_SOURCE_DIR}/${LIBFDK_PATH}
${_LIBFDK_INCLUDE_DIRS}
HINTS ENV LIBFDK_PATH ${LIBFDK_PATH} ${CMAKE_SOURCE_DIR}/${LIBFDK_PATH} ${_LIBFDK_INCLUDE_DIRS}
PATHS /usr/include /usr/local/include /opt/local/include /sw/include
PATH_SUFFIXES include)
find_library(
Libfdk_LIB
NAMES ${_LIBFDK_LIBRARIES} fdk-aac libfdk-aac
HINTS ENV LIBFDK_PATH ${LIBFDK_PATH} ${CMAKE_SOURCE_DIR}/${LIBFDK_PATH}
${_LIBFDK_LIBRARY_DIRS}
HINTS ENV LIBFDK_PATH ${LIBFDK_PATH} ${CMAKE_SOURCE_DIR}/${LIBFDK_PATH} ${_LIBFDK_LIBRARY_DIRS}
PATHS /usr/lib /usr/local/lib /opt/local/lib /sw/lib
PATH_SUFFIXES
lib${_lib_suffix}
@ -46,8 +44,7 @@ find_library(
../bin)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Libfdk DEFAULT_MSG Libfdk_LIB
Libfdk_INCLUDE_DIR)
find_package_handle_standard_args(Libfdk DEFAULT_MSG Libfdk_LIB Libfdk_INCLUDE_DIR)
mark_as_advanced(Libfdk_INCLUDE_DIR Libfdk_LIB)
if(LIBFDK_FOUND)
@ -57,17 +54,13 @@ if(LIBFDK_FOUND)
if(NOT TARGET LibFDK::LibFDK)
if(IS_ABSOLUTE "${LIBFDK_LIBRARIES}")
add_library(LibFDK::LibFDK UNKNOWN IMPORTED)
set_target_properties(LibFDK::LibFDK PROPERTIES IMPORTED_LOCATION
"${LIBFDK_LIBRARIES}")
set_target_properties(LibFDK::LibFDK PROPERTIES IMPORTED_LOCATION "${LIBFDK_LIBRARIES}")
else()
add_library(LibFDK::LibFDK INTERFACE IMPORTED)
set_target_properties(LibFDK::LibFDK PROPERTIES IMPORTED_LIBNAME
"${LIBFDK_LIBRARIES}")
set_target_properties(LibFDK::LibFDK PROPERTIES IMPORTED_LIBNAME "${LIBFDK_LIBRARIES}")
endif()
set_target_properties(
LibFDK::LibFDK PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${LIBFDK_INCLUDE_DIRS}")
set_target_properties(LibFDK::LibFDK PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBFDK_INCLUDE_DIRS}")
endif()
endif()

View file

@ -1,3 +1,4 @@
# cmake-format: off
# * Try to find Libpci Once done this will define
#
# * LIBPCI_FOUND - system has Libpci
@ -7,6 +8,7 @@
# Use pkg-config to get the directories and then use these values in the
# find_path() and find_library() calls
# cmake-format: on
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
@ -27,8 +29,7 @@ find_library(
PATHS /usr/lib /usr/local/lib /opt/local/lib)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Libpci REQUIRED_VARS LIBPCI_LIB
LIBPCI_INCLUDE_DIR)
find_package_handle_standard_args(Libpci REQUIRED_VARS LIBPCI_LIB LIBPCI_INCLUDE_DIR)
mark_as_advanced(LIBPCI_INCLUDE_DIR LIBPCI_LIB)
if(LIBPCI_FOUND)
@ -38,12 +39,10 @@ if(LIBPCI_FOUND)
if(NOT TARGET LIBPCI::LIBPCI)
if(IS_ABSOLUTE "${LIBPCI_LIBRARIES}")
add_library(LIBPCI::LIBPCI UNKNOWN IMPORTED)
set_target_properties(LIBPCI::LIBPCI PROPERTIES IMPORTED_LOCATION
"${LIBPCI_LIBRARIES}")
set_target_properties(LIBPCI::LIBPCI PROPERTIES IMPORTED_LOCATION "${LIBPCI_LIBRARIES}")
else()
add_library(LIBPCI::LIBPCI INTERFACE IMPORTED)
set_target_properties(LIBPCI::LIBPCI PROPERTIES IMPORTED_LIBNAME
"${LIBPCI_LIBRARIES}")
set_target_properties(LIBPCI::LIBPCI PROPERTIES IMPORTED_LIBNAME "${LIBPCI_LIBRARIES}")
endif()
endif()
endif()

View file

@ -20,16 +20,14 @@ endif()
find_path(
LIBRIST_INCLUDE_DIR
NAMES librist.h librist/librist.h
HINTS ENV LIBRIST_PATH ${LIBRIST_PATH} ${CMAKE_SOURCE_DIR}/${LIBRIST_PATH}
${_LIBRIST_INCLUDE_DIRS} ${DepsPath}
HINTS ENV LIBRIST_PATH ${LIBRIST_PATH} ${CMAKE_SOURCE_DIR}/${LIBRIST_PATH} ${_LIBRIST_INCLUDE_DIRS} ${DepsPath}
PATHS /usr/include /usr/local/include /opt/local/include /sw/include
PATH_SUFFIXES include)
find_library(
LIBRIST_LIB
NAMES ${_LIBRIST_LIBRARIES} librist rist
HINTS ENV LIBRIST_PATH ${LIBRIST_PATH} ${CMAKE_SOURCE_DIR}/${LIBRIST_PATH}
${_LIBRIST_LIBRARY_DIRS} ${DepsPath}
HINTS ENV LIBRIST_PATH ${LIBRIST_PATH} ${CMAKE_SOURCE_DIR}/${LIBRIST_PATH} ${_LIBRIST_LIBRARY_DIRS} ${DepsPath}
PATHS /usr/lib /usr/local/lib /opt/local/lib /sw/lib
PATH_SUFFIXES
lib${_lib_suffix}
@ -46,8 +44,7 @@ find_library(
../bin)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Librist DEFAULT_MSG LIBRIST_LIB
LIBRIST_INCLUDE_DIR)
find_package_handle_standard_args(Librist DEFAULT_MSG LIBRIST_LIB LIBRIST_INCLUDE_DIR)
mark_as_advanced(LIBRIST_INCLUDE_DIR LIBRIST_LIB)
if(LIBRIST_FOUND)
@ -57,17 +54,13 @@ if(LIBRIST_FOUND)
if(NOT TARGET Librist::Librist)
if(IS_ABSOLUTE "${LIBRIST_LIBRARIES}")
add_library(Librist::Librist UNKNOWN IMPORTED)
set_target_properties(Librist::Librist PROPERTIES IMPORTED_LOCATION
"${LIBRIST_LIBRARIES}")
set_target_properties(Librist::Librist PROPERTIES IMPORTED_LOCATION "${LIBRIST_LIBRARIES}")
else()
add_library(Librist::Librist INTERFACE IMPORTED)
set_target_properties(Librist::Librist PROPERTIES IMPORTED_LIBNAME
"${LIBRIST_LIBRARIES}")
set_target_properties(Librist::Librist PROPERTIES IMPORTED_LIBNAME "${LIBRIST_LIBRARIES}")
endif()
set_target_properties(
Librist::Librist PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${LIBRIST_INCLUDE_DIRS}")
set_target_properties(Librist::Librist PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBRIST_INCLUDE_DIRS}")
endif()
else()
message(STATUS "librist library not found")

View file

@ -20,16 +20,14 @@ endif()
find_path(
RNNOISE_INCLUDE_DIR
NAMES rnnoise.h
HINTS ENV RNNOISE_PATH ${RNNOISE_PATH} ${CMAKE_SOURCE_DIR}/${RNNOISE_PATH}
${_RNNOISE_INCLUDE_DIRS}
HINTS ENV RNNOISE_PATH ${RNNOISE_PATH} ${CMAKE_SOURCE_DIR}/${RNNOISE_PATH} ${_RNNOISE_INCLUDE_DIRS}
PATHS /usr/include /usr/local/include /opt/local/include /sw/include
PATH_SUFFIXES include)
find_library(
RNNOISE_LIB
NAMES ${_RNNOISE_LIBRARIES} rnnoise
HINTS ENV RNNOISE_PATH ${RNNOISE_PATH} ${CMAKE_SOURCE_DIR}/${RNNOISE_PATH}
${_RNNOISE_LIBRARY_DIRS}
HINTS ENV RNNOISE_PATH ${RNNOISE_PATH} ${CMAKE_SOURCE_DIR}/${RNNOISE_PATH} ${_RNNOISE_LIBRARY_DIRS}
PATHS /usr/lib /usr/local/lib /opt/local/lib /sw/lib
PATH_SUFFIXES
lib${_lib_suffix}
@ -46,8 +44,7 @@ find_library(
../bin)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Librnnoise DEFAULT_MSG RNNOISE_LIB
RNNOISE_INCLUDE_DIR)
find_package_handle_standard_args(Librnnoise DEFAULT_MSG RNNOISE_LIB RNNOISE_INCLUDE_DIR)
mark_as_advanced(RNNOISE_INCLUDE_DIR RNNOISE_LIB)
if(LIBRNNOISE_FOUND)
@ -57,18 +54,12 @@ if(LIBRNNOISE_FOUND)
if(NOT TARGET Librnnoise::Librnnoise)
if(IS_ABSOLUTE "${LIBRNNOISE_LIBRARIES}")
add_library(Librnnoise::Librnnoise UNKNOWN IMPORTED)
set_target_properties(
Librnnoise::Librnnoise PROPERTIES IMPORTED_LOCATION
"${LIBRNNOISE_LIBRARIES}")
set_target_properties(Librnnoise::Librnnoise PROPERTIES IMPORTED_LOCATION "${LIBRNNOISE_LIBRARIES}")
else()
add_library(Librnnoise::Librnnoise INTERFACE IMPORTED)
set_target_properties(
Librnnoise::Librnnoise PROPERTIES IMPORTED_LIBNAME
"${LIBRNNOISE_LIBRARIES}")
set_target_properties(Librnnoise::Librnnoise PROPERTIES IMPORTED_LIBNAME "${LIBRNNOISE_LIBRARIES}")
endif()
set_target_properties(
Librnnoise::Librnnoise PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${LIBRNNOISE_INCLUDE_DIRS}")
set_target_properties(Librnnoise::Librnnoise PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBRNNOISE_INCLUDE_DIRS}")
endif()
endif()

View file

@ -20,16 +20,14 @@ endif()
find_path(
SPEEXDSP_INCLUDE_DIR
NAMES speex/speex_preprocess.h
HINTS ENV SPEEX_PATH ${SPEEX_PATH} ${CMAKE_SOURCE_DIR}/${SPEEX_PATH}
${_SPEEXDSP_INCLUDE_DIRS}
HINTS ENV SPEEX_PATH ${SPEEX_PATH} ${CMAKE_SOURCE_DIR}/${SPEEX_PATH} ${_SPEEXDSP_INCLUDE_DIRS}
PATHS /usr/include /usr/local/include /opt/local/include /sw/include
PATH_SUFFIXES include)
find_library(
SPEEXDSP_LIB
NAMES ${_SPEEXDSP_LIBRARIES} speexdsp libspeexdsp
HINTS ENV SPEEX_PATH ${SPEEX_PATH} ${CMAKE_SOURCE_DIR}/${SPEEX_PATH}
${_SPEEXDSP_LIBRARY_DIRS}
HINTS ENV SPEEX_PATH ${SPEEX_PATH} ${CMAKE_SOURCE_DIR}/${SPEEX_PATH} ${_SPEEXDSP_LIBRARY_DIRS}
PATHS /usr/lib /usr/local/lib /opt/local/lib /sw/lib
PATH_SUFFIXES
lib${_lib_suffix}
@ -46,8 +44,7 @@ find_library(
../bin)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Libspeexdsp DEFAULT_MSG SPEEXDSP_LIB
SPEEXDSP_INCLUDE_DIR)
find_package_handle_standard_args(Libspeexdsp DEFAULT_MSG SPEEXDSP_LIB SPEEXDSP_INCLUDE_DIR)
mark_as_advanced(SPEEXDSP_INCLUDE_DIR SPEEXDSP_LIB)
if(LIBSPEEXDSP_FOUND)
@ -57,18 +54,13 @@ if(LIBSPEEXDSP_FOUND)
if(NOT TARGET LibspeexDSP::LibspeexDSP)
if(IS_ABSOLUTE "${LIBSPEEXDSP_LIBRARIES}")
add_library(LibspeexDSP::LibspeexDSP UNKNOWN IMPORTED)
set_target_properties(
LibspeexDSP::LibspeexDSP PROPERTIES IMPORTED_LOCATION
"${LIBSPEEXDSP_LIBRARIES}")
set_target_properties(LibspeexDSP::LibspeexDSP PROPERTIES IMPORTED_LOCATION "${LIBSPEEXDSP_LIBRARIES}")
else()
add_library(LibspeexDSP::LibspeexDSP INTERFACE IMPORTED)
set_target_properties(
LibspeexDSP::LibspeexDSP PROPERTIES IMPORTED_LIBNAME
"${LIBSPEEXDSP_LIBRARIES}")
set_target_properties(LibspeexDSP::LibspeexDSP PROPERTIES IMPORTED_LIBNAME "${LIBSPEEXDSP_LIBRARIES}")
endif()
set_target_properties(
LibspeexDSP::LibspeexDSP PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${LIBSPEEXDSP_INCLUDE_DIRS}")
set_target_properties(LibspeexDSP::LibspeexDSP PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${LIBSPEEXDSP_INCLUDE_DIRS}")
endif()
endif()

View file

@ -20,16 +20,14 @@ endif()
find_path(
LIBSRT_INCLUDE_DIR
NAMES srt.h srt/srt.h
HINTS ENV LIBSRT_PATH ${LIBSRT_PATH} ${CMAKE_SOURCE_DIR}/${LIBSRT_PATH}
${_LIBSRT_INCLUDE_DIRS} ${DepsPath}
HINTS ENV LIBSRT_PATH ${LIBSRT_PATH} ${CMAKE_SOURCE_DIR}/${LIBSRT_PATH} ${_LIBSRT_INCLUDE_DIRS} ${DepsPath}
PATHS /usr/include /usr/local/include /opt/local/include /sw/include
PATH_SUFFIXES include)
find_library(
LIBSRT_LIB
NAMES ${_LIBSRT_LIBRARIES} srt libsrt
HINTS ENV LIBSRT_PATH ${LIBSRT_PATH} ${CMAKE_SOURCE_DIR}/${LIBSRT_PATH}
${_LIBSRT_LIBRARY_DIRS} ${DepsPath}
HINTS ENV LIBSRT_PATH ${LIBSRT_PATH} ${CMAKE_SOURCE_DIR}/${LIBSRT_PATH} ${_LIBSRT_LIBRARY_DIRS} ${DepsPath}
PATHS /usr/lib /usr/local/lib /opt/local/lib /sw/lib
PATH_SUFFIXES
lib${_lib_suffix}
@ -46,8 +44,7 @@ find_library(
../bin)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Libsrt DEFAULT_MSG LIBSRT_LIB
LIBSRT_INCLUDE_DIR)
find_package_handle_standard_args(Libsrt DEFAULT_MSG LIBSRT_LIB LIBSRT_INCLUDE_DIR)
mark_as_advanced(LIBSRT_INCLUDE_DIR LIBSRT_LIB)
if(LIBSRT_FOUND)
@ -57,17 +54,13 @@ if(LIBSRT_FOUND)
if(NOT TARGET Libsrt::Libsrt)
if(IS_ABSOLUTE "${LIBSRT_LIBRARIES}")
add_library(Libsrt::Libsrt UNKNOWN IMPORTED)
set_target_properties(Libsrt::Libsrt PROPERTIES IMPORTED_LOCATION
"${LIBSRT_LIBRARIES}")
set_target_properties(Libsrt::Libsrt PROPERTIES IMPORTED_LOCATION "${LIBSRT_LIBRARIES}")
else()
add_library(Libsrt::Libsrt INTERFACE IMPORTED)
set_target_properties(Libsrt::Libsrt PROPERTIES IMPORTED_LIBNAME
"${LIBSRT_LIBRARIES}")
set_target_properties(Libsrt::Libsrt PROPERTIES IMPORTED_LIBNAME "${LIBSRT_LIBRARIES}")
endif()
set_target_properties(
Libsrt::Libsrt PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${LIBSRT_INCLUDE_DIRS}")
set_target_properties(Libsrt::Libsrt PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBSRT_INCLUDE_DIRS}")
endif()
else()
message(STATUS "libsrt library not found")

View file

@ -30,16 +30,12 @@ if(LIBV4L2_FOUND)
if(NOT TARGET LIB4L2::LIB4L2)
if(IS_ABSOLUTE "${LIBV4L2_LIBRARIES}")
add_library(LIB4L2::LIB4L2 UNKNOWN IMPORTED)
set_target_properties(LIB4L2::LIB4L2 PROPERTIES IMPORTED_LOCATION
"${LIBV4L2_LIBRARIES}")
set_target_properties(LIB4L2::LIB4L2 PROPERTIES IMPORTED_LOCATION "${LIBV4L2_LIBRARIES}")
else()
add_library(LIB4L2::LIB4L2 INTERFACE IMPORTED)
set_target_properties(LIB4L2::LIB4L2 PROPERTIES IMPORTED_LIBNAME
"${LIBV4L2_LIBRARIES}")
set_target_properties(LIB4L2::LIB4L2 PROPERTIES IMPORTED_LIBNAME "${LIBV4L2_LIBRARIES}")
endif()
set_target_properties(
LIB4L2::LIB4L2 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${LIBV4L2_INCLUDE_DIRS}")
set_target_properties(LIB4L2::LIB4L2 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBV4L2_INCLUDE_DIRS}")
endif()
endif()

View file

@ -1,3 +1,4 @@
# cmake-format: off
#
# This module defines the following variables:
#
@ -8,6 +9,7 @@
# Use pkg-config to get the directories and then use these values in the
# find_path() and find_library() calls
# cmake-format: on
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
@ -34,8 +36,7 @@ find_library(
PATHS /usr/lib /usr/local/lib /opt/local/lib)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Libva REQUIRED_VARS LIBVA_INCLUDE_DIR
LIBVA_LIB LIBVA_DRM_LIB)
find_package_handle_standard_args(Libva REQUIRED_VARS LIBVA_INCLUDE_DIR LIBVA_LIB LIBVA_DRM_LIB)
mark_as_advanced(LIBVA_INCLUDE_DIR LIBVA_LIB LIBVA_DRM_LIB)
if(LIBVA_FOUND)
@ -46,30 +47,24 @@ if(LIBVA_FOUND)
if(NOT TARGET Libva::va)
if(IS_ABSOLUTE "${LIBVA_LIBRARIES}")
add_library(Libva::va UNKNOWN IMPORTED)
set_target_properties(Libva::va PROPERTIES IMPORTED_LOCATION
"${LIBVA_LIBRARIES}")
set_target_properties(Libva::va PROPERTIES IMPORTED_LOCATION "${LIBVA_LIBRARIES}")
else()
add_library(Libva::va INTERFACE IMPORTED)
set_target_properties(Libva::va PROPERTIES IMPORTED_LIBNAME
"${LIBVA_LIBRARIES}")
set_target_properties(Libva::va PROPERTIES IMPORTED_LIBNAME "${LIBVA_LIBRARIES}")
endif()
set_target_properties(Libva::va PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${LIBVA_INCLUDE_DIRS}")
set_target_properties(Libva::va PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBVA_INCLUDE_DIRS}")
endif()
if(NOT TARGET Libva::drm)
if(IS_ABSOLUTE "${LIBVA_DRM_LIBRARIES}")
add_library(Libva::drm UNKNOWN IMPORTED)
set_target_properties(Libva::drm PROPERTIES IMPORTED_LOCATION
"${LIBVA_DRM_LIBRARIES}")
set_target_properties(Libva::drm PROPERTIES IMPORTED_LOCATION "${LIBVA_DRM_LIBRARIES}")
else()
add_library(Libva::drm INTERFACE IMPORTED)
set_target_properties(Libva::drm PROPERTIES IMPORTED_LIBNAME
"${LIBVA_DRM_LIBRARIES}")
set_target_properties(Libva::drm PROPERTIES IMPORTED_LIBNAME "${LIBVA_DRM_LIBRARIES}")
endif()
set_target_properties(Libva::drm PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${LIBVA_INCLUDE_DIRS}")
set_target_properties(Libva::drm PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBVA_INCLUDE_DIRS}")
endif()
endif()

View file

@ -20,16 +20,14 @@ endif()
find_path(
X264_INCLUDE_DIR
NAMES x264.h
HINTS ENV X264_PATH ${X264_PATH} ${CMAKE_SOURCE_DIR}/${X264_PATH}
${_X264_INCLUDE_DIRS}
HINTS ENV X264_PATH ${X264_PATH} ${CMAKE_SOURCE_DIR}/${X264_PATH} ${_X264_INCLUDE_DIRS}
PATHS /usr/include /usr/local/include /opt/local/include /sw/include
PATH_SUFFIXES include)
find_library(
X264_LIB
NAMES ${_X264_LIBRARIES} x264 libx264
HINTS ENV X264_PATH ${X264_PATH} ${CMAKE_SOURCE_DIR}/${X264_PATH}
${_X264_LIBRARY_DIRS}
HINTS ENV X264_PATH ${X264_PATH} ${CMAKE_SOURCE_DIR}/${X264_PATH} ${_X264_LIBRARY_DIRS}
PATHS /usr/lib /usr/local/lib /opt/local/lib /sw/lib
PATH_SUFFIXES
lib${_lib_suffix}
@ -56,16 +54,12 @@ if(LIBX264_FOUND)
if(NOT TARGET LIBX264::LIBX264)
if(IS_ABSOLUTE "${LIBX264_LIBRARIES}")
add_library(LIBX264::LIBX264 UNKNOWN IMPORTED)
set_target_properties(LIBX264::LIBX264 PROPERTIES IMPORTED_LOCATION
"${LIBX264_LIBRARIES}")
set_target_properties(LIBX264::LIBX264 PROPERTIES IMPORTED_LOCATION "${LIBX264_LIBRARIES}")
else()
add_library(LIBX264::LIBX264 INTERFACE IMPORTED)
set_target_properties(LIBX264::LIBX264 PROPERTIES IMPORTED_LIBNAME
"${LIBX264_LIBRARIES}")
set_target_properties(LIBX264::LIBX264 PROPERTIES IMPORTED_LIBNAME "${LIBX264_LIBRARIES}")
endif()
set_target_properties(
LIBX264::LIBX264 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${LIBX264_INCLUDE_DIRS}")
set_target_properties(LIBX264::LIBX264 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBX264_INCLUDE_DIRS}")
endif()
endif()

View file

@ -15,8 +15,7 @@ endif()
find_path(
LUAJIT_INCLUDE_DIR
NAMES lua.h lualib.h
HINTS ENV LUAJIT_PATH ${LUAJIT_PATH} ${CMAKE_SOURCE_DIR}/${LUAJIT_PATH}
${_LUAJIT_INCLUDE_DIRS}
HINTS ENV LUAJIT_PATH ${LUAJIT_PATH} ${CMAKE_SOURCE_DIR}/${LUAJIT_PATH} ${_LUAJIT_INCLUDE_DIRS}
PATHS /usr/include
/usr/local/include
/opt/local/include
@ -42,8 +41,7 @@ find_path(
find_library(
LUAJIT_LIB
NAMES ${_LUAJIT_LIBRARIES} luajit luajit-51 luajit-5.1 lua51
HINTS ENV LUAJIT_PATH ${LUAJIT_PATH} ${CMAKE_SOURCE_DIR}/${LUAJIT_PATH}
${_LUAJIT_LIBRARY_DIRS}
HINTS ENV LUAJIT_PATH ${LUAJIT_PATH} ${CMAKE_SOURCE_DIR}/${LUAJIT_PATH} ${_LUAJIT_LIBRARY_DIRS}
PATHS /usr/lib
/usr/local/lib
/opt/local/lib
@ -66,8 +64,7 @@ find_library(
../bin)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Luajit DEFAULT_MSG LUAJIT_LIB
LUAJIT_INCLUDE_DIR)
find_package_handle_standard_args(Luajit DEFAULT_MSG LUAJIT_LIB LUAJIT_INCLUDE_DIR)
mark_as_advanced(LUAJIT_INCLUDE_DIR LUAJIT_LIB)
if(LUAJIT_FOUND)
@ -77,16 +74,12 @@ if(LUAJIT_FOUND)
if(NOT TARGET Luajit::Luajit)
if(IS_ABSOLUTE "${LUAJIT_LIBRARIES}")
add_library(Luajit::Luajit UNKNOWN IMPORTED)
set_target_properties(Luajit::Luajit PROPERTIES IMPORTED_LOCATION
"${LUAJIT_LIBRARIES}")
set_target_properties(Luajit::Luajit PROPERTIES IMPORTED_LOCATION "${LUAJIT_LIBRARIES}")
else()
add_library(Luajit::Luajit INTERFACE IMPORTED)
set_target_properties(Luajit::Luajit PROPERTIES IMPORTED_LIBNAME
"${LUAJIT_LIBRARIES}")
set_target_properties(Luajit::Luajit PROPERTIES IMPORTED_LIBNAME "${LUAJIT_LIBRARIES}")
endif()
set_target_properties(
Luajit::Luajit PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${LUAJIT_INCLUDE_DIRS}")
set_target_properties(Luajit::Luajit PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LUAJIT_INCLUDE_DIRS}")
endif()
endif()

View file

@ -26,16 +26,14 @@ endif()
find_path(
MBEDTLS_INCLUDE_DIR
NAMES mbedtls/ssl.h
HINTS ENV MBEDTLS_PATH ${MBEDTLS_PATH} ${CMAKE_SOURCE_DIR}/${MBEDTLS_PATH}
${_MBEDTLS_INCLUDE_DIRS}
HINTS ENV MBEDTLS_PATH ${MBEDTLS_PATH} ${CMAKE_SOURCE_DIR}/${MBEDTLS_PATH} ${_MBEDTLS_INCLUDE_DIRS}
PATHS /usr/include /usr/local/include /opt/local/include /sw/include
PATH_SUFFIXES include)
find_library(
MBEDTLS_LIB
NAMES ${_MBEDTLS_LIBRARIES} mbedtls libmbedtls
HINTS ENV MBEDTLS_PATH ${MBEDTLS_PATH} ${CMAKE_SOURCE_DIR}/${MBEDTLS_PATH}
${_MBEDTLS_LIBRARY_DIRS}
HINTS ENV MBEDTLS_PATH ${MBEDTLS_PATH} ${CMAKE_SOURCE_DIR}/${MBEDTLS_PATH} ${_MBEDTLS_LIBRARY_DIRS}
PATHS /usr/lib /usr/local/lib /opt/local/lib /sw/lib
PATH_SUFFIXES
lib${_lib_suffix}
@ -54,8 +52,7 @@ find_library(
find_library(
MBEDCRYPTO_LIB
NAMES ${_MBEDCRYPTO_LIBRARIES} mbedcrypto libmbedcrypto
HINTS ENV MBEDCRYPTO_PATH ${MBEDCRYPTO_PATH}
${CMAKE_SOURCE_DIR}/${MBEDCRYPTO_PATH} ${_MBEDCRYPTO_LIBRARY_DIRS}
HINTS ENV MBEDCRYPTO_PATH ${MBEDCRYPTO_PATH} ${CMAKE_SOURCE_DIR}/${MBEDCRYPTO_PATH} ${_MBEDCRYPTO_LIBRARY_DIRS}
PATHS /usr/lib /usr/local/lib /opt/local/lib /sw/lib
PATH_SUFFIXES
lib${_lib_suffix}
@ -74,8 +71,7 @@ find_library(
find_library(
MBEDX509_LIB
NAMES ${_MBEDX509_LIBRARIES} mbedx509 libmbedx509
HINTS ENV MBEDX509_PATH ${MBEDX509_PATH} ${CMAKE_SOURCE_DIR}/${MBEDX509_PATH}
${_MBEDX509_LIBRARY_DIRS}
HINTS ENV MBEDX509_PATH ${MBEDX509_PATH} ${CMAKE_SOURCE_DIR}/${MBEDX509_PATH} ${_MBEDX509_LIBRARY_DIRS}
PATHS /usr/lib /usr/local/lib /opt/local/lib /sw/lib
PATH_SUFFIXES
lib${_lib_suffix}
@ -91,17 +87,15 @@ find_library(
../bin${_lib_suffix}
../bin)
# Sometimes mbedtls is split between three libs, and sometimes it isn't. If it
# isn't, let's check if the symbols we need are all in MBEDTLS_LIB.
# Sometimes mbedtls is split between three libs, and sometimes it isn't. If it isn't, let's check if the symbols we need
# are all in MBEDTLS_LIB.
if(MBEDTLS_LIB
AND NOT MBEDCRYPTO_LIB
AND NOT MBEDX509_LIB)
set(CMAKE_REQUIRED_LIBRARIES ${MBEDTLS_LIB})
set(CMAKE_REQUIRED_INCLUDES ${MBEDTLS_INCLUDE_DIR})
check_symbol_exists(mbedtls_x509_crt_init "mbedtls/x509_crt.h"
MBEDTLS_INCLUDES_X509)
check_symbol_exists(mbedtls_sha256_init "mbedtls/sha256.h"
MBEDTLS_INCLUDES_CRYPTO)
check_symbol_exists(mbedtls_x509_crt_init "mbedtls/x509_crt.h" MBEDTLS_INCLUDES_X509)
check_symbol_exists(mbedtls_sha256_init "mbedtls/sha256.h" MBEDTLS_INCLUDES_CRYPTO)
unset(CMAKE_REQUIRED_INCLUDES)
unset(CMAKE_REQUIRED_LIBRARIES)
endif()
@ -117,31 +111,24 @@ if(MBEDTLS_LIB
if(NOT TARGET Mbedtls::${component} AND MBED${component}_LIB)
if(IS_ABSOLUTE "${MBED${component}_LIB}")
add_library(Mbedtls::${component} UNKNOWN IMPORTED)
set_target_properties(
Mbedtls::${component} PROPERTIES IMPORTED_LOCATION
"${MBED${component}_LIB}")
set_target_properties(Mbedtls::${component} PROPERTIES IMPORTED_LOCATION "${MBED${component}_LIB}")
else()
add_library(Mbedtls::${component} INTERFACE IMPORTED)
set_target_properties(
Mbedtls::${component} PROPERTIES IMPORTED_LIBNAME
"${MBED${component}_LIB}")
set_target_properties(Mbedtls::${component} PROPERTIES IMPORTED_LIBNAME "${MBED${component}_LIB}")
endif()
set_target_properties(
Mbedtls::${component} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${MBED${component}_INCLUDE_DIR}")
set_target_properties(Mbedtls::${component} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${MBED${component}_INCLUDE_DIR}")
endif()
endforeach()
if(NOT TARGET Mbedtls::Mbedtls)
add_library(Mbedtls::Mbedtls INTERFACE IMPORTED)
target_link_libraries(Mbedtls::Mbedtls
INTERFACE Mbedtls::TLS Mbedtls::CRYPTO Mbedtls::X509)
target_link_libraries(Mbedtls::Mbedtls INTERFACE Mbedtls::TLS Mbedtls::CRYPTO Mbedtls::X509)
endif()
# Otherwise, if we find MBEDTLS_LIB, and it has both CRYPTO and x509 within
# the single lib (i.e. a windows build environment), then also feel free to go
# ahead.
# Otherwise, if we find MBEDTLS_LIB, and it has both CRYPTO and x509 within the single lib (i.e. a windows build
# environment), then also feel free to go ahead.
elseif(
MBEDTLS_LIB
AND MBEDTLS_INCLUDES_CRYPTO
@ -152,22 +139,17 @@ elseif(
if(NOT TARGET Mbedtls::Mbedtls)
if(IS_ABSOLUTE "${MBED${component}_LIB}")
add_library(Mbedtls::${component} UNKNOWN IMPORTED)
set_target_properties(Mbedtls::${component}
PROPERTIES IMPORTED_LOCATION "${MBEDTLS_LIBRARIES}")
set_target_properties(Mbedtls::${component} PROPERTIES IMPORTED_LOCATION "${MBEDTLS_LIBRARIES}")
else()
add_library(Mbedtls::${component} INTERFACE IMPORTED)
set_target_properties(Mbedtls::${component}
PROPERTIES IMPORTED_LIBNAME "${MBEDTLS_LIBRARIES}")
set_target_properties(Mbedtls::${component} PROPERTIES IMPORTED_LIBNAME "${MBEDTLS_LIBRARIES}")
endif()
set_target_properties(
Mbedtls::${component} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${MBEDTLS_INCLUDE_DIRS}")
set_target_properties(Mbedtls::${component} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${MBEDTLS_INCLUDE_DIRS}")
endif()
endif()
# Now we've accounted for the 3-vs-1 library case:
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MbedTLS DEFAULT_MSG MBEDTLS_LIBRARIES
MBEDTLS_INCLUDE_DIRS)
find_package_handle_standard_args(MbedTLS DEFAULT_MSG MBEDTLS_LIBRARIES MBEDTLS_INCLUDE_DIRS)
mark_as_advanced(MBEDTLS_INCLUDE_DIR MBEDTLS_LIB MBEDCRYPTO_LIB MBEDX509_LIB)

View file

@ -1,8 +1,10 @@
# cmake-format: off
# Try to find OSS on a *nix system
#
# OSS_FOUND - True if OSS is available OSS_INCLUDE_DIR - Include
# directory of OSS header OSS_HEADER_NAME - OSS header file name
#
# cmake-format: on
if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
set(OSS_HEADER_NAME "sys/soundcard.h")
@ -10,8 +12,7 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "DragonFly")
set(OSS_HEADER_NAME "sys/soundcard.h")
endif()
find_path(OSS_INCLUDE_DIR "${OSS_HEADER_NAME}" "/usr/include"
"/usr/local/include")
find_path(OSS_INCLUDE_DIR "${OSS_HEADER_NAME}" "/usr/include" "/usr/local/include")
if(OSS_INCLUDE_DIR)
set(OSS_FOUND True)
@ -31,6 +32,5 @@ mark_as_advanced(OSS_FOUND OSS_INCLUDE_DIR OSS_HEADER_NAME)
if(OSS_FOUND AND NOT TARGET OSS::OSS)
add_library(OSS::OSS INTERFACE IMPORTED)
set_target_properties(OSS::OSS PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${OSS_INCLUDE_DIR}")
set_target_properties(OSS::OSS PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${OSS_INCLUDE_DIR}")
endif()

View file

@ -1,3 +1,4 @@
# cmake-format: off
# .rst: FindPipeWire
# -------
#
@ -48,9 +49,9 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# =============================================================================
# cmake-format: on
# Use pkg-config to get the directories and then use these values in the
# FIND_PATH() and FIND_LIBRARY() calls
# Use pkg-config to get the directories and then use these values in the FIND_PATH() and FIND_LIBRARY() calls
find_package(PkgConfig QUIET)
pkg_search_module(PKG_PIPEWIRE QUIET libpipewire-0.3)
@ -87,8 +88,7 @@ if(PIPEWIRE_FOUND AND NOT TARGET PipeWire::PipeWire)
PipeWire::PipeWire
PROPERTIES IMPORTED_LOCATION "${PIPEWIRE_LIBRARIES}"
INTERFACE_COMPILE_OPTIONS "${PIPEWIRE_COMPILE_FLAGS}"
INTERFACE_INCLUDE_DIRECTORIES
"${PIPEWIRE_INCLUDE_DIRS};${SPA_INCLUDE_DIRS}")
INTERFACE_INCLUDE_DIRECTORIES "${PIPEWIRE_INCLUDE_DIRS};${SPA_INCLUDE_DIRS}")
endif()
mark_as_advanced(PIPEWIRE_LIBRARIES PIPEWIRE_INCLUDE_DIRS)

View file

@ -37,8 +37,7 @@ find_library(
../bin)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PythonWindows DEFAULT_MSG PYTHON_LIB
PYTHON_INCLUDE_DIR)
find_package_handle_standard_args(PythonWindows DEFAULT_MSG PYTHON_LIB PYTHON_INCLUDE_DIR)
mark_as_advanced(PYTHON_INCLUDE_DIR PYTHON_LIB)
if(PYTHONWINDOWS_FOUND)
@ -50,16 +49,12 @@ if(PYTHONWINDOWS_FOUND)
if(NOT TARGET Python::Python)
if(IS_ABSOLUTE "${Python_LIBRARIES}")
add_library(Python::Python UNKNOWN IMPORTED)
set_target_properties(Python::Python PROPERTIES IMPORTED_LOCATION
"${Python_LIBRARIES}")
set_target_properties(Python::Python PROPERTIES IMPORTED_LOCATION "${Python_LIBRARIES}")
else()
add_library(Python::Python INTERFACE IMPORTED)
set_target_properties(Python::Python PROPERTIES IMPORTED_LIBNAME
"${Python_LIBRARIES}")
set_target_properties(Python::Python PROPERTIES IMPORTED_LIBNAME "${Python_LIBRARIES}")
endif()
set_target_properties(
Python::Python PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${Python_INCLUDE_DIRS}")
set_target_properties(Python::Python PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${Python_INCLUDE_DIRS}")
endif()
endif()

View file

@ -1,3 +1,4 @@
# cmake-format: off
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
@ -40,6 +41,7 @@ The following cache variables may also be set:
The path to the Sndio library.
#]=======================================================================]
# cmake-format: on
find_path(Sndio_INCLUDE_DIR sndio.h)
find_library(Sndio_LIBRARY sndio)
@ -57,10 +59,8 @@ endif()
if(Sndio_FOUND AND NOT TARGET Sndio::Sndio)
add_library(Sndio::Sndio UNKNOWN IMPORTED)
set_target_properties(
Sndio::Sndio
PROPERTIES IMPORTED_LOCATION "${Sndio_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${Sndio_INCLUDE_DIR}")
set_target_properties(Sndio::Sndio PROPERTIES IMPORTED_LOCATION "${Sndio_LIBRARY}" INTERFACE_INCLUDE_DIRECTORIES
"${Sndio_INCLUDE_DIR}")
endif()
mark_as_advanced(Sndio_INCLUDE_DIR Sndio_LIBRARY)

View file

@ -13,8 +13,7 @@ find_library(
PATHS /usr/lib /usr/local/lib /opt/local/lib)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Sysinfo DEFAULT_MSG SYSINFO_LIB
SYSINFO_INCLUDE_DIR)
find_package_handle_standard_args(Sysinfo DEFAULT_MSG SYSINFO_LIB SYSINFO_INCLUDE_DIR)
mark_as_advanced(SYSINFO_INCLUDE_DIR SYSINFO_LIB)
if(SYSINFO_FOUND)
@ -24,16 +23,12 @@ if(SYSINFO_FOUND)
if(NOT TARGET Sysinfo::Sysinfo)
if(IS_ABSOLUTE "${SYSINFO_LIBRARIES}")
add_library(Sysinfo::Sysinfo UNKNOWN IMPORTED)
set_target_properties(Sysinfo::Sysinfo PROPERTIES IMPORTED_LOCATION
"${SYSINFO_LIBRARIES}")
set_target_properties(Sysinfo::Sysinfo PROPERTIES IMPORTED_LOCATION "${SYSINFO_LIBRARIES}")
else()
add_library(Sysinfo::Sysinfo INTERFACE IMPORTED)
set_target_properties(Sysinfo::Sysinfo PROPERTIES IMPORTED_LIBNAME
"${SYSINFO_LIBRARIES}")
set_target_properties(Sysinfo::Sysinfo PROPERTIES IMPORTED_LIBNAME "${SYSINFO_LIBRARIES}")
endif()
set_target_properties(
Sysinfo::Sysinfo PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${SYSINFO_INCLUDE_DIRS}")
set_target_properties(Sysinfo::Sysinfo PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${SYSINFO_INCLUDE_DIRS}")
endif()
endif()

View file

@ -30,15 +30,12 @@ if(UDEV_FOUND)
if(NOT TARGET Udev::Udev)
if(IS_ABSOLUTE "${UDEV_LIBRARIES}")
add_library(Udev::Udev UNKNOWN IMPORTED)
set_target_properties(Udev::Udev PROPERTIES IMPORTED_LOCATION
"${UDEV_LIBRARIES}")
set_target_properties(Udev::Udev PROPERTIES IMPORTED_LOCATION "${UDEV_LIBRARIES}")
else()
add_library(Udev::Udev INTERFACE IMPORTED)
set_target_properties(Udev::Udev PROPERTIES IMPORTED_LIBNAME
"${UDEV_LIBRARIES}")
set_target_properties(Udev::Udev PROPERTIES IMPORTED_LIBNAME "${UDEV_LIBRARIES}")
endif()
set_target_properties(Udev::Udev PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${UDEV_INCLUDE_DIRS}")
set_target_properties(Udev::Udev PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${UDEV_INCLUDE_DIRS}")
endif()
endif()

View file

@ -1,3 +1,4 @@
# cmake-format: off
# Try to find Wayland on a Unix system
#
# This will define:
@ -21,9 +22,10 @@
# Use pkg-config to get the directories and then use these values in the
# find_path() and find_library() calls
# cmake-format: on
find_package(PkgConfig)
pkg_check_modules(PKG_WAYLAND QUIET wayland-client wayland-server wayland-egl
wayland-cursor)
pkg_check_modules(PKG_WAYLAND QUIET wayland-client wayland-server wayland-egl wayland-cursor)
set(WAYLAND_COMPILE_FLAGS ${PKG_WAYLAND_CFLAGS})
@ -87,11 +89,10 @@ else()
endif()
mark_as_advanced(WAYLAND_SERVER_INCLUDE_DIRS WAYLAND_SERVER_LIBRARIES)
set(WAYLAND_INCLUDE_DIRS
${WAYLAND_CLIENT_INCLUDE_DIRS} ${WAYLAND_SERVER_INCLUDE_DIRS}
${WAYLAND_EGL_INCLUDE_DIRS} ${WAYLAND_CURSOR_INCLUDE_DIRS})
set(WAYLAND_LIBRARIES ${WAYLAND_CLIENT_LIBRARIES} ${WAYLAND_SERVER_LIBRARIES}
${WAYLAND_EGL_LIBRARIES} ${WAYLAND_CURSOR_LIBRARIES})
set(WAYLAND_INCLUDE_DIRS ${WAYLAND_CLIENT_INCLUDE_DIRS} ${WAYLAND_SERVER_INCLUDE_DIRS} ${WAYLAND_EGL_INCLUDE_DIRS}
${WAYLAND_CURSOR_INCLUDE_DIRS})
set(WAYLAND_LIBRARIES ${WAYLAND_CLIENT_LIBRARIES} ${WAYLAND_SERVER_LIBRARIES} ${WAYLAND_EGL_LIBRARIES}
${WAYLAND_CURSOR_LIBRARIES})
mark_as_advanced(WAYLAND_INCLUDE_DIRS WAYLAND_LIBRARIES)
list(REMOVE_DUPLICATES WAYLAND_INCLUDE_DIRS)
@ -109,24 +110,16 @@ foreach(component "Client" "Server" "EGL" "Cursor")
if(Wayland_${component}_FOUND)
if(IS_ABSOLUTE "${WAYLAND_${component_u}_LIBRARIES}")
add_library(Wayland::${component} UNKNOWN IMPORTED)
set_target_properties(
Wayland::${component}
PROPERTIES IMPORTED_LOCATION "${WAYLAND_${component_u}_LIBRARIES}")
set_target_properties(Wayland::${component} PROPERTIES IMPORTED_LOCATION "${WAYLAND_${component_u}_LIBRARIES}")
else()
add_library(Wayland::${component} INTERFACE IMPORTED)
set_target_properties(
Wayland::${component}
PROPERTIES IMPORTED_LIBNAME "${WAYLAND_${component_u}_LIBRARIES}")
set_target_properties(Wayland::${component} PROPERTIES IMPORTED_LIBNAME "${WAYLAND_${component_u}_LIBRARIES}")
endif()
set_target_properties(
Wayland::${component}
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${WAYLAND_${component_u}_INCLUDE_DIRS}")
set_target_properties(Wayland::${component} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${WAYLAND_${component_u}_INCLUDE_DIRS}")
set_target_properties(
Wayland::${component} PROPERTIES INTERFACE_COMPILE_OPTIONS
"${WAYLAND_COMPILE_FLAGS}")
set_target_properties(Wayland::${component} PROPERTIES INTERFACE_COMPILE_OPTIONS "${WAYLAND_COMPILE_FLAGS}")
endif()
endif()
endforeach()

View file

@ -45,19 +45,14 @@ find_path(
DOC "WebSocket++ include directory")
if(EXISTS "${Websocketpp_INCLUDE_DIR}/websocketpp/version.hpp")
file(STRINGS "${Websocketpp_INCLUDE_DIR}/websocketpp/version.hpp"
_version_string
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}")
string(REGEX REPLACE ".*patch_version[ \t]+=[ \t]+([0-9]+).*" "\\1"
_version_patch "${_version_string}")
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}")
string(REGEX REPLACE ".*patch_version[ \t]+=[ \t]+([0-9]+).*" "\\1" _version_patch "${_version_string}")
set(Websocketpp_VERSION
"${_version_major}.${_version_minor}.${_version_patch}")
set(Websocketpp_VERSION "${_version_major}.${_version_minor}.${_version_patch}")
unset(_version_major)
unset(_version_minor)
unset(_version_patch)
@ -69,27 +64,23 @@ else()
endif()
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin|Windows")
set(Websocketpp_ERROR_REASON
"Ensure that obs-deps is provided as part of CMAKE_PREFIX_PATH.")
set(Websocketpp_ERROR_REASON "Ensure that obs-deps is provided as part of CMAKE_PREFIX_PATH.")
elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|FreeBSD")
set(Websocketpp_ERROR_REASON
"Ensure WebSocket++ library is available in local include paths.")
set(Websocketpp_ERROR_REASON "Ensure WebSocket++ library is available in local include paths.")
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()
@ -97,6 +88,4 @@ 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."
)
DESCRIPTION "WebSocket++ is a header only C++ library that implements RFC6455 The WebSocket Protocol.")

Some files were not shown because too many files have changed in this diff Show more