From 6b86782ce21caad081d41f54ef10233a8e757189 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 3 Aug 2011 18:30:25 +0400 Subject: [PATCH] Some improvement in building for unknown systems. --- CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 49afeb6cf..4fc127958 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -179,6 +179,17 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS") MESSAGE(STATUS "Configuring for Solaris") ENDIF(CMAKE_SYSTEM_NAME STREQUAL "SunOS") +IF(NOT ETC_PREFIX) + IF(CMAKE_INSTALL_PREFIX) + MESSAGE(WARNING "Your system is unknown for rspamd, assume defining ETC_PREFIX and MAN_PREFIX by -D option, now ETC_PREFIX and MAN_PREFIX are relative to ${CMAKE_INSTALL_PREFIX}") + SET(ETC_PREFIX "${CMAKE_INSTALL_PREFIX}/etc") + SET(MAN_PREFIX "${CMAKE_INSTALL_PREFIX}/man") + ELSE(CMAKE_INSTALL_PREFIX) + MESSAGE(FATAL_ERROR "Your system is unknown for rspamd and no CMAKE_INSTALL_PREFIX specified, assume defining CMAKE_INSTALL_PREFIX") + ENDIF(CMAKE_INSTALL_PREFIX) + MESSAGE(STATUS "Configuring for ${CMAKE_SYSTEM_NAME}") +ENDIF(NOT ETC_PREFIX) + INCLUDE(FindLua51) # Check for luajit IF(ENABLE_LUAJIT MATCHES "ON") -- 2.39.5