aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2012-06-07 19:48:27 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2012-06-07 19:48:27 +0400
commitb1cb2de69abe29bf984483479ad54947ffe675d3 (patch)
tree136b4f04e8f3011fd96edfe4742b1c81c43185a5 /src
parent6cea7f1cd0a1b504f841a37ff40ce481b8332481 (diff)
downloadrspamd-b1cb2de69abe29bf984483479ad54947ffe675d3.tar.gz
rspamd-b1cb2de69abe29bf984483479ad54947ffe675d3.zip
Allow NO_SHARED build to use static archives for internal libraries.
Check for -fPIC/-fpic support.
Diffstat (limited to 'src')
-rw-r--r--src/cdb/CMakeLists.txt9
-rw-r--r--src/json/CMakeLists.txt9
-rw-r--r--src/lua/CMakeLists.txt9
3 files changed, 15 insertions, 12 deletions
diff --git a/src/cdb/CMakeLists.txt b/src/cdb/CMakeLists.txt
index 8c7f6b3be..7c6e1257d 100644
--- a/src/cdb/CMakeLists.txt
+++ b/src/cdb/CMakeLists.txt
@@ -7,7 +7,8 @@ ADD_LIBRARY(rspamd-cdb ${LINK_TYPE} ${CDBSRC})
TARGET_LINK_LIBRARIES(rspamd-cdb rspamd-util)
SET_TARGET_PROPERTIES(rspamd-cdb PROPERTIES VERSION ${RSPAMD_VERSION})
SET_TARGET_PROPERTIES(rspamd-cdb PROPERTIES COMPILE_FLAGS "-DRSPAMD_LIB")
-INSTALL(TARGETS rspamd-cdb
- LIBRARY DESTINATION ${LIBDIR}
- PUBLIC_HEADER DESTINATION ${INCLUDEDIR}
- ARCHIVE DESTINATION ${LIBDIR}) \ No newline at end of file
+IF(NO_SHARED MATCHES "OFF")
+ INSTALL(TARGETS rspamd-cdb
+ LIBRARY DESTINATION ${LIBDIR}
+ PUBLIC_HEADER DESTINATION ${INCLUDEDIR})
+ENDIF(NO_SHARED MATCHES "OFF") \ No newline at end of file
diff --git a/src/json/CMakeLists.txt b/src/json/CMakeLists.txt
index 9b37384bb..fd15ae773 100644
--- a/src/json/CMakeLists.txt
+++ b/src/json/CMakeLists.txt
@@ -10,7 +10,8 @@ ADD_LIBRARY(rspamd-json ${LINK_TYPE} ${JSONSRC})
TARGET_LINK_LIBRARIES(rspamd-json rspamd-util)
SET_TARGET_PROPERTIES(rspamd-json PROPERTIES VERSION ${RSPAMD_VERSION})
SET_TARGET_PROPERTIES(rspamd-json PROPERTIES COMPILE_FLAGS "-DRSPAMD_LIB")
-INSTALL(TARGETS rspamd-json
- LIBRARY DESTINATION ${LIBDIR}
- PUBLIC_HEADER DESTINATION ${INCLUDEDIR}
- ARCHIVE DESTINATION ${LIBDIR})
+IF(NO_SHARED MATCHES "OFF")
+ INSTALL(TARGETS rspamd-json
+ LIBRARY DESTINATION ${LIBDIR}
+ PUBLIC_HEADER DESTINATION ${INCLUDEDIR})
+ENDIF(NO_SHARED MATCHES "OFF")
diff --git a/src/lua/CMakeLists.txt b/src/lua/CMakeLists.txt
index 0c9d93621..a2823ad7b 100644
--- a/src/lua/CMakeLists.txt
+++ b/src/lua/CMakeLists.txt
@@ -21,7 +21,8 @@ ELSE(ENABLE_LUAJIT MATCHES "ON")
TARGET_LINK_LIBRARIES(rspamd-lua "${LUA_LIBRARY}")
ENDIF(ENABLE_LUAJIT MATCHES "ON")
SET_TARGET_PROPERTIES(rspamd-lua PROPERTIES COMPILE_FLAGS "-DRSPAMD_LIB")
-INSTALL(TARGETS rspamd-lua
- LIBRARY DESTINATION ${LIBDIR}
- PUBLIC_HEADER DESTINATION ${INCLUDEDIR}
- ARCHIVE DESTINATION ${LIBDIR})
+IF(NO_SHARED MATCHES "OFF")
+ INSTALL(TARGETS rspamd-lua
+ LIBRARY DESTINATION ${LIBDIR}
+ PUBLIC_HEADER DESTINATION ${INCLUDEDIR})
+ENDIF(NO_SHARED MATCHES "OFF") \ No newline at end of file