Ticket #885: version.pro

File version.pro, 709 bytes (added by Nigel, 14 years ago)

Simple qmake rules to include in any dir with a main.cpp

Line 
1SVNVERSION = $$system(svnversion . 2>/dev/null)
2
3QMAKE_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.(?)
7system(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