diff options
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") |