0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-23 16:22:58 +03:00

Fix qmake version generator

cmake's `execute_process()` has `WORKING_DIRECTORY` parameter, but qmake's `$$system()` does not.

As a workaround for qmake, `git` command was called with `--git-dir` provided explicitly.
But for dirtyness detection we need `--work-tree`, too.

Follow-up for https://github.com/fralx/LimeReport/pull/471#issuecomment-2362114994
This commit is contained in:
Андрей Лухнов 2024-09-20 08:03:38 +03:00
parent 1ca70bbf8b
commit 601fc38f06

View File

@ -215,7 +215,7 @@ RESOURCES += \
$$REPORT_PATH/items/items.qrc $$REPORT_PATH/items/items.qrc
system("git --version") { system("git --version") {
LR_VERSION = $$system("git --git-dir=$$PWD/../.git describe --tags --dirty") LR_VERSION = $$system("git --git-dir=$$PWD/../.git --work-tree=$$PWD/.. describe --tags --dirty")
} else { } else {
LR_VERSION = "0.0.0-unknown" LR_VERSION = "0.0.0-unknown"
} }