1 | SVNVERSION = $$system(svnversion . 2>/dev/null) |
---|
2 | |
---|
3 | QMAKE_CXXFLAGS += -DMYTH_BUILD_VERSION=\"$${SVNVERSION}\" |
---|
4 | |
---|
5 | # If we are in a program directory (or /setup), this will force recompilation. |
---|
6 | # Otherwise, an empty file will be created, but this should cause no harm.(?) |
---|
7 | system(touch main.cpp) |
---|
8 | |
---|
9 | # ---------------------------------------------------------------------- |
---|
10 | # An alternative to compiling all of main.cpp is to have a separate file |
---|
11 | # which contains only a version string, to link against. |
---|
12 | |
---|
13 | #SOURCES += version.cpp |
---|
14 | |
---|
15 | #version.target = version.cpp |
---|
16 | #version.commands = echo "const char *myth_source_version = \"$${SVNVERSION}\";" > version.cpp |
---|
17 | #version.depends = FORCE |
---|
18 | |
---|
19 | #QMAKE_EXTRA_UNIX_TARGETS += version |
---|