diff --git a/CMakeLists.txt b/CMakeLists.txt index 11dc197c1..5034bcf3e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -299,16 +299,16 @@ endif() # {{{ Installation. install(TARGETS ${PROJECT_AWE_NAME} ${PROJECT_AWECLIENT_NAME} RUNTIME DESTINATION bin) -install(FILES ${AWE_LUA_FILES} DESTINATION ${AWESOME_REL_LUA_LIB_PATH}) -install(FILES ${AWE_CONF_FILES} DESTINATION ${AWESOME_REL_CONF_PATH}) +install(FILES ${AWE_LUA_FILES} DESTINATION ${AWESOME_LUA_LIB_PATH}) +install(FILES ${AWE_CONF_FILES} DESTINATION ${AWESOME_CONF_PATH}) if(GENERATE_MANPAGES) - install(FILES ${AWE_MAN1_FILES} DESTINATION ${AWESOME_MAN1_PATH}) - install(FILES ${AWE_MAN5_FILES} DESTINATION ${AWESOME_MAN5_PATH}) + install(FILES ${AWE_MAN1_FILES} DESTINATION ${AWESOME_MAN_PATH}/man1) + install(FILES ${AWE_MAN5_FILES} DESTINATION ${AWESOME_MAN_PATH}/man5) endif() -install(DIRECTORY ${AWE_ICON_DIR} DESTINATION ${AWESOME_REL_ICON_PATH}) -install(FILES ${AWE_DOC_FILES} DESTINATION ${AWESOME_REL_DOC_PATH}) -if(LUADOC_EXECUTABLE) - install(DIRECTORY ${BUILD_DIR}/luadoc DESTINATION ${AWESOME_REL_DOC_PATH}) +install(DIRECTORY ${AWE_ICON_DIR} DESTINATION ${AWESOME_DATA_PATH}) +install(FILES ${AWE_DOC_FILES} DESTINATION ${AWESOME_DOC_PATH}) +if(GENERATE_LUADOC) + install(DIRECTORY ${BUILD_DIR}/luadoc DESTINATION ${AWESOME_DOC_PATH}) endif() # }}} diff --git a/awesomeConfig.cmake b/awesomeConfig.cmake index 562f43824..e0d74d388 100644 --- a/awesomeConfig.cmake +++ b/awesomeConfig.cmake @@ -209,7 +209,7 @@ endif() if(DEFINED SYSCONFDIR) set(AWESOME_ETC ${SYSCONFDIR}) else() - set(AWESOME_ETC etc) + set(AWESOME_ETC ${CMAKE_INSTALL_PREFIX}/etc) endif() set(AWESOME_VERSION ${VERSION}) @@ -217,16 +217,12 @@ set(AWESOME_COMPILE_MACHINE ${CMAKE_SYSTEM_PROCESSOR}) set(AWESOME_COMPILE_HOSTNAME ${BUILDHOSTNAME}) set(AWESOME_COMPILE_BY $ENV{USER}) set(AWESOME_RELEASE ${CODENAME}) -set(AWESOME_SHARE share) -set(AWESOME_LUA_LIB_PATH ${CMAKE_INSTALL_PREFIX}/${AWESOME_SHARE}/${PROJECT_AWE_NAME}/lib) -set(AWESOME_ICON_PATH ${CMAKE_INSTALL_PREFIX}/${AWESOME_SHARE}/${PROJECT_AWE_NAME}/icons) -set(AWESOME_CONF_PATH ${CMAKE_INSTALL_PREFIX}/${AWESOME_ETC}/${PROJECT_AWE_NAME}) -set(AWESOME_MAN1_PATH ${AWESOME_SHARE}/man/man1) -set(AWESOME_MAN5_PATH ${AWESOME_SHARE}/man/man5) -set(AWESOME_REL_LUA_LIB_PATH ${AWESOME_SHARE}/${PROJECT_AWE_NAME}/lib) -set(AWESOME_REL_CONF_PATH ${AWESOME_ETC}/${PROJECT_AWE_NAME}) -set(AWESOME_REL_ICON_PATH ${AWESOME_SHARE}/${PROJECT_AWE_NAME}) -set(AWESOME_REL_DOC_PATH ${AWESOME_SHARE}/doc/${PROJECT_AWE_NAME}) +set(AWESOME_CONF_PATH ${AWESOME_ETC}/${PROJECT_AWE_NAME}) +set(AWESOME_DATA_PATH ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_AWE_NAME}) +set(AWESOME_DOC_PATH ${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_AWE_NAME}) +set(AWESOME_MAN_PATH ${CMAKE_INSTALL_PREFIX}/share/man) +set(AWESOME_LUA_LIB_PATH ${AWESOME_DATA_PATH}/lib) +set(AWESOME_ICON_PATH ${AWESOME_DATA_PATH}/icons) # }}} # {{{ Configure files.