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

Daniel Teske daniel.teske at nokia.com
Thu May 10 17:11:26 CEST 2012


On Thursday 10 May 2012 16:35:16 ext Duane wrote:
> 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?
See http://qt-project.org/doc/qt-4.8/qmake-advanced-usage.html
You can probably use what is described under "Platform Scope Values" 

daniel



More information about the Qt-creator mailing list