-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversion.pri
More file actions
19 lines (18 loc) · 771 Bytes
/
Copy pathversion.pri
File metadata and controls
19 lines (18 loc) · 771 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
APP_VERSION = 0.5.1
APP_REVISION = $(shell hg identify -i)
#uncomment the below line in a source package and fill-in the correct revision
#APP_REVISION = <rev-hash>@
APP_VERSION_FILE = version.cpp
revtarget.target = $$APP_VERSION_FILE
win32:revtarget.commands = echo "const char *version = \"$$APP_VERSION\";" \
"const char *revision = \"$$APP_REVISION\";" \
> $$APP_VERSION_FILE
unix:revtarget.commands = echo \
"\"const char *version = \\\"$$APP_VERSION\\\";" \
"const char *revision = \\\"$$APP_REVISION\\\";\"" \
> $$APP_VERSION_FILE
revtarget.depends = $$SOURCES $$HEADERS $$FORMS $$POST_TARGETDEPS
SOURCES += $$APP_VERSION_FILE
QMAKE_EXTRA_TARGETS += revtarget
POST_TARGETDEPS += $$APP_VERSION_FILE
QMAKE_DISTCLEAN += $$APP_VERSION_FILE