aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2015-04-24 22:21:39 +0200
committerAndrew Lewis <nerf@judo.za.org>2015-04-24 22:21:39 +0200
commit549402f683d494c10f9fd23bac4f2a6f4949e538 (patch)
tree9b539aaa46d9a1746db756d79ad73c52ed811cfb
parenta7de8c10d877c7e65853b7992cf247418f20f11c (diff)
downloadrspamd-549402f683d494c10f9fd23bac4f2a6f4949e538.tar.gz
rspamd-549402f683d494c10f9fd23bac4f2a6f4949e538.zip
Try fix RPATH
-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})