summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt8
-rw-r--r--contrib/aho-corasick/CMakeLists.txt2
2 files changed, 6 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b07fd47d4..673396e56 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -91,10 +91,12 @@ ENDIF(NOT WWWDIR)
# Set libdir
IF(NOT LIBDIR)
- SET(LIBDIR lib/rspamd)
+ SET(RSPAMD_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib/rspamd")
+ELSE(NOT LIBDIR)
+ SET(RSPAMD_LIBDIR "${LIBDIR}/rspamd")
ENDIF(NOT LIBDIR)
-SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIBDIR}")
+SET(CMAKE_INSTALL_RPATH "${RSPAMD_LIBDIR}")
# Set includedir
IF(NOT INCLUDEDIR)
@@ -404,7 +406,7 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
LIST(APPEND CMAKE_REQUIRED_LIBRARIES crypto)
SET(CMAKE_VERBOSE_MAKEFILE ON)
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
- SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/${LIBDIR}")
+ SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/${LIBDIR}:${RSPAMD_LIBDIR}")
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
# Now find libraries and headers
diff --git a/contrib/aho-corasick/CMakeLists.txt b/contrib/aho-corasick/CMakeLists.txt
index 1670a5565..3bccab7b2 100644
--- a/contrib/aho-corasick/CMakeLists.txt
+++ b/contrib/aho-corasick/CMakeLists.txt
@@ -5,4 +5,4 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQU
endif ()
ADD_LIBRARY(rspamd-actrie SHARED ${AHOCORASICSRC})
INSTALL(TARGETS rspamd-actrie
- LIBRARY DESTINATION lib/rspamd) \ No newline at end of file
+ LIBRARY DESTINATION {RSPAMD_LIBDIR})