From: Vsevolod Stakhov Date: Wed, 17 Dec 2014 21:40:59 +0000 (+0000) Subject: Search for liblmdb. X-Git-Tag: 0.8.0~77^2~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=78322da18c9fcb497a86c96dfb486a89952a4a3c;p=rspamd.git Search for liblmdb. --- 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")