From 87ba3bd91aa982073d8cfe1daed6f42206e94e52 Mon Sep 17 00:00:00 2001 From: Peter Rekdal Sunde Date: Mon, 6 Jul 2015 14:59:22 +0200 Subject: [PATCH] Add support for configuring if you want to enable build support for GPU detector. --- src/CMakeLists.txt | 4 ++++ src/openalpr/CMakeLists.txt | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f1104f6..48e803e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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) diff --git a/src/openalpr/CMakeLists.txt b/src/openalpr/CMakeLists.txt index bfb3b22..6ec14b9 100644 --- a/src/openalpr/CMakeLists.txt +++ b/src/openalpr/CMakeLists.txt @@ -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")