klv: make KLV support optional via ENABLE_KLV, disabled by default

This prevents the building of the klv library and plugin, and disables KLV
support and dependency in the Pleora plugin.
This commit is contained in:
Joshua M. Doe
2020-04-15 12:34:03 -04:00
parent feca1a7969
commit a6e97d08df
7 changed files with 36 additions and 7 deletions

View File

@@ -1,3 +1,7 @@
if (ENABLE_KLV)
add_definitions(-DGST_PLUGINS_VISION_ENABLE_KLV)
endif ()
add_definitions(-D_XKEYCHECK_H)
set (SOURCES
@@ -32,13 +36,21 @@ add_library (${libname} MODULE
${SOURCES}
${HEADERS})
target_link_libraries (${libname}
set (LIBRARIES
${GLIB2_LIBRARIES}
${GOBJECT_LIBRARIES}
${GSTREAMER_LIBRARY}
${GSTREAMER_BASE_LIBRARY}
${GSTREAMER_VIDEO_LIBRARY}
gstklv-1.0-0)
)
if (ENABLE_KLV)
set (LIBRARIES ${LIBRARIES} gstklv-1.0-0)
endif ()
target_link_libraries (${libname}
${LIBRARIES}
)
if (WIN32)
install (FILES $<TARGET_PDB_FILE:${libname}> DESTINATION ${PDB_INSTALL_DIR} COMPONENT pdb OPTIONAL)