From 0dcbf1265a261fd56c76d7556ed890cb2c05fcc7 Mon Sep 17 00:00:00 2001 From: Heiko Becker Date: Fri, 27 Mar 2015 09:40:42 +0100 Subject: [PATCH] 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. --- awesomeConfig.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/awesomeConfig.cmake b/awesomeConfig.cmake index e2bb98c4..eb4e1280 100644 --- a/awesomeConfig.cmake +++ b/awesomeConfig.cmake @@ -235,6 +235,13 @@ else() set(XDG_CONFIG_DIR ${SYSCONFDIR}/xdg CACHE PATH "xdg config directory") 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 if(DEFINED AWESOME_DOC_PATH) 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_RELEASE ${CODENAME}) 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_ICON_PATH ${AWESOME_DATA_PATH}/icons) set(AWESOME_THEMES_PATH ${AWESOME_DATA_PATH}/themes)