Mulltiple configurations in Qt

Posted by user360607 on Stack Overflow See other posts from Stack Overflow or by user360607
Published on 2010-06-18T14:42:19Z Indexed on 2010/06/18 15:33 UTC
Read the original article Hit count: 236

Filed under:
|
|
|
|

Hi all!

I'm new to Qt Creator and I have several questions regarding multiple build configurations. A side note: I have the QtCreator 1.3.1 installed on my Linux machine.

I need to have two configurations in my Qt Creator project. The thing is that these aren't simply debug and release but are based on the target architecture - x86 or x64. I came across http://stackoverflow.com/questions/2259192/building-multiple-targets-in-qt-qmake and from that I went trying something like:

Conf_x86 { TARGET = MyApp_x86 }

Conf_x64 { TARGET = MyApp_x64 }

This way however I don't seems to be able to use the Qt Creator IDE to build each of these separately (Build All, Rebuild All, etc. options from the IDE menu). Is there a way to achieve this - may be even show Conf_x86 and Conf_x64 as new build configurations in Qt Creator? One other thing the Qt I have is 64 bit so by default the target built using Qt Creator IDE will also be 64 bit. I noticed that the effective qmake call in the build step includes the following option '-spec linux-g++-64'. I also noticed that should I add '-spec linux-g++-32' in 'Additional arguments' it would override '-spec linux-g++-64' and the resulting target will be 32 bit. How can I achieve this by simply editing the contents of the .pro file? I saw that all these changes are initially saved in the .pro.user file but does doesn't suit me at all. I need to be able to make these configurations from the .pro file if possible. Any help will be appreciated.

10x in advance!

© Stack Overflow or respective owner

Related posts about qt

Related posts about configuration