]> source.dussan.org Git - rspamd.git/commitdiff
Fix linking libraries.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 26 Dec 2013 15:38:17 +0000 (15:38 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 26 Dec 2013 15:38:17 +0000 (15:38 +0000)
CMakeLists.txt
contrib/lgpl/CMakeLists.txt
lib/CMakeLists.txt
src/client/CMakeLists.txt

index 19b0eb59c43a996e8493e072172953f33a780702..290fb95e97b7e67a1ce42e64048fd2e08a7248bf 100644 (file)
@@ -286,7 +286,7 @@ MACRO(ProcessPackage var _name0)
         FOREACH(_arg ${${_XPREFIX}_LDFLAGS_OTHER})
             SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${_arg}")
         ENDFOREACH(_arg ${${_XPREFIX}_LDFLAGS_OTHER})
-        LIST(APPEND CMAKE_REQUIRED_LIBRARIES "${${_XPREFIX}_LIBRARIES}")
+        LIST(APPEND RSPAMD_REQUIRED_LIBRARIES "${${_XPREFIX}_LIBRARIES}")
     ENDIF(${var}_FOUND)
 ENDMACRO(ProcessPackage name)
 
@@ -325,7 +325,7 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
                                                /usr/lib
                                                /usr/local/lib
                  DOC "Path where the libintl library can be found")
-    LIST(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBINTL_LIBRARY})
+    LIST(APPEND RSPAMD_REQUIRED_LIBRARIES ${LIBINTL_LIBRARY})
        MESSAGE(STATUS "Configuring for FreeBSD")
  
 ENDIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
@@ -338,7 +338,7 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
                                                /usr/lib
                                                /usr/local/lib
                  DOC "Path where the libintl library can be found")
-    LIST(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBINTL_LIBRARY})
+    LIST(APPEND RSPAMD_REQUIRED_LIBRARIES ${LIBINTL_LIBRARY})
        MESSAGE(STATUS "Configuring for Darwin")
 
 ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
@@ -583,7 +583,7 @@ IF(LIBUTIL_LIBRARY)
                                                                                           /usr/local/include
                                DOC "Path to libutil header")
        IF(HAVE_LIBUTIL_H)
-               LIST(APPEND CMAKE_REQUIRED_LIBRARIES util)
+               LIST(APPEND RSPAMD_REQUIRED_LIBRARIES util)
                CHECK_FUNCTION_EXISTS(pidfile_open HAVE_PIDFILE)
                CHECK_FUNCTION_EXISTS(pidfile_fileno HAVE_PIDFILE_FILENO)
        ENDIF(HAVE_LIBUTIL_H)
@@ -633,6 +633,8 @@ ELSE(ENABLE_STATIC MATCHES "ON")
     ENDIF(NO_SHARED MATCHES "OFF")
 ENDIF(ENABLE_STATIC MATCHES "ON")
 
+LIST(APPEND RSPAMD_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
+
 # Process with warn flags
 SET(CMAKE_C_WARN_FLAGS "")
 CHECK_C_COMPILER_FLAG(-Wall SUPPORT_WALL)
@@ -973,7 +975,7 @@ ENDIF(OPENSSL_FOUND)
 IF(HAVE_FETCH_H)
        TARGET_LINK_LIBRARIES(rspamd fetch)
 ENDIF(HAVE_FETCH_H)
-TARGET_LINK_LIBRARIES(rspamd ${CMAKE_REQUIRED_LIBRARIES})
+TARGET_LINK_LIBRARIES(rspamd ${RSPAMD_REQUIRED_LIBRARIES})
 
 IF(ENABLE_LUAJIT MATCHES "ON")
        TARGET_LINK_LIBRARIES(rspamd "${LUAJIT_LIBRARY}")
index 2cd97a7f89353d643e6870af2d4a326b27c7d411..39191620ae10b993728d97fc7ed1ffbb6a3d2b91 100644 (file)
@@ -12,7 +12,7 @@ IF(GLIB2_VERSION VERSION_LESS "2.16")
        ADD_LIBRARY(glibadditions SHARED ${LIBGLIBSRC})
        SET_TARGET_PROPERTIES(glibadditions PROPERTIES COMPILE_FLAGS "-I${CMAKE_SOURCE_DIR}/contrib/lgpl")
        
-       TARGET_LINK_LIBRARIES(glibadditions ${CMAKE_REQUIRED_LIBRARIES})
+       TARGET_LINK_LIBRARIES(glibadditions ${RSPAMD_REQUIRED_LIBRARIES})
 
        SET_TARGET_PROPERTIES(glibadditions PROPERTIES VERSION ${RSPAMD_VERSION})
 
index fc8efff6387f34873c0458d802633d49f2ab97fc..b236be14a3a238725164adce3ed538351c96992c 100644 (file)
@@ -70,7 +70,7 @@ IF(CMAKE_COMPILER_IS_GNUCC)
 SET_TARGET_PROPERTIES(rspamd-util PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing")
 ENDIF(CMAKE_COMPILER_IS_GNUCC)
 
-TARGET_LINK_LIBRARIES(rspamd-util ${CMAKE_REQUIRED_LIBRARIES})
+TARGET_LINK_LIBRARIES(rspamd-util ${RSPAMD_REQUIRED_LIBRARIES})
 TARGET_LINK_LIBRARIES(rspamd-util pcre)
 TARGET_LINK_LIBRARIES(rspamd-util rspamd-ucl)
 TARGET_LINK_LIBRARIES(rspamd-util event)
@@ -100,16 +100,16 @@ IF(NOT DEBIAN_BUILD)
                SET_TARGET_PROPERTIES(rspamdclient_static PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing")
        ENDIF(CMAKE_COMPILER_IS_GNUCC)
        TARGET_LINK_LIBRARIES(rspamdclient rspamd-util)
-       TARGET_LINK_LIBRARIES(rspamdclient ${CMAKE_REQUIRED_LIBRARIES})
+       TARGET_LINK_LIBRARIES(rspamdclient ${RSPAMD_REQUIRED_LIBRARIES})
        TARGET_LINK_LIBRARIES(rspamdclient_static rspamd-util)
-       TARGET_LINK_LIBRARIES(rspamdclient_static ${CMAKE_REQUIRED_LIBRARIES})
+       TARGET_LINK_LIBRARIES(rspamdclient_static ${RSPAMD_REQUIRED_LIBRARIES})
 ELSE(NOT DEBIAN_BUILD)
        ADD_LIBRARY(rspamdclient STATIC ${LIBRSPAMDCLIENTSRC})
        IF(CMAKE_COMPILER_IS_GNUCC)
                SET_TARGET_PROPERTIES(rspamdclient PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing")
        ENDIF(CMAKE_COMPILER_IS_GNUCC)
        TARGET_LINK_LIBRARIES(rspamdclient rspamd-util)
-       TARGET_LINK_LIBRARIES(rspamdclient ${CMAKE_REQUIRED_LIBRARIES})
+       TARGET_LINK_LIBRARIES(rspamdclient ${RSPAMD_REQUIRED_LIBRARIES})
 ENDIF(NOT DEBIAN_BUILD)
 
 IF(NOT DEBIAN_BUILD)
index ed93a85553e5ed7a792a5962ee81c069f0de2d0c..1d48a202fb7ef374f57dcb59bc6bbc99ffd41bfc 100644 (file)
@@ -15,7 +15,7 @@ ENDIF(GLIB_COMPAT)
 IF(OPENSSL_FOUND)
        TARGET_LINK_LIBRARIES(rspamc ${OPENSSL_LIBRARIES})
 ENDIF(OPENSSL_FOUND)
-TARGET_LINK_LIBRARIES(rspamc ${CMAKE_REQUIRED_LIBRARIES})
+TARGET_LINK_LIBRARIES(rspamc ${RSPAMD_REQUIRED_LIBRARIES})
 IF(NOT DEBIAN_BUILD)
 SET_TARGET_PROPERTIES(rspamc PROPERTIES VERSION ${RSPAMD_VERSION})
 ENDIF(NOT DEBIAN_BUILD)