aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt25
1 files changed, 25 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index be81d3eeb..6ebd69ea7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -566,6 +566,31 @@ IF(ENABLE_URL_INCLUDE MATCHES "ON")
ENDIF(LIBFETCH_LIBRARY)
ENDIF(ENABLE_URL_INCLUDE MATCHES "ON")
+# Find liblmdb
+FIND_LIBRARY(LIBLMDB_LIBRARY NAMES lmdb PATHS PATH_SUFFIXES lib64 lib
+ PATHS
+ ~/Library/Frameworks
+ /Library/Frameworks
+ /usr/local
+ /usr
+ /sw
+ /opt/local
+ /opt/csw
+ /opt
+ DOC "Path where the liblmdb library can be found")
+IF(LIBLMDB_LIBRARY)
+ FIND_PATH(LIBLMDB_INCLUDE lmdb.h PATHS /opt/include
+ /usr/include
+ /usr/local/include
+ DOC "Path where the lmdb header files can be found")
+
+ GET_FILENAME_COMPONENT(LIBLMDB_PATH "${LIBLMDB_LIBRARY}" PATH)
+ INCLUDE_DIRECTORIES("${LIBLMDB_INCLUDE}")
+ LINK_DIRECTORIES("${LIBLMDB_PATH}")
+ELSE(LIBLMDB_LIBRARY)
+ MESSAGE(FATAL "Liblmdb is required for rspamd")
+ENDIF(LIBLMDB_LIBRARY)
+
# Static build
IF(ENABLE_STATIC MATCHES "ON")