mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 21:13:04 +02:00
ce3ae8e423
* 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.
114 lines
2.9 KiB
CMake
114 lines
2.9 KiB
CMake
# Once done these will be defined:
|
|
#
|
|
# LIBAJANTV2_FOUND
|
|
# LIBAJANTV2_INCLUDE_DIRS
|
|
# LIBAJANTV2_LIBRARIES
|
|
#
|
|
find_package(PkgConfig QUIET)
|
|
if (PKG_CONFIG_FOUND)
|
|
pkg_check_modules(_AJA QUIET ajantv2)
|
|
endif()
|
|
|
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
set(_lib_suffix 64)
|
|
else()
|
|
set(_lib_suffix 32)
|
|
endif()
|
|
|
|
find_path(AJA_LIBRARIES_INCLUDE_DIR
|
|
NAMES ajalibraries
|
|
HINTS
|
|
ENV AJASDKPath${_lib_suffix}
|
|
ENV AJASDKPath
|
|
ENV DepsPath${_lib_suffix}
|
|
ENV DepsPath
|
|
${AJASDKPath${_lib_suffix}}
|
|
${AJASDKPath}
|
|
${DepsPath${_lib_suffix}}
|
|
${DepsPath}
|
|
${_AJA_NTV2_INCLUDE_DIRS}
|
|
PATHS
|
|
/usr/include /usr/local/include /opt/local/include /sw/include
|
|
PATH_SUFFIXES
|
|
include)
|
|
|
|
find_library(AJA_NTV2_LIB
|
|
NAMES ${_AJA_NTV2_LIBRARIES} ajantv2 libajantv2
|
|
HINTS
|
|
ENV AJASDKPath${_lib_suffix}
|
|
ENV AJASDKPath
|
|
ENV DepsPath${_lib_suffix}
|
|
ENV DepsPath
|
|
${AJASDKPath${_lib_suffix}}
|
|
${AJASDKPath}
|
|
${DepsPath${_lib_suffix}}
|
|
${DepsPath}
|
|
${_AJA_NTV2_LIBRARY_DIRS}
|
|
PATHS
|
|
/usr/lib /usr/local/lib /opt/local/lib /sw/lib
|
|
PATH_SUFFIXES
|
|
lib${_lib_suffix} lib
|
|
libs${_lib_suffix} libs
|
|
bin${_lib_suffix} bin
|
|
../lib${_lib_suffix} ../lib
|
|
../libs${_lib_suffix} ../libs
|
|
../bin${_lib_suffix} ../bin)
|
|
|
|
find_library(AJA_NTV2_DEBUG_LIB
|
|
NAMES ajantv2d libajantv2d
|
|
HINTS
|
|
ENV AJASDKPath${_lib_suffix}
|
|
ENV AJASDKPath
|
|
ENV DepsPath${_lib_suffix}
|
|
ENV DepsPath
|
|
${AJASDKPath${_lib_suffix}}
|
|
${AJASDKPath}
|
|
${DepsPath${_lib_suffix}}
|
|
${DepsPath}
|
|
${_AJA_NTV2_LIBRARY_DIRS}
|
|
PATHS
|
|
/usr/lib /usr/local/lib /opt/local/lib /sw/lib
|
|
PATH_SUFFIXES
|
|
lib${_lib_suffix} lib
|
|
libs${_lib_suffix} libs
|
|
bin${_lib_suffix} bin
|
|
../lib${_lib_suffix} ../lib
|
|
../libs${_lib_suffix} ../libs
|
|
../bin${_lib_suffix} ../bin)
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
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}/ajantv2/src)
|
|
if (WIN32)
|
|
set(AJA_LIBRARIES_INCLUDE_DIRS
|
|
${AJA_LIBRARIES_INCLUDE_DIRS}
|
|
${AJA_LIBRARIES_INCLUDE_DIR}/ajantv2/src/win)
|
|
elseif (APPLE)
|
|
set(AJA_LIBRARIES_INCLUDE_DIRS
|
|
${AJA_LIBRARIES_INCLUDE_DIRS}
|
|
${AJA_LIBRARIES_INCLUDE_DIR}/ajantv2/src/mac)
|
|
elseif(UNIX AND NOT APPLE)
|
|
set(AJA_LIBRARIES_INCLUDE_DIRS
|
|
${AJA_LIBRARIES_INCLUDE_DIRS}
|
|
${AJA_LIBRARIES_INCLUDE_DIR}/ajantv2/src/lin)
|
|
endif()
|
|
|
|
set(LIBAJANTV2_LIBRARIES ${AJA_NTV2_LIB})
|
|
if(AJA_NTV2_DEBUG_LIB STREQUAL "AJA_NTV2_DEBUG_LIB-NOTFOUND")
|
|
set(AJA_NTV2_DEBUG_LIB ${AJA_NTV2_LIB})
|
|
endif()
|
|
set(LIBAJANTV2_DEBUG_LIBRARIES ${AJA_NTV2_DEBUG_LIB})
|
|
set(LIBAJANTV2_INCLUDE_DIRS ${AJA_LIBRARIES_INCLUDE_DIRS})
|
|
endif()
|