aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-08-19 00:09:50 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-08-19 00:09:50 +0100
commitcade3789f8ad13db583a975f69f955928cce029f (patch)
tree2e87bfc4c2df3ed07a721aece13b8a0553300edc /CMakeLists.txt
parent797ed49118014e8ad121a04b585526734ad6b335 (diff)
downloadrspamd-cade3789f8ad13db583a975f69f955928cce029f.tar.gz
rspamd-cade3789f8ad13db583a975f69f955928cce029f.zip
Add detecting of libfetch/libcurl for rcl.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt28
1 files changed, 28 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b4bea8495..f2be7bad4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -756,6 +756,34 @@ IF(LIBUTIL_LIBRARY)
DOC "Path to libutil header")
ENDIF(LIBUTIL_LIBRARY)
+# Find libfetch (for FreeBSD)
+
+FIND_LIBRARY(LIBFETCH_LIBRARY NAMES fetch PATHS PATH_SUFFIXES lib64 lib
+ PATHS
+ ~/Library/Frameworks
+ /Library/Frameworks
+ /usr/local
+ /usr
+ /sw
+ /opt/local
+ /opt/csw
+ /opt
+ DOC "Path where the libfetch library can be found")
+IF(LIBFETCH_LIBRARY)
+ FIND_FILE(HAVE_FETCH_H NAMES fetch.h PATHS /usr/include
+ /opt/include
+ /usr/local/include
+ DOC "Path to libfetch header")
+ELSE(LIBFETCH_LIBRARY)
+ # Try to find libcurl
+ INCLUDE(FindCURL)
+ IF(NOT CURL_FOUND)
+ MESSAGE(WARNING "Neither libcurl nor libfetch were found, no support of URL includes in configuration")
+ ELSE(NOT CURL_FOUND)
+ INCLUDE_DIRECTORIES("${CURL_INCLUDE_DIRS}")
+ ENDIF(NOT CURL_FOUND)
+ENDIF(LIBFETCH_LIBRARY)
+
# Process with warn flags
SET(CMAKE_C_WARN_FLAGS "")
CHECK_C_COMPILER_FLAG(-Wall SUPPORT_WALL)