Skip to content

Commit 0a71ed4

Browse files
floklitnyblom
authored andcommitted
src.pro: only use git to get version if VERSION is not set before
1 parent 6d0b8a6 commit 0a71ed4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/src.pro

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ if(!defined(APR_INCLUDE, var)) {
1010
}
1111
exists(local-config.pri):include(local-config.pri)
1212

13-
VERSION = $$system(git --no-pager show --pretty=oneline --no-notes | head -1 | cut -b-40)
14-
!isEmpty(VERSION){
15-
VERSION = $${VERSION}
16-
}
13+
if(!defined(VERSION, var)) {
14+
VERSION = $$system(git --no-pager show --pretty=oneline --no-notes | head -1 | cut -b-40)
15+
}
1716

1817
VERSTR = '\\"$${VERSION}\\"' # place quotes around the version string
1918
DEFINES += VER=\"$${VERSTR}\" # create a VER macro containing the version string

0 commit comments

Comments
 (0)