diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-06-05 19:22:57 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-06-05 19:22:57 +0400 |
commit | 20c329815f2855d7c1356c3bbe26bddca20ac281 (patch) | |
tree | 9eede9a52174f7ab6dc4911cd7f86afffb37156f /lib | |
parent | 35cb2b6e2f17a518d0c940985e6e19b41fdedf19 (diff) | |
download | rspamd-20c329815f2855d7c1356c3bbe26bddca20ac281.tar.gz rspamd-20c329815f2855d7c1356c3bbe26bddca20ac281.zip |
Fix static build.
As there are too many changes from 0.4.7 mark this version as 0.5.0.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CMakeLists.txt | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 2ef90dec2..09b3dcdd2 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -57,7 +57,7 @@ SET(LIBRSPAMDMIMESRC # Add targets # Rspamdutil -ADD_LIBRARY(rspamd-util SHARED ${LIBRSPAMDUTILSRC}) +ADD_LIBRARY(rspamd-util ${LINK_TYPE} ${LIBRSPAMDUTILSRC}) IF(CMAKE_COMPILER_IS_GNUCC) SET_TARGET_PROPERTIES(rspamd-util PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing") ENDIF(CMAKE_COMPILER_IS_GNUCC) @@ -80,7 +80,7 @@ INSTALL(TARGETS rspamd-util ARCHIVE DESTINATION ${LIBDIR}) # Rspamd client -ADD_LIBRARY(rspamdclient SHARED ${LIBRSPAMDCLIENTSRC}) +ADD_LIBRARY(rspamdclient ${LINK_TYPE} ${LIBRSPAMDCLIENTSRC}) ADD_LIBRARY(rspamdclient_static STATIC ${LIBRSPAMDCLIENTSRC}) SET_TARGET_PROPERTIES(rspamdclient PROPERTIES PUBLIC_HEADER "client/librspamdclient.h") @@ -117,15 +117,14 @@ IF(WITH_SQLITE) LIST(APPEND LIBRSPAMDSERVERSRC ../src/kvstorage_sqlite.c) ENDIF(WITH_SQLITE) -ADD_LIBRARY(rspamd-server SHARED ${LIBRSPAMDSERVERSRC}) -SET_TARGET_PROPERTIES(rspamd-server PROPERTIES LINKER_LANGUAGE C) -SET_TARGET_PROPERTIES(rspamd-server PROPERTIES COMPILE_FLAGS "-DRSPAMD_LIB") +ADD_LIBRARY(rspamd-server ${LINK_TYPE} ${LIBRSPAMDSERVERSRC}) +SET_TARGET_PROPERTIES(rspamd-server PROPERTIES LINKER_LANGUAGE C COMPILE_FLAGS "-DRSPAMD_LIB") TARGET_LINK_LIBRARIES(rspamd-server rspamd-lua) TARGET_LINK_LIBRARIES(rspamd-server rspamd-json) TARGET_LINK_LIBRARIES(rspamd-server rspamd-cdb) TARGET_LINK_LIBRARIES(rspamd-server rspamd-util) IF(CMAKE_COMPILER_IS_GNUCC) -SET_TARGET_PROPERTIES(rspamd-server PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing") +SET_TARGET_PROPERTIES(rspamd-server PROPERTIES COMPILE_FLAGS "-DRSPAMD_LIB -fno-strict-aliasing") ENDIF(CMAKE_COMPILER_IS_GNUCC) IF(WITH_DB) @@ -144,13 +143,13 @@ INSTALL(TARGETS rspamd-server ARCHIVE DESTINATION ${LIBDIR}) # Librspamdmime -ADD_LIBRARY(rspamd-mime SHARED ${LIBRSPAMDMIMESRC}) +ADD_LIBRARY(rspamd-mime ${LINK_TYPE} ${LIBRSPAMDMIMESRC}) SET_TARGET_PROPERTIES(rspamd-mime PROPERTIES LINKER_LANGUAGE C) SET_TARGET_PROPERTIES(rspamd-mime PROPERTIES COMPILE_FLAGS "-DRSPAMD_LIB") TARGET_LINK_LIBRARIES(rspamd-mime rspamd-server) TARGET_LINK_LIBRARIES(rspamd-mime rspamd-util) IF(CMAKE_COMPILER_IS_GNUCC) -SET_TARGET_PROPERTIES(rspamd-mime PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing") +SET_TARGET_PROPERTIES(rspamd-mime PROPERTIES COMPILE_FLAGS "-DRSPAMD_LIB -fno-strict-aliasing") ENDIF(CMAKE_COMPILER_IS_GNUCC) IF(GMIME24) @@ -166,7 +165,7 @@ INSTALL(TARGETS rspamd-mime # Libkvstorageclient -ADD_LIBRARY(kvstorageclient SHARED ${LIBRKVSTORAGESRC}) +ADD_LIBRARY(kvstorageclient ${LINK_TYPE} ${LIBRKVSTORAGESRC}) ADD_LIBRARY(kvstorageclient_static STATIC ${LIBRKVSTORAGESRC}) SET_TARGET_PROPERTIES(kvstorageclient PROPERTIES PUBLIC_HEADER "kvstorage/libkvstorageclient.h") |