aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-11-02 19:53:18 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-11-02 19:53:18 +0300
commite372eb2d479d2c9455099cd4a60ca173eb9b6971 (patch)
tree443981fb531821c5864cc795b000b263e95ae305 /CMakeLists.txt
parent92db94f91b7c4b39859b4af251dd333ebbfbf748 (diff)
downloadrspamd-e372eb2d479d2c9455099cd4a60ca173eb9b6971.tar.gz
rspamd-e372eb2d479d2c9455099cd4a60ca173eb9b6971.zip
Fix static build.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt17
1 files changed, 9 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ed0cc130c..702775fe7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,7 +42,6 @@ INCLUDE(CheckCCompilerFlag)
INCLUDE(FindPerl)
# Initial set
-SET(CMAKE_REQUIRED_LIBRARIES m)
IF(CMAKE_INSTALL_PREFIX)
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
@@ -489,7 +488,7 @@ ENDIF(ENABLE_PROFILING MATCHES "ON")
IF(ENABLE_STATIC MATCHES "ON")
SET(BUILD_STATIC 1)
- SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
+ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static -pthread")
MESSAGE(STATUS "Static build of rspamd, no custom plugins support")
ENDIF(ENABLE_STATIC MATCHES "ON")
@@ -816,12 +815,6 @@ SET_TARGET_PROPERTIES(rspamd PROPERTIES VERSION ${RSPAMD_VERSION})
TARGET_LINK_LIBRARIES(rspamd rspamdserver)
-IF(ENABLE_LUAJIT MATCHES "ON")
- TARGET_LINK_LIBRARIES(rspamd "${LUAJIT_LIBRARY}")
-ELSE(ENABLE_LUAJIT MATCHES "ON")
- TARGET_LINK_LIBRARIES(rspamd "${LUA_LIBRARY}")
-ENDIF(ENABLE_LUAJIT MATCHES "ON")
-
IF(LIBJUDY_LIBRARY)
TARGET_LINK_LIBRARIES(rspamd Judy)
ENDIF(LIBJUDY_LIBRARY)
@@ -846,8 +839,15 @@ ELSE(GMIME24)
ENDIF(GMIME24)
IF(ENABLE_STATIC MATCHES "ON")
TARGET_LINK_LIBRARIES(rspamd ${PCRE_LIBRARIES})
+ TARGET_LINK_LIBRARIES(rspamd ffi)
ENDIF(ENABLE_STATIC MATCHES "ON")
+IF(ENABLE_LUAJIT MATCHES "ON")
+ TARGET_LINK_LIBRARIES(rspamd "${LUAJIT_LIBRARY}")
+ELSE(ENABLE_LUAJIT MATCHES "ON")
+ TARGET_LINK_LIBRARIES(rspamd "${LUA_LIBRARY}")
+ENDIF(ENABLE_LUAJIT MATCHES "ON")
+
IF(ENABLE_GPERF_TOOLS MATCHES "ON")
TARGET_LINK_LIBRARIES(rspamd profiler)
ENDIF(ENABLE_GPERF_TOOLS MATCHES "ON")
@@ -855,6 +855,7 @@ ENDIF(ENABLE_GPERF_TOOLS MATCHES "ON")
IF(GLIB_COMPAT)
TARGET_LINK_LIBRARIES(rspamd glibadditions)
ENDIF(GLIB_COMPAT)
+TARGET_LINK_LIBRARIES(rspamd m)
##################### INSTALLATION ##########################################