build: fix hostname search

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-06-23 21:15:58 +02:00
parent c1e1083e63
commit 55646db9cc
1 changed files with 27 additions and 16 deletions

View File

@ -29,6 +29,7 @@ find_program(CAT_EXECUTABLE cat)
find_program(LN_EXECUTABLE ln) find_program(LN_EXECUTABLE ln)
find_program(GREP_EXECUTABLE grep) find_program(GREP_EXECUTABLE grep)
find_program(GIT_EXECUTABLE git) find_program(GIT_EXECUTABLE git)
find_program(HOSTNAME_EXECUTABLE hostname)
find_program(GPERF_EXECUTABLE gperf) find_program(GPERF_EXECUTABLE gperf)
# programs needed for man pages # programs needed for man pages
find_program(ASCIIDOC_EXECUTABLE asciidoc) find_program(ASCIIDOC_EXECUTABLE asciidoc)
@ -81,6 +82,16 @@ if(EXISTS ${SOURCE_DIR}/.git/HEAD)
endif() endif()
# }}} # }}}
# {{{ Get hostname
execute_process(
COMMAND ${HOSTNAME_EXECUTABLE} -f
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE BUILDHOSTNAME
OUTPUT_STRIP_TRAILING_WHITESPACE)
# }}}
# {{{ Required libraries # {{{ Required libraries
# #
# this sets up: # this sets up:
@ -177,22 +188,22 @@ endif()
if(DEFINED PREFIX) if(DEFINED PREFIX)
set(CMAKE_INSTALL_PREFIX ${PREFIX}) set(CMAKE_INSTALL_PREFIX ${PREFIX})
endif() endif()
set(AWESOME_VERSION ${VERSION} ) set(AWESOME_VERSION ${VERSION})
set(AWESOME_COMPILE_MACHINE ${CMAKE_SYSTEM_PROCESSOR} ) set(AWESOME_COMPILE_MACHINE ${CMAKE_SYSTEM_PROCESSOR})
set(AWESOME_COMPILE_HOSTNAME $ENV{HOSTNAME} ) 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_ETC etc ) set(AWESOME_ETC etc)
set(AWESOME_SHARE share ) set(AWESOME_SHARE share)
set(AWESOME_LUA_LIB_PATH ${CMAKE_INSTALL_PREFIX}/${AWESOME_SHARE}/${PROJECT_AWE_NAME}/lib ) 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_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_CONF_PATH ${CMAKE_INSTALL_PREFIX}/${AWESOME_ETC}/${PROJECT_AWE_NAME})
set(AWESOME_MAN1_PATH ${AWESOME_SHARE}/man/man1 ) set(AWESOME_MAN1_PATH ${AWESOME_SHARE}/man/man1)
set(AWESOME_MAN5_PATH ${AWESOME_SHARE}/man/man5 ) set(AWESOME_MAN5_PATH ${AWESOME_SHARE}/man/man5)
set(AWESOME_REL_LUA_LIB_PATH ${AWESOME_SHARE}/${PROJECT_AWE_NAME}/lib ) 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_CONF_PATH ${AWESOME_ETC}/${PROJECT_AWE_NAME})
set(AWESOME_REL_ICON_PATH ${AWESOME_SHARE}/${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_REL_DOC_PATH ${AWESOME_SHARE}/doc/${PROJECT_AWE_NAME)
# }}} # }}}
# {{{ Configure files. # {{{ Configure files.