- use sane defaults for those alien parameters so we dont force the developer
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Thu, 11 Oct 2007 10:16:29 +0000 (10:16 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Thu, 11 Oct 2007 10:16:29 +0000 (10:16 +0000)
  to specify them

CMakeLists.txt

index ee0d7bd..6c319cd 100644 (file)
@@ -14,7 +14,12 @@ MESSAGE(STATUS "Libraries will be installed in ${LIB_INSTALL_DIR}" )
 # system configuration dir (etc)
 
 IF( NOT DEFINED SYSCONFDIR )
-  SET( SYSCONFDIR /etc )
+  IF ( ${CMAKE_INSTALL_PREFIX} STREQUAL "/usr" )
+    # if installing in usr, set sysconfg to etc
+    SET( SYSCONFDIR /etc )
+  ELSE ( ${CMAKE_INSTALL_PREFIX} STREQUAL "/usr" )
+    SET ( SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc" )
+  ENDIF ( ${CMAKE_INSTALL_PREFIX} STREQUAL "/usr" )
 ENDIF( NOT DEFINED SYSCONFDIR )
 MESSAGE(STATUS "Config files will be installed in ${SYSCONFDIR}" )