diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-08-15 11:25:36 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-08-15 11:25:36 +0100 |
commit | 5a8c4600f749f5bc39132b283d88e2319d79eaeb (patch) | |
tree | 7b650bf53ef9f205d56e286cc983021b97e99a2b /src/client | |
parent | 812ef40c29c951525000d974573c420edb71c035 (diff) | |
download | rspamd-5a8c4600f749f5bc39132b283d88e2319d79eaeb.tar.gz rspamd-5a8c4600f749f5bc39132b283d88e2319d79eaeb.zip |
Fix linkage for rspamc if NO_SHARED is ON.
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/CMakeLists.txt | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt index 90936f037..aa4b8023d 100644 --- a/src/client/CMakeLists.txt +++ b/src/client/CMakeLists.txt @@ -1,10 +1,15 @@ # Librspamdclient SET(LIBRSPAMDCLIENTSRC rspamdclient.c) -ADD_LIBRARY(rspamdclient SHARED ${LIBRSPAMDCLIENTSRC}) -IF(CMAKE_COMPILER_IS_GNUCC) - SET_TARGET_PROPERTIES(rspamdclient PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing") -ENDIF(CMAKE_COMPILER_IS_GNUCC) +IF(NO_SHARED MATCHES "OFF") + ADD_LIBRARY(rspamdclient SHARED ${LIBRSPAMDCLIENTSRC}) +ELSE(NO_SHARED MATCHES "OFF") + ADD_LIBRARY(rspamdclient STATIC ${LIBRSPAMDCLIENTSRC}) +ENDIF(NO_SHARED MATCHES "OFF") +ADD_LIBRARY(rspamdclient_static STATIC ${LIBRSPAMDCLIENTSRC}) + +SET_TARGET_PROPERTIES(rspamdclient PROPERTIES COMPILE_FLAGS "-fPIC") +SET_TARGET_PROPERTIES(rspamdclient_static PROPERTIES COMPILE_FLAGS "-fPIC") TARGET_LINK_LIBRARIES(rspamdclient rspamd-util) TARGET_LINK_LIBRARIES(rspamdclient ${RSPAMD_REQUIRED_LIBRARIES}) |