Fix version and commit display

Made version and commit variables static, and local to the version
display function. Previously, they would be globals, and as such would
collide with those from linked shared libraries. Now, all project types
will have them local.
This commit is contained in:
2024-12-31 11:58:35 +01:00
parent 178b2f4860
commit c83be332d5
2 changed files with 4 additions and 4 deletions

View File

@ -2,8 +2,8 @@ include premake.make
# git commit hash and version for this build
COMMIT-HASH != git log 2>/dev/null | sed -e '1s/^commit //;q'
COMMIT := "const char* commit = \"$(COMMIT-HASH)\";"
VERSION := "const char* version = \"$(MAJOR).$(MINOR).$(PATCH)\";"
COMMIT := "static const char* commit = \"$(COMMIT-HASH)\";"
VERSION := "static const char* version = \"$(MAJOR).$(MINOR).$(PATCH)\";"
# some important install locations
PREFIX ?= /usr/local