cmake: cache PREFIX/SYSCONFDIR so they are editable via ccmake

This commit is contained in:
Michael Gehring 2008-06-26 15:47:24 +02:00 committed by Julien Danjou
parent 7d2c5da8dd
commit a24a38dbc0
1 changed files with 6 additions and 4 deletions

View File

@ -202,15 +202,17 @@ endif()
# {{{ Install path and configuration variables.
if(DEFINED PREFIX)
set(CMAKE_INSTALL_PREFIX ${PREFIX})
set(PREFIX ${PREFIX} CACHE PATH "install prefix")
else()
set(PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "install prefix")
endif()
#If a sysconfdir is specified, use it instead
#of the default configuration dir.
if(DEFINED SYSCONFDIR)
set(AWESOME_ETC ${SYSCONFDIR})
set(SYSCONFDIR ${SYSCONFDIR} CACHE PATH "config directory")
else()
set(AWESOME_ETC ${CMAKE_INSTALL_PREFIX}/etc)
set(SYSCONFDIR ${PREFIX}/etc CACHE PATH "config directory")
endif()
set(AWESOME_VERSION ${VERSION})