PDA

View Full Version : qmake conditionals/arguments



tbscope
10th August 2010, 07:06
Is it possible to create a .pro file that exposes configuration options.

Example:


qmake --enable-my-super-fantastic-features

I know I can set variables. So if the above is not possible, I can follow that path.

Lykurg
10th August 2010, 07:18
EDIT: Ehm, forget about that, you havn't asked how to deal with variables!

I never have seen such custom configuration options. At least I can't remember. But for Variables you can writeqmake "DEFINES += MYFEATURE"then you can check it in your pro file with contains( DEFINES, MYFEATURE ) {}and you can use it right in your files
#ifdef MYFEATURE
/*...*/
#endif

tbscope
10th August 2010, 07:21
Yes, I think I'll follow that route.
Thanks.