aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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