[Interest] QMake generation config file from variables in .pro file

Guido Seifert wargand at gmx.de
Wed Jan 29 22:27:22 CET 2014


Wow, have to try this immediately. If this works it would be much better
than what I concocted. :-)

Guido

> Hi,
> 
> actually this is possible with qmake.
> If you have a file named config.h.in you can use normal qmake variables 
> in it e.g. "#define Version $$VERSION".
> 
> Then put the following in your .pro file:
> versionconfig.input = config.h.in
> versionconfig.output = config.h
> QMAKE_SUBSTITUTES += versionconfig
> 
> 
> Marcel
> 
> 
> Am 16.01.2014 14:42, schrieb Guido Seifert:
> > Hi,
> > when I use cmake I can create a file config.h.in, which contains
> > things like:
> > #define Version "@VERSION@"
> >
> > in the CMakeLists.txt I can define a variable:
> > SET(VERSION "something")
> > and add:
> >
> > configure_file (
> >    "config.h.in"
> > )
> >
> > This creates a config.h with #define Version "something".
> >
> > Question is, can I do the same with qmake? How?
> >
> > Guido
> > _______________________________________________
> > Interest mailing list
> > Interest at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/interest
> 
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
> 



More information about the Interest mailing list