diff --git a/awesomeConfig.cmake b/awesomeConfig.cmake index ba09c770c..6c13f49d1 100644 --- a/awesomeConfig.cmake +++ b/awesomeConfig.cmake @@ -29,6 +29,7 @@ find_program(CAT_EXECUTABLE cat) find_program(LN_EXECUTABLE ln) find_program(GREP_EXECUTABLE grep) find_program(GIT_EXECUTABLE git) +find_program(HOSTNAME_EXECUTABLE hostname) find_program(GPERF_EXECUTABLE gperf) # programs needed for man pages find_program(ASCIIDOC_EXECUTABLE asciidoc) @@ -81,6 +82,16 @@ if(EXISTS ${SOURCE_DIR}/.git/HEAD) endif() # }}} +# {{{ Get hostname + +execute_process( + COMMAND ${HOSTNAME_EXECUTABLE} -f + WORKING_DIRECTORY ${SOURCE_DIR} + OUTPUT_VARIABLE BUILDHOSTNAME + OUTPUT_STRIP_TRAILING_WHITESPACE) + +# }}} + # {{{ Required libraries # # this sets up: @@ -177,22 +188,22 @@ endif() if(DEFINED PREFIX) set(CMAKE_INSTALL_PREFIX ${PREFIX}) endif() -set(AWESOME_VERSION ${VERSION} ) -set(AWESOME_COMPILE_MACHINE ${CMAKE_SYSTEM_PROCESSOR} ) -set(AWESOME_COMPILE_HOSTNAME $ENV{HOSTNAME} ) -set(AWESOME_COMPILE_BY $ENV{USER} ) -set(AWESOME_RELEASE ${CODENAME} ) -set(AWESOME_ETC etc ) -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_VERSION ${VERSION}) +set(AWESOME_COMPILE_MACHINE ${CMAKE_SYSTEM_PROCESSOR}) +set(AWESOME_COMPILE_HOSTNAME ${BUILDHOSTNAME}) +set(AWESOME_COMPILE_BY $ENV{USER}) +set(AWESOME_RELEASE ${CODENAME}) +set(AWESOME_ETC etc) +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) # }}} # {{{ Configure files.