Add version to About dialog

This commit is contained in:
2022-04-24 13:30:51 +02:00
parent cee6979ece
commit cbc6775756
5 changed files with 41 additions and 3 deletions
+19
View File
@@ -0,0 +1,19 @@
set(_build_version "unknown")
find_package(Git)
if(GIT_FOUND)
execute_process(
COMMAND ${GIT_EXECUTABLE} describe --tags HEAD
WORKING_DIRECTORY "${local_dir}"
OUTPUT_VARIABLE _build_version
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message(STATUS "GIT hash: ${_build_version}")
else()
message(STATUS "GIT not found")
endif()
message(STATUS "local:${local_dir} output:${output_dir}")
configure_file("${local_dir}/gitversion.h.in" "${output_dir}/gitversion.h" @ONLY)