From eac02fcfaaa2c46c3f93c7afd0d4ae99df14296a Mon Sep 17 00:00:00 2001 From: twelve17 Date: Sat, 18 Oct 2014 18:31:46 +0100 Subject: [PATCH] Update how openalpr.conf is generated and ultimately installed. --- config/{openalpr.conf => openalpr.conf.in} | 0 src/CMakeLists.txt | 5 ++++- 2 files changed, 4 insertions(+), 1 deletion(-) rename config/{openalpr.conf => openalpr.conf.in} (100%) diff --git a/config/openalpr.conf b/config/openalpr.conf.in similarity index 100% rename from config/openalpr.conf rename to config/openalpr.conf.in diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 032bc23..205dd62 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -105,7 +105,10 @@ add_subdirectory(video) install (TARGETS alpr DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install (FILES ${CMAKE_SOURCE_DIR}/../doc/man/alpr.1 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1 COMPONENT doc) install (DIRECTORY ${CMAKE_SOURCE_DIR}/../runtime_data DESTINATION ${CMAKE_INSTALL_PREFIX}/share/openalpr) -CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/../config/openalpr.conf ${CMAKE_INSTALL_SYSCONFDIR}/openalpr/openalpr.conf) + +# set runtime_data to reflect the current CMAKE_INSTALL_PREFIX +CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/../config/openalpr.conf.in ${CMAKE_CURRENT_BINARY_DIR}/config/openalpr.conf) +install (FILES ${CMAKE_CURRENT_BINARY_DIR}/config/openalpr.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/openalpr/ COMPONENT config) IF (WITH_DAEMON) install (TARGETS alprd DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)