]> source.dussan.org Git - rspamd.git/commitdiff
Try fix RPATH 272/head
authorAndrew Lewis <nerf@judo.za.org>
Fri, 24 Apr 2015 20:21:39 +0000 (22:21 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Fri, 24 Apr 2015 20:21:39 +0000 (22:21 +0200)
CMakeLists.txt
contrib/aho-corasick/CMakeLists.txt

index b07fd47d4720bae32e64679f74eaa0ec3c5e9dab..673396e566611d73f7b4401702cbb8bd6d4ec919 100644 (file)
@@ -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
index 1670a556590224fd783ec7bae8587239f3d7a9d9..3bccab7b2d795f22b649cf3cc0cfae57794f78e3 100644 (file)
@@ -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})