[Qt-interest] Seeking example qmake project file supporting both 32 and 64-bit targets?

Ed Sutton ESutton at fescorp.com
Fri May 13 15:04:53 CEST 2011


Thank you Bo.

> Den 13-05-2011 14:19, Ed Sutton skrev:
>> Does anyone have an example qmake project supporting both 32-bit and 64-bit build targets?
>> 
>> I am trying to evolve an existing qmake project file to supports both a Release32 and Release64 build configurations.  My targets are 32-bit and  64-bit Linux.  I am using the Qt Creator 2.1.
> 
> This is usually not how it's done.
> 
> Place your source directory next to a build32 and build64 directory. 
> qmake have supported srcdir != builddir for many years, and it pretty 
> much solves the problem.

1 - How is output conditionally sent to either /build32 or /build64 destination folders?

> 
> Like this:
> 
> project_dir
>   sourcetree (in svn, git or whatever)
>   build32
>   build64
> 
> cd to build32 and run
> 
> "QMAKESPEC=linux-g++-32 qmake ../sourcetree/myproject.pro".
> 
> Same for 64 bit.
> 
> You can even make a small makefile that builds both at the same time if 
> you want to.


2 - How are conditionals done in the qt project file to set flags or to link with either a lib-3rd-party32 or lib-3rd-party64 based on linux-g++-32 or linux-g++-64?


Thanks again,

-Ed


More information about the Qt-interest-old mailing list