]> source.dussan.org Git - rspamd.git/commitdiff
Some improvement in building for unknown systems.
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Wed, 3 Aug 2011 14:30:25 +0000 (18:30 +0400)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Wed, 3 Aug 2011 14:30:25 +0000 (18:30 +0400)
CMakeLists.txt

index 49afeb6cf68daec67e6a9972f9fe4454fc2ae210..4fc1279582ab5a3e8d8a7b42e5825407a07d0211 100644 (file)
@@ -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")