1
0
mirror of https://git.familie-radermacher.ch/linux/ptouch-print.git synced 2025-11-20 20:32:05 +00:00

cosmetic changes (some are overdue since many years)

This commit is contained in:
Dominic Radermacher
2022-10-05 18:08:06 +02:00
parent f56d7ea740
commit 53987c4150
4 changed files with 61 additions and 60 deletions

View File

@@ -1,3 +1,6 @@
# HB9HEI - required for autogen version.h
find_package(Git REQUIRED)
# Get commit hash
execute_process(COMMAND git log --format='%H' -n 1
OUTPUT_VARIABLE GIT_COMMIT_HASH
@@ -35,11 +38,11 @@ else()
endif()
endif()
set(VERSION "const char* GIT_BRANCH=\"${GIT_BRANCH}\";
const char* GIT_COMMIT=\"${GIT_COMMIT_SHORT}\";
const char* GIT_COMMITS=\"${GIT_COMMITS}\";
const char* GIT_TAG=\"${GIT_TAG}\";
const char* VERSION=\"${GIT_TAG}-r${GIT_COMMITS}-g${GIT_COMMIT_SHORT}${GIT_DIFF}\";
set(VERSION "#define GIT_BRANCH \"${GIT_BRANCH}\"
#define GIT_COMMIT \"${GIT_COMMIT_SHORT}\"
#define GIT_COMMITS \"${GIT_COMMITS}\"
#define GIT_TAG \"${GIT_TAG}\"
#define VERSION \"${GIT_TAG}.r${GIT_COMMITS}.g${GIT_COMMIT_SHORT}${GIT_DIFF}\"
")
message(DEBUG "Generated Version: \"${VERSION}\"")