[Qt-creator] Detecting different build configurations in the .pro file

Duane duane.hebert at group-upc.com
Thu May 10 16:35:16 CEST 2012

We're building for an embedded linux device.  I have a build of qt libs 
using the linux frame buffer instead of x and a build of qt using the 
regular linux desktop stuff.  For development I build with the desktop 
version.  For deployement and hardware testing I build with the frame 
buffer version.  This works well.

The trouble is that I have some static libs for qwt and 
qtsingleapplication, among others that when built, use conditional 
builds based on Win32 or X11.  So when built for linux they use X11 but 
when I'm building my app for the target, there is no X11.  So I have 
builds of the libs with the frame buffer version of qt as well.  This 
also works but I have to modify the .pro file each time that I change 
build types.

What I'd like to do is somehow in my project file include one version 
lib or another based on which build I'm doing.  I was thinking maybe 
using the mkspec or something.  The frame buffer version uses 
qws/linux-... as opposed to just linux..

Any idea how to achieve this or is it not possible?

More information about the Qt-creator mailing list