|
@@ -9,84 +9,63 @@ endif()
|
|
|
|
|
|
find_package(LibAJANTV2 REQUIRED)
|
|
|
|
|
|
-# cmake-format: off
|
|
|
find_package(Qt6 REQUIRED Widgets)
|
|
|
-if(OS_LINUX)
|
|
|
+
|
|
|
+if(OS_LINUX
|
|
|
+ OR OS_FREEBSD
|
|
|
+ OR OS_OPENBSD)
|
|
|
find_package(Qt6 REQUIRED Gui)
|
|
|
+
|
|
|
+ find_package(X11 REQUIRED)
|
|
|
+endif()
|
|
|
+
|
|
|
+if(NOT TARGET OBS::aja-support)
|
|
|
+ add_subdirectory("${CMAKE_SOURCE_DIR}/plugins/aja" "${CMAKE_BINARY_DIR}/plugins/aja")
|
|
|
endif()
|
|
|
-# cmake-format: on
|
|
|
|
|
|
add_library(aja-output-ui MODULE)
|
|
|
add_library(OBS::aja-output-ui ALIAS aja-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_sources(aja-output-ui PRIVATE # cmake-format: sortable
|
|
|
+ aja-ui-main.cpp aja-ui-main.h AJAOutputUI.cpp AJAOutputUI.h)
|
|
|
|
|
|
target_sources(aja-output-ui PRIVATE forms/output.ui)
|
|
|
|
|
|
-target_link_libraries(aja-output-ui PRIVATE OBS::libobs OBS::frontend-api Qt::Widgets AJA::LibAJANTV2)
|
|
|
+target_compile_options(
|
|
|
+ aja-output-ui PRIVATE $<$<COMPILE_LANG_AND_ID:CXX,AppleClang,Clang>:-Wno-deprecated-declarations>
|
|
|
+ $<$<COMPILE_LANG_AND_ID:CXX,AppleClang,Clang>:-Wno-quoted-include-in-framework-header>)
|
|
|
+
|
|
|
+target_link_libraries(
|
|
|
+ aja-output-ui
|
|
|
+ PRIVATE OBS::libobs
|
|
|
+ OBS::aja-support
|
|
|
+ OBS::frontend-api
|
|
|
+ OBS::ui-support
|
|
|
+ Qt::Widgets
|
|
|
+ AJA::LibAJANTV2
|
|
|
+ $<$<PLATFORM_ID:Windows>:ws2_32.lib>
|
|
|
+ $<$<PLATFORM_ID:Windows>:setupapi.lib>
|
|
|
+ $<$<PLATFORM_ID:Windows>:Winmm.lib>
|
|
|
+ $<$<PLATFORM_ID:Windows>:netapi32.lib>
|
|
|
+ $<$<PLATFORM_ID:Windows>:Shlwapi.lib>
|
|
|
+ "$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,AppKit.framework>>"
|
|
|
+ "$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,CoreFoundation.framework>>"
|
|
|
+ "$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,IOKit.framework>>"
|
|
|
+ $<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:X11::X11>
|
|
|
+ $<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD>:Qt::GuiPrivate>)
|
|
|
+
|
|
|
+target_link_options(aja-output-ui PRIVATE $<$<PLATFORM_ID:Windows>:/IGNORE:4099>)
|
|
|
|
|
|
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)
|
|
|
# cmake-format: off
|
|
|
- target_link_libraries(
|
|
|
- aja-output-ui
|
|
|
- PRIVATE "$<LINK_LIBRARY:FRAMEWORK,AppKit.framework>"
|
|
|
- "$<LINK_LIBRARY:FRAMEWORK,CoreFoundation.framework>"
|
|
|
- "$<LINK_LIBRARY:FRAMEWORK,IOKit.framework>")
|
|
|
+ set_property(TARGET aja-output-ui APPEND PROPERTY AUTORCC_OPTIONS --format-version 1)
|
|
|
# cmake-format: on
|
|
|
- target_compile_options(aja-output-ui PRIVATE -Wno-deprecated-declarations -Wno-quoted-include-in-framework-header)
|
|
|
-elseif(OS_LINUX OR OS_FREEBSD)
|
|
|
- find_package(X11 REQUIRED)
|
|
|
- target_link_libraries(aja-output-ui PRIVATE X11::X11 Qt::GuiPrivate)
|
|
|
endif()
|
|
|
|
|
|
+# cmake-format: off
|
|
|
set_target_properties_obs(
|
|
|
aja-output-ui
|
|
|
PROPERTIES FOLDER frontend
|
|
@@ -95,3 +74,4 @@ set_target_properties_obs(
|
|
|
AUTOUIC ON
|
|
|
AUTORCC ON
|
|
|
AUTOUIC_SEARCH_PATHS forms)
|
|
|
+# cmake-format: on
|