From 549402f683d494c10f9fd23bac4f2a6f4949e538 Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Fri, 24 Apr 2015 22:21:39 +0200 Subject: Try fix RPATH --- CMakeLists.txt | 8 +++++--- contrib/aho-corasick/CMakeLists.txt | 2 +- 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}) -- cgit v1.2.3