ntv2/ajaapps/crossplatform/ntv2thermo/CMakeLists.txt

42 lines
1.2 KiB
CMake

project(ntv2thermo)
set(TARGET_INCLUDE_DIRS
${CMAKE_CURRENT_SOURCE_DIR}/../
${AJA_LIBRARIES_ROOT}
${AJA_LIB_NTV2_ROOT}/includes)
set(NTV2THERMO_SOURCES main.cpp)
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
# noop
elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
find_library(FOUNDATION_FRAMEWORK Foundation)
set(TARGET_LINK_LIBS ${FOUNDATION_FRAMEWORK})
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(TARGET_LINK_LIBS dl pthread rt)
endif()
set(TARGET_SOURCES
${NTV2THERMO_SOURCES})
add_executable(ntv2thermo ${TARGET_SOURCES})
add_dependencies(ntv2thermo ajantv2)
target_include_directories(ntv2thermo PUBLIC ${TARGET_INCLUDE_DIRS})
target_link_libraries(ntv2thermo PUBLIC ajantv2 ${TARGET_LINK_LIBS})
if (AJA_INSTALL_SOURCES)
install(FILES ${NTV2THERMO_SOURCES} DESTINATION ${CMAKE_INSTALL_PREFIX}/ajaapps/crossplatform/ntv2thermo)
install(FILES CMakeLists.txt DESTINATION ${CMAKE_INSTALL_PREFIX}/ajaapps/crossplatform/ntv2thermo)
endif()
install(TARGETS ntv2thermo
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
if (AJA_CODE_SIGN)
aja_code_sign(ntv2thermo)
endif()