commit dab1ff46da414544026bddfcadcae158db2b047f
parent aabb61f6bb04fd327c8f9b004e82606c6ed3df96
Author: Frederic Cambus <fcambus@users.sourceforge.net>
Date: Mon, 21 Dec 2015 22:52:30 +0100
Setting the DBPATH variable only if it hasn't been defined when invoking CMake
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
@@ -27,8 +27,12 @@ if(NOT HAVE_STRTONUM)
set (SRC ${SRC} compat/strtonum.c)
endif()
+if(NOT DEFINED DBPATH)
+ set(DBPATH ${CMAKE_INSTALL_PREFIX}/share/GeoIP)
+endif()
+
add_definitions(-Wall -Wextra -Werror -std=c99 -pedantic)
-add_definitions(-DDBPATH="${CMAKE_INSTALL_PREFIX}/share/GeoIP")
+add_definitions(-DDBPATH="${DBPATH}")
add_executable(logswan ${SRC} ${DEPS})
target_link_libraries(logswan ${LIB_GEOIP} ${LIB_JANSSON} m)