From 2e7e7ae57f3e17a774e16324881a8f4069b4bbdc Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 11 Jun 2012 14:47:01 +0200 Subject: [PATCH] Remove PREFIX, use CMAKE_INSTALL_PREFIX Signed-off-by: Julien Danjou --- awesomeConfig.cmake | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/awesomeConfig.cmake b/awesomeConfig.cmake index 8d387d58..e735c983 100644 --- a/awesomeConfig.cmake +++ b/awesomeConfig.cmake @@ -227,19 +227,12 @@ endif() # }}} # {{{ Install path and configuration variables -if(DEFINED PREFIX) - set(PREFIX ${PREFIX} CACHE PATH "install prefix") - set(CMAKE_INSTALL_PREFIX ${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(SYSCONFDIR ${SYSCONFDIR} CACHE PATH "config directory") else() - set(SYSCONFDIR ${PREFIX}/etc CACHE PATH "config directory") + set(SYSCONFDIR ${CMAKE_INSTALL_PREFIX}/etc CACHE PATH "config directory") endif() #If an XDG Config Dir is specificed, use it instead @@ -254,25 +247,25 @@ endif() if(DEFINED AWESOME_DOC_PATH) set(AWESOME_DOC_PATH ${AWESOME_DOC_PATH} CACHE PATH "awesome docs directory") else() - set(AWESOME_DOC_PATH ${PREFIX}/share/doc/${PROJECT_AWE_NAME} CACHE PATH "awesome docs directory") + set(AWESOME_DOC_PATH ${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_AWE_NAME} CACHE PATH "awesome docs directory") endif() # setting AWESOME_XSESSION_PATH if(DEFINED AWESOME_XSESSION_PATH) set(AWESOME_XSESSION_PATH ${AWESOME_XSESSION_PATH} CACHE PATH "awesome xsessions directory") else() - set(AWESOME_XSESSION_PATH ${PREFIX}/share/xsessions CACHE PATH "awesome xsessions directory") + set(AWESOME_XSESSION_PATH ${CMAKE_INSTALL_PREFIX}/share/xsessions CACHE PATH "awesome xsessions directory") endif() # set man path if(DEFINED AWESOME_MAN_PATH) set(AWESOME_MAN_PATH ${AWESOME_MAN_PATH} CACHE PATH "awesome manpage directory") else() - set(AWESOME_MAN_PATH ${PREFIX}/share/man CACHE PATH "awesome manpage directory") + set(AWESOME_MAN_PATH ${CMAKE_INSTALL_PREFIX}/share/man CACHE PATH "awesome manpage directory") endif() # Hide to avoid confusion -mark_as_advanced(CMAKE_INSTALL_PREFIX) +mark_as_advanced(CMAKE_INSTALL_CMAKE_INSTALL_PREFIX) set(AWESOME_VERSION ${VERSION}) set(AWESOME_COMPILE_MACHINE ${CMAKE_SYSTEM_PROCESSOR}) @@ -280,7 +273,7 @@ set(AWESOME_COMPILE_HOSTNAME ${BUILDHOSTNAME}) set(AWESOME_COMPILE_BY $ENV{USER}) set(AWESOME_RELEASE ${CODENAME}) set(AWESOME_SYSCONFDIR ${XDG_CONFIG_DIR}/${PROJECT_AWE_NAME}) -set(AWESOME_DATA_PATH ${PREFIX}/share/${PROJECT_AWE_NAME}) +set(AWESOME_DATA_PATH ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_AWE_NAME}) set(AWESOME_LUA_LIB_PATH ${AWESOME_DATA_PATH}/lib) set(AWESOME_ICON_PATH ${AWESOME_DATA_PATH}/icons) set(AWESOME_THEMES_PATH ${AWESOME_DATA_PATH}/themes)