awesomeConfig.cmake: Allow setting AWESOME_DATA_DIR

The motivation behind this patch is my distro moving to a multiarch
layout. While binaries, libraries, etc. are are installed into
/usr/{host}/{bin,lib,...} architecture-independent data should still
go to /usr/share.
This commit is contained in:
Heiko Becker 2015-03-27 09:40:42 +01:00
parent 07486f7ead
commit 0dcbf1265a
1 changed files with 7 additions and 1 deletions

View File

@ -235,6 +235,13 @@ else()
set(XDG_CONFIG_DIR ${SYSCONFDIR}/xdg CACHE PATH "xdg config directory") set(XDG_CONFIG_DIR ${SYSCONFDIR}/xdg CACHE PATH "xdg config directory")
endif() endif()
# setting AWESOME_DATA_PATH
if(DEFINED AWESOME_DATA_PATH)
set(AWESOME_DATA_PATH ${AWESOME_DATA_PATH} CACHE PATH "awesome share directory")
else()
set(AWESOME_DATA_PATH ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_AWE_NAME} CACHE PATH "awesome share directory")
endif()
# setting AWESOME_DOC_PATH # setting AWESOME_DOC_PATH
if(DEFINED AWESOME_DOC_PATH) if(DEFINED AWESOME_DOC_PATH)
set(AWESOME_DOC_PATH ${AWESOME_DOC_PATH} CACHE PATH "awesome docs directory") set(AWESOME_DOC_PATH ${AWESOME_DOC_PATH} CACHE PATH "awesome docs directory")
@ -265,7 +272,6 @@ set(AWESOME_COMPILE_HOSTNAME ${BUILDHOSTNAME})
set(AWESOME_COMPILE_BY $ENV{USER}) set(AWESOME_COMPILE_BY $ENV{USER})
set(AWESOME_RELEASE ${CODENAME}) set(AWESOME_RELEASE ${CODENAME})
set(AWESOME_SYSCONFDIR ${XDG_CONFIG_DIR}/${PROJECT_AWE_NAME}) set(AWESOME_SYSCONFDIR ${XDG_CONFIG_DIR}/${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_LUA_LIB_PATH ${AWESOME_DATA_PATH}/lib)
set(AWESOME_ICON_PATH ${AWESOME_DATA_PATH}/icons) set(AWESOME_ICON_PATH ${AWESOME_DATA_PATH}/icons)
set(AWESOME_THEMES_PATH ${AWESOME_DATA_PATH}/themes) set(AWESOME_THEMES_PATH ${AWESOME_DATA_PATH}/themes)