Build Configuration in Visual Studio from Qmake

Go To StackoverFlow.com

1

I use qmake (qmake -tp vc) to generate vcxproj files for Visual Studio 2010. The problem is, only 'release' and 'debug' solution configurations are generated.

I want to create another configuration, call it configX, which will set another precompiler define that we don't want in the other builds. I can't figure out how to accomplish this in a Qt Pro file.

Can anyone provide some assistance? Thanks in advance.

2012-04-04 20:11
by dag


1

According to this thread on qtcentre forum, you define multiple configuration using the CONFIG variable when you call qmake from command line. Then, you just have to make a script that call qmake multiple times with different CONFIG values, which will let you build a multi-configuration solution. I did not test it myself yet, though I plan to. Looking at this page (QxRunner installation) it seems possible !

2012-04-05 13:30
by azf
Thanks! That solution is not quite as nice as having the solution configuration available from the Visual Studio drop-down... but its better than maintaining separate project files with different defines - dag 2012-04-09 21:53
Ads