aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-03-31 12:49:34 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-03-31 13:29:45 +0100
commitd172dc08141734fbb07d8516c726435d48141dc8 (patch)
tree6cbb62a02efac99f042191990e457c19b534f46d /CMakeLists.txt
parent9d38464b8c74448d6d6fd0d69a7c7bddd26d317f (diff)
downloadrspamd-d172dc08141734fbb07d8516c726435d48141dc8.tar.gz
rspamd-d172dc08141734fbb07d8516c726435d48141dc8.zip
[Minor] Some fixes for static build
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 9 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7e4a02586..b7790b693 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -74,8 +74,9 @@ IF(NOT RAGEL_FOUND)
ENDIF()
IF ("${ARCH}" STREQUAL "x86_64")
- IF (ENABLE_HYPERSCAN MATCHES "ON")
+ IF (ENABLE_HYPERSCAN MATCHES "ON" OR ENABLE_STATIC MATCHES "ON")
ENABLE_LANGUAGE(CXX)
+ SET(USE_CXX_LINKER 1)
ENDIF()
ELSE()
MESSAGE(STATUS "Hyperscan support is possible only for x86_64 architecture")
@@ -566,16 +567,19 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE)
ENDIF(BUILD_CPU_MODE STREQUAL "32")
# Workaround with architecture specific includes
- IF(IS_DIRECTORY "/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")
- INCLUDE_DIRECTORIES("/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")
- LIST(APPEND CMAKE_REQUIRED_INCLUDES "/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")
- ENDIF(IS_DIRECTORY "/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")
+ #IF(IS_DIRECTORY "/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")
+ # INCLUDE_DIRECTORIES("/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")
+ # LIST(APPEND CMAKE_REQUIRED_INCLUDES "/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")
+ #ENDIF(IS_DIRECTORY "/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")
LIST(APPEND CMAKE_REQUIRED_LIBRARIES rt)
LIST(APPEND CMAKE_REQUIRED_LIBRARIES dl)
LIST(APPEND CMAKE_REQUIRED_LIBRARIES resolv)
LIST(APPEND CMAKE_REQUIRED_LIBRARIES nsl)
MESSAGE(STATUS "Configuring for Linux")
+ IF(ENABLE_STATIC MATCHES "ON")
+ LIST(APPEND CMAKE_REQUIRED_LIBRARIES z)
+ ENDIF()
IF(EXISTS "/etc/debian_version")
SET(LINUX_START_SCRIPT "rspamd_debian.in")
ELSE(EXISTS "/etc/debian_version")