mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
qmake: fix a 'GIT_DIR' issue
"'GIT_DIR' is not recognized as an internal or external command", is reported if qmake is runned on Win32. To solve that we set a explicit syntax for Win32 that uses "Set.." Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8003377622
commit
639f12cc42
1 changed files with 3 additions and 1 deletions
|
@ -4,13 +4,15 @@ macx: VER_OS = darwin
|
||||||
unix: !macx: VER_OS = linux
|
unix: !macx: VER_OS = linux
|
||||||
win32: VER_OS = win
|
win32: VER_OS = win
|
||||||
exists(.git/HEAD): {
|
exists(.git/HEAD): {
|
||||||
|
win32: SET_GIT_DIR = set GIT_DIR
|
||||||
|
else: SET_GIT_DIR = GIT_DIR
|
||||||
GIT_HEAD = .git/HEAD
|
GIT_HEAD = .git/HEAD
|
||||||
VERSION_SCRIPT = $$PWD/scripts/get-version
|
VERSION_SCRIPT = $$PWD/scripts/get-version
|
||||||
# always use linux here -------------------vvv so we get the true full version
|
# always use linux here -------------------vvv so we get the true full version
|
||||||
FULL_VERSION = "`$$VERSION_SCRIPT linux`"
|
FULL_VERSION = "`$$VERSION_SCRIPT linux`"
|
||||||
PRODVERSION_STRING = $$system("sh scripts/get-version win $$FULL_VERSION || $${VERSION}.0.0")
|
PRODVERSION_STRING = $$system("sh scripts/get-version win $$FULL_VERSION || $${VERSION}.0.0")
|
||||||
VERSION_STRING = $$system("sh scripts/get-version linux $$FULL_VERSION || $${VERSION}")
|
VERSION_STRING = $$system("sh scripts/get-version linux $$FULL_VERSION || $${VERSION}")
|
||||||
version_h.depends = $$VERSION_SCRIPT $$PWD/.git/$$system("GIT_DIR=$$PWD/.git git rev-parse --symbolic-full-name HEAD")
|
version_h.depends = $$VERSION_SCRIPT $$PWD/.git/$$system("$$SET_GIT_DIR=$$PWD/.git git rev-parse --symbolic-full-name HEAD")
|
||||||
version_h.commands = echo \\$${LITERAL_HASH}define VERSION_STRING \\\"`GIT_DIR=$$PWD/.git $$VERSION_SCRIPT $$VER_OS`\\\" > ${QMAKE_FILE_OUT}
|
version_h.commands = echo \\$${LITERAL_HASH}define VERSION_STRING \\\"`GIT_DIR=$$PWD/.git $$VERSION_SCRIPT $$VER_OS`\\\" > ${QMAKE_FILE_OUT}
|
||||||
version_h.input = GIT_HEAD
|
version_h.input = GIT_HEAD
|
||||||
version_h.output = $$VERSION_FILE
|
version_h.output = $$VERSION_FILE
|
||||||
|
|
Loading…
Add table
Reference in a new issue