aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt7
-rw-r--r--lib/CMakeLists.txt7
-rw-r--r--src/rcl/CMakeLists.txt7
3 files changed, 14 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f2be7bad4..a14e44383 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1120,6 +1120,13 @@ ELSE(GMIME24)
TARGET_LINK_LIBRARIES(rspamd ${GMIME2_LIBRARIES})
ENDIF(GMIME24)
TARGET_LINK_LIBRARIES(rspamd ${GLIB2_LIBRARIES})
+IF(HAVE_FETCH_H)
+ TARGET_LINK_LIBRARIES(rspamd fetch)
+ELSE(HAVE_FETCH_H)
+ IF(CURL_FOUND)
+ TARGET_LINK_LIBRARIES(rspamd ${CURL_LIBRARIES})
+ ENDIF(CURL_FOUND)
+ENDIF(HAVE_FETCH_H)
TARGET_LINK_LIBRARIES(rspamd ${CMAKE_REQUIRED_LIBRARIES})
IF(ENABLE_STATIC MATCHES "ON")
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index c4b29d933..af1403523 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -77,13 +77,6 @@ TARGET_LINK_LIBRARIES(rspamd-util ${CMAKE_REQUIRED_LIBRARIES})
TARGET_LINK_LIBRARIES(rspamd-util pcre)
TARGET_LINK_LIBRARIES(rspamd-util ${GLIB2_LIBRARIES})
TARGET_LINK_LIBRARIES(rspamd-util event)
-IF(HAVE_FETCH_H)
- TARGET_LINK_LIBRARIES(rspamd-util fetch)
-ELSE(HAVE_FETCH_H)
- IF(CURL_FOUND)
- TARGET_LINK_LIBRARIES(rspamd-util ${CURL_LIBRARIES})
- ENDIF(CURL_FOUND)
-ENDIF(HAVE_FETCH_H)
IF(NOT DEBIAN_BUILD)
SET_TARGET_PROPERTIES(rspamd-util PROPERTIES VERSION ${RSPAMD_VERSION})
diff --git a/src/rcl/CMakeLists.txt b/src/rcl/CMakeLists.txt
index d5a362449..134db7269 100644
--- a/src/rcl/CMakeLists.txt
+++ b/src/rcl/CMakeLists.txt
@@ -6,6 +6,13 @@ SET(RCLSRC rcl_util.c
ADD_LIBRARY(rspamd-rcl ${LINK_TYPE} ${RCLSRC})
SET_TARGET_PROPERTIES(rspamd-rcl PROPERTIES VERSION ${RSPAMD_VERSION})
SET_TARGET_PROPERTIES(rspamd-rcl PROPERTIES COMPILE_FLAGS "-DRSPAMD_LIB")
+IF(HAVE_FETCH_H)
+ TARGET_LINK_LIBRARIES(rspamd-rcl fetch)
+ELSE(HAVE_FETCH_H)
+ IF(CURL_FOUND)
+ TARGET_LINK_LIBRARIES(rspamd-rcl ${CURL_LIBRARIES})
+ ENDIF(CURL_FOUND)
+ENDIF(HAVE_FETCH_H)
IF(NO_SHARED MATCHES "OFF")
INSTALL(TARGETS rspamd-rcl
LIBRARY DESTINATION ${LIBDIR}