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

2014-01-29 Thread Stephen Kelly
Constantin Makshin wrote: > I wonder why such useful feature is left undocumented... I don't know, but as with anything undocumented, handle with care. http://thread.gmane.org/gmane.comp.lib.qt.user/10485/focus=10540 Thanks, Steve. ___ Interest ma

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

2014-01-29 Thread Constantin Makshin
I wonder why such useful feature is left undocumented... On 01/30/2014 01:27 AM, Guido Seifert wrote: > 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

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

2014-01-29 Thread Guido Seifert
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 followi

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

2014-01-29 Thread Marcel Krems
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

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

2014-01-20 Thread Stephen Kelly
Bo Thorsen wrote: > Den 16-01-2014 14:42, Guido Seifert skrev: >> 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

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

2014-01-20 Thread Guido Seifert
Hi, Bo. Someday for sure. But I needed a solution fast. And a quick Python hack was much faster than me delving into something totally unknown. Totally unknown for me at least. Guido > As someone already told you, no this can't be done. But instead of doing > a python script or some other home

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

2014-01-20 Thread Bo Thorsen
Den 16-01-2014 14:42, Guido Seifert skrev: > 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" > ) > > T

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

2014-01-16 Thread Guido Seifert
In other words: Not 'natively' with qmake. Ok, a Python script it will be. I am a bit more comfortable with Python than with sed. :-) Thanks, Guido > > Question is, can I do the same with qmake? How? > > system("sed ") > > There's a write_file function which you can use if you want to writ

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

2014-01-16 Thread Thiago Macieira
On quinta-feira, 16 de janeiro de 2014 14:42:14, Guido Seifert wrote: > Question is, can I do the same with qmake? How? system("sed ") There's a write_file function which you can use if you want to write the full file from the .pro file. -- Thiago Macieira - thiago.macieira (AT) intel.com

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

2014-01-16 Thread 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 i