gst-plugin-linescan/sys/pleora/CMakeLists.txt
Joshua M. Doe 26e05b7058 build: allow overriding installation directories
More sensible defaults and allow for overriding. Also make PDB installation
optional on Windows if RelWithDebInfo isn't the build type being used.

CMAKE_INSTALL_PREFIX defaults to GStreamer install location on Windows and
/usr/lib on other platforms.

PLUGIN_INSTALL_DIR defaults to CMAKE_INSTALL_PREFIX/gstreamer-1.0

LIBRARY_INSTALL_DIR defaults to CMAKE_INSTALL_PREFIX/

PDB_INSTALL_DIR defaults to CMAKE_INSTALL_PREFIX/
2020-04-15 09:26:40 -04:00

47 lines
968 B
CMake

add_definitions(-D_XKEYCHECK_H)
set (SOURCES
gstpleora.cpp
gstpleorasrc.cpp)
set (HEADERS
gstpleorasrc.h)
if (Pleora_VERSION_MAJOR GREATER 5)
set (SOURCES
${SOURCES}
gstpleorasink.cpp
streamingchannelsource.cpp)
set (HEADERS
${HEADERS}
gstpleorasink.h
streamingchannelsource.h)
endif ()
include_directories (AFTER
${Pleora_INCLUDE_DIR}
${PROJECT_SOURCE_DIR}/common
${PROJECT_SOURCE_DIR}/gst-libs/klv
)
link_directories(${Pleora_LIBRARY_DIR})
set (libname gstpleora${Pleora_VERSION_MAJOR})
add_library (${libname} MODULE
${SOURCES}
${HEADERS})
target_link_libraries (${libname}
${GLIB2_LIBRARIES}
${GOBJECT_LIBRARIES}
${GSTREAMER_LIBRARY}
${GSTREAMER_BASE_LIBRARY}
${GSTREAMER_VIDEO_LIBRARY}
gstklv-1.0-0)
if (WIN32)
install (FILES $<TARGET_PDB_FILE:${libname}> DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL)
endif ()
install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR})