Find git on Windows
This commit is contained in:
parent
12dba1a8b3
commit
c2b27fd2a1
1 changed files with 5 additions and 3 deletions
|
@ -20,10 +20,12 @@ QMAKE_CXXFLAGS += -std=c++17 -Wall
|
||||||
QMAKE_TARGET_BUNDLE_PREFIX = com.pret
|
QMAKE_TARGET_BUNDLE_PREFIX = com.pret
|
||||||
|
|
||||||
# Get latest commit hash if we can (to display alongside version information).
|
# Get latest commit hash if we can (to display alongside version information).
|
||||||
GIT_PATH = $$system(which git)
|
win32 {
|
||||||
!isEmpty(GIT_PATH) {
|
LATEST_COMMIT = $$system(git rev-parse --short HEAD 2> nul)
|
||||||
LATEST_COMMIT = $$system($$GIT_PATH rev-parse --short HEAD 2>/dev/null)
|
} else {
|
||||||
|
LATEST_COMMIT = $$system(git rev-parse --short HEAD 2>/dev/null)
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFINES += PORYMAP_LATEST_COMMIT=\\\"$$LATEST_COMMIT\\\"
|
DEFINES += PORYMAP_LATEST_COMMIT=\\\"$$LATEST_COMMIT\\\"
|
||||||
|
|
||||||
VERSION = 5.4.1
|
VERSION = 5.4.1
|
||||||
|
|
Loading…
Reference in a new issue