From 48ca1ed78660a6ba4dbf8ea1890f00c57ed5fd03 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 19 Aug 2013 16:25:27 +0100 Subject: Link libcurl/fetch to rcl directly. --- CMakeLists.txt | 7 +++++++ lib/CMakeLists.txt | 7 ------- src/rcl/CMakeLists.txt | 7 +++++++ 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} -- cgit v1.2.3