aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/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 /src/client/CMakeLists.txt
parent92db94f91b7c4b39859b4af251dd333ebbfbf748 (diff)
downloadrspamd-e372eb2d479d2c9455099cd4a60ca173eb9b6971.tar.gz
rspamd-e372eb2d479d2c9455099cd4a60ca173eb9b6971.zip
Fix static build.
Diffstat (limited to 'src/client/CMakeLists.txt')
-rw-r--r--src/client/CMakeLists.txt14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt
index 37ca91043..a486f24d2 100644
--- a/src/client/CMakeLists.txt
+++ b/src/client/CMakeLists.txt
@@ -4,14 +4,18 @@ SET(RSPAMCSRC rspamc.c)
ADD_EXECUTABLE(rspamc ${RSPAMCSRC})
SET_TARGET_PROPERTIES(rspamc PROPERTIES COMPILE_FLAGS "-I${CMAKE_SOURCE_DIR}/lib")
TARGET_LINK_LIBRARIES(rspamc rspamdserver)
-TARGET_LINK_LIBRARIES(rspamc rspamdclient)
+IF(ENABLE_STATIC MATCHES "ON")
+ TARGET_LINK_LIBRARIES(rspamc rspamdclient_static)
+ELSE(ENABLE_STATIC MATCHES "ON")
+ TARGET_LINK_LIBRARIES(rspamc rspamdclient)
+ENDIF(ENABLE_STATIC MATCHES "ON")
TARGET_LINK_LIBRARIES(rspamc pcre)
-TARGET_LINK_LIBRARIES(rspamc ${CMAKE_REQUIRED_LIBRARIES})
-TARGET_LINK_LIBRARIES(rspamc ${GLIB2_LIBRARIES})
-SET_TARGET_PROPERTIES(rspamc PROPERTIES VERSION ${RSPAMD_VERSION})
-
IF(GLIB_COMPAT)
TARGET_LINK_LIBRARIES(rspamc glibadditions)
ENDIF(GLIB_COMPAT)
+TARGET_LINK_LIBRARIES(rspamc ${GLIB2_LIBRARIES})
+TARGET_LINK_LIBRARIES(rspamc ${CMAKE_REQUIRED_LIBRARIES})
+TARGET_LINK_LIBRARIES(rspamc m)
+SET_TARGET_PROPERTIES(rspamc PROPERTIES VERSION ${RSPAMD_VERSION})
INSTALL(TARGETS rspamc RUNTIME DESTINATION bin)