]> source.dussan.org Git - rspamd.git/commitdiff
Search for liblmdb.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 17 Dec 2014 21:40:59 +0000 (21:40 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 17 Dec 2014 21:40:59 +0000 (21:40 +0000)
CMakeLists.txt

index be81d3eeb9f5f72f32573c4302713ff8e0b1db9d..6ebd69ea70a0379e5d0a6690d22348ce40a4b2db 100644 (file)
@@ -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")