[Qt-interest] application version and DRY principle
Konrad Rosenbaum
konrad at silmor.de
Fri Feb 18 14:07:30 CET 2011
On Fri, February 18, 2011 13:18, Dmitry Teslenko wrote:
>> DEFINES += MYAPPVERSION="1.2.3 beta build 234"
>
> Did you use it for yourself or you just heard of defines?
I use DEFINES, but usually differently.
> The way you suggest it me I'll get this makefile:
>
> DEFINES = -DMYAPPVERSION=1.2.3 beta build 234 -DSOMETHING_ELSE
I just looked into my sources: I use a script to generate a version.h file
the version is a parameter to that script. That script gets called as
QMAKE_EXTRA_TARGETS and I use "PRE_TARGETDEPS+=version.h" to force it to
run early.
Sorry for the confusion.
Konrad
More information about the Qt-interest-old
mailing list