Add support for configuring if you want to enable build support for GPU detector.

This commit is contained in:
Peter Rekdal Sunde
2015-07-06 14:59:22 +02:00
parent 9ee84536d5
commit 87ba3bd91a
2 changed files with 7 additions and 1 deletions

View File

@@ -27,6 +27,10 @@ IF ( NOT DEFINED WITH_DAEMON )
SET(WITH_DAEMON ON)
ENDIF()
if ( NOT DEFINED WITH_GPU_DETECTOR )
SET(WITH_GPU_DETECTOR OFF)
ENDIF()
IF (WIN32 AND WITH_DAEMON)
MESSAGE(WARNING "Skipping alprd daemon installation, as it is not supported in Windows.")
SET(WITH_DAEMON OFF)

View File

@@ -61,7 +61,9 @@ install (TARGETS openalpr-static DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
install (TARGETS openalpr DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
# Compile GPU detector
#add_definitions(-DCOMPILE_GPU=1)
IF ( WITH_GPU_DETECTOR )
add_definitions(-DCOMPILE_GPU=1)
ENDIF()
# Add definition for default config file
add_definitions(-DDEFAULT_CONFIG_FILE="${CMAKE_INSTALL_SYSCONFDIR}/openalpr/openalpr.conf")