0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
obs-studio/plugins/aja/CMakeLists.txt
Paul Hindt ce3ae8e423
aja: Capture and Output plugin for AJA Video Systems IO devices
* aja: Initial commit of AJA capture/output plugin

* aja: Fix clang-format on aja-output-ui code

* aja: Remove script used during dev/testing

* aja: Address pull request feedback from @RytoEX

* aja: Remove the SDK sources and update CMakeLists to point to new headers-only/static libs dependency distribution.

* aja: Only build AJA plugin on x64 on macOS for now

* aja: Remove the non-English placeholder locale files. The english strings/files will be produced via crowdin, according to @ddrboxman.

* aja: Add FindLibAJANTV2.cmake script to locate the ajantv2 headers and static libs in the OBS external deps package(s). Tested on Windows x64. macOS and Linux x64 TBD.

* aja: Add ajantv2/includes to FindLibAJANTV2 include search paths

* aja: Remove commented code from aja CMakeLists

* aja: Remove debug code and comments that are no longer needed.

* aja: Fix indentation

* aja: Remove disablement of clang-format in routing table and SDIWireFormat map

* aja: Use spaces for all indentation in widget crosspoint arrays where we disable clang-format

* aja: Address code style comments made by @RytoEX

* aja: Fix uneven indentation

* aja: More fixes to if/else placement and remove superfluous comments.

* aja: Rename 'dwns' to 'deactivateWhileNotShowing' for clarity. The DeckLink plugin still uses the variable name 'dwns' and should be changed, if desired, in a separate PR.

* aja: Remove X11Extras dependency from AJA Output frontend plugin

* aja: Add patch from Jim to find AJA release/debug libs

* aja: Improve AV sync of queued video/audio sent to the AJA card in the AJA Output plugin.
2021-11-23 20:31:11 -06:00

103 lines
2.0 KiB
CMake

project(aja)
if(DISABLE_AJA)
message(STATUS "aja plugin disabled")
return()
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
find_package(LibAJANTV2)
if (NOT LIBAJANTV2_FOUND)
message(STATUS "aja plugin disabled (deps not found)")
return()
else()
message("aja plugin includes: ${LIBAJANTV2_INCLUDE_DIRS}")
message("aja plugin libs: ${LIBAJANTV2_LIBRARIES}")
message("aja plugin debug libs: ${LIBAJANTV2_DEBUG_LIBRARIES}")
endif()
else()
message(STATUS "aja plugin disabled (32-bit not supported)")
return()
endif()
set(aja_INCLUDE_DIRS
${LIBAJANTV2_INCLUDE_DIRS})
set(aja_LIBRARIES
$<IF:$<CONFIG:Debug>,${LIBAJANTV2_DEBUG_LIBRARIES},${LIBAJANTV2_LIBRARIES}>
libobs)
set(aja_SOURCES
main.cpp
aja-card-manager.cpp
aja-common.cpp
aja-output.cpp
aja-props.cpp
aja-routing.cpp
aja-source.cpp
aja-widget-io.cpp)
set(aja_HEADERS
aja-card-manager.hpp
aja-common.hpp
aja-enums.hpp
aja-ui-props.hpp
aja-output.hpp
aja-props.hpp
aja-routing.hpp
aja-source.hpp
aja-widget-io.hpp)
# macOS
if(APPLE)
set(aja_COMPILE_DEFS
AJAMac
AJA_MAC)
find_library(IOKIT_FRAMEWORK Iokit)
find_library(COREFOUNDATION_LIBRARY CoreFoundation)
find_library(APPKIT_FRAMEWORK AppKit)
list(APPEND aja_LIBRARIES
${IOKIT_FRAMEWORK}
${COREFOUNDATION_LIBRARY}
${APPKIT_FRAMEWORK})
# Windows
elseif(WIN32)
set(aja_COMPILE_DEFS
AJA_WINDOWS
_WINDOWS
WIN32
MSWindows)
if(CMAKE_BUILD_TYPE STREQUAL Debug)
list(APPEND aja_COMPILE_DEFS
_DEBUG)
else()
list(APPEND aja_COMPILE_DEFS
NDEBUG)
endif()
list(APPEND aja_LIBRARIES
ws2_32.lib
setupapi.lib
Winmm.lib
netapi32.lib
Shlwapi.lib)
# Linux
elseif(UNIX AND NOT APPLE)
set(aja_COMPILE_DEFS
AJA_LINUX
AJALinux)
endif()
add_library(aja MODULE ${aja_SOURCES} ${aja_HEADERS})
target_include_directories(aja PUBLIC ${aja_INCLUDE_DIRS})
target_link_libraries(aja PUBLIC ${aja_LIBRARIES})
target_compile_definitions(aja PUBLIC ${aja_COMPILE_DEFS})
set_target_properties(aja PROPERTIES FOLDER
"plugins")
install_obs_plugin_with_data(aja data)