commit ced03293d0d28907e0d6bb9f922770577f822169
parent 1bca49c36bb6a9345a5d0bac294ba68d87855860
Author: Frederic Cambus <fred@statdns.com>
Date: Mon, 16 Mar 2020 11:37:52 +0100
Move GEOIP2DB definition to CMakeLists.txt, allowing build time customization.
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
@@ -4,7 +4,7 @@
# https://www.logswan.org
#
# Created: 2015-05-31
-# Last Updated: 2018-11-19
+# Last Updated: 2020-03-16
#
# Logswan is released under the BSD 2-Clause license
# See LICENSE file for details
@@ -67,9 +67,11 @@ endif()
set(GEOIP2DIR ${CMAKE_INSTALL_PREFIX}/share/GeoIP2
CACHE PATH "Path to GeoIP2 databases")
+set(GEOIP2DB "GeoLite2-Country.mmdb" CACHE PATH "GeoIP2 database file")
add_definitions(-Wall -Wextra -std=c11 -pedantic)
add_definitions(-DGEOIP2DIR="${GEOIP2DIR}/")
+add_definitions(-DGEOIP2DB="${GEOIP2DB}")
add_executable(logswan ${SRC} ${DEPS})
target_link_libraries(logswan ${GEOIP2_LIBRARIES} ${JANSSON_LIBRARIES} m)
diff --git a/src/config.h b/src/config.h
@@ -4,7 +4,7 @@
* https://www.logswan.org
*
* Created: 2015-05-31
- * Last Updated: 2019-10-17
+ * Last Updated: 2020-03-16
*
* Logswan is released under the BSD 2-Clause license.
* See LICENSE file for details.
@@ -15,8 +15,6 @@
#define VERSION "Logswan 2.1.3"
-#define GEOIP2DB "GeoLite2-Country.mmdb"
-
enum {
HLL_BITS = 20,
LINE_LENGTH_MAX = 65536,