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(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:
@ -179,7 +190,7 @@ if(DEFINED PREFIX)
endif()
set(AWESOME_VERSION ${VERSION})
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_RELEASE ${CODENAME})
set(AWESOME_ETC etc)
@ -192,7 +203,7 @@ 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_REL_DOC_PATH ${AWESOME_SHARE}/doc/${PROJECT_AWE_NAME)
# }}}
# {{{ Configure files.