summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-04-24 17:08:04 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-04-24 17:08:04 +0100
commita7de8c10d877c7e65853b7992cf247418f20f11c (patch)
tree365c287cea964b0c3b271e9fd19ba3f38c329162
parent8f6bde8c1eb6872631f5b1177f1d8121cedf3863 (diff)
downloadrspamd-a7de8c10d877c7e65853b7992cf247418f20f11c.tar.gz
rspamd-a7de8c10d877c7e65853b7992cf247418f20f11c.zip
Try to fix mess with rpath.
-rw-r--r--CMakeLists.txt12
1 files changed, 7 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3174c6334..b07fd47d4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -92,11 +92,10 @@ ENDIF(NOT WWWDIR)
# Set libdir
IF(NOT LIBDIR)
SET(LIBDIR lib/rspamd)
- IF(NOT CMAKE_INSTALL_RPATH)
- SET(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${LIBDIR})
- ENDIF(NOT CMAKE_INSTALL_RPATH)
ENDIF(NOT LIBDIR)
+SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIBDIR}")
+
# Set includedir
IF(NOT INCLUDEDIR)
SET(INCLUDEDIR include/rspamd)
@@ -329,7 +328,10 @@ ENDIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
IF(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_BSD_SOURCE -DDARWIN")
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS} -undefined dynamic_lookup")
- SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pagezero_size 10000 -image_base 100000000")
+ IF(ENABLE_LUAJIT MATCHES "ON")
+ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}
+ -pagezero_size 10000 -image_base 100000000")
+ ENDIF(ENABLE_LUAJIT MATCHES "ON")
MESSAGE(STATUS "Configuring for Darwin")
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
@@ -402,7 +404,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 "${PREFIX}/lib")
+ SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/${LIBDIR}")
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
# Now find libraries and headers