diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-12-17 21:40:59 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-12-17 21:40:59 +0000 |
commit | 78322da18c9fcb497a86c96dfb486a89952a4a3c (patch) | |
tree | 273158c75c458720c626f110cecca9af72e111a5 /CMakeLists.txt | |
parent | e6d21cd892f516cdad4906c7f6366e3fc95066d4 (diff) | |
download | rspamd-78322da18c9fcb497a86c96dfb486a89952a4a3c.tar.gz rspamd-78322da18c9fcb497a86c96dfb486a89952a4a3c.zip |
Search for liblmdb.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 25 |
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") |