Skip to content

Commit

Permalink
Fix qmake version generator
Browse files Browse the repository at this point in the history
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 fralx#471 (comment)
  • Loading branch information
aol-nnov committed Sep 20, 2024
1 parent 1ca70bb commit 601fc38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion limereport/limereport.pri
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ RESOURCES += \
$$REPORT_PATH/items/items.qrc

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 {
LR_VERSION = "0.0.0-unknown"
}
Expand Down

0 comments on commit 601fc38

Please sign in to comment.