1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Show git hash in version string at top left corner of window

This commit is contained in:
Kahrl 2013-09-25 04:29:07 +02:00
parent 372d638ec1
commit 8bc7ea61b9
16 changed files with 137 additions and 22 deletions

View file

@ -0,0 +1,20 @@
# Always run during 'make'
if(VERSION_EXTRA)
set(VERSION_GITHASH "${VERSION_STRING}")
else(VERSION_EXTRA)
execute_process(COMMAND git describe --always --tag --dirty
WORKING_DIRECTORY "${GENERATE_VERSION_SOURCE_DIR}"
OUTPUT_VARIABLE VERSION_GITHASH OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
if(VERSION_GITHASH)
message(STATUS "*** Detected git version ${VERSION_GITHASH} ***")
else()
set(VERSION_GITHASH "${VERSION_STRING}")
endif()
endif()
configure_file(
${GENERATE_VERSION_SOURCE_DIR}/cmake_config_githash.h.in
${GENERATE_VERSION_BINARY_DIR}/cmake_config_githash.h)