PDA

View Full Version : Help with qmake and pro setting



lni
22nd February 2007, 15:32
Hi,

I have a pro file as


TEMPLATE = subdirs

DIRLIST = build32 build64 bar foo blah

for( dir, DIRLIST ): exists( $$dir ): SUBDIRS += $$dir


Where build32 is to build 32-bits exe, and build64 is for 64-bits. It works fine on a 64-bits machine. But when use 32-bits machine, qmake terminates with error (of course it doesn't support 64) when processing build64, and subsequent bar, foo, blah do not get built.

My question is how to write the script so that when in 32-bits machine, it skips build64 and continue on?

I have a flag in

build32: TARGET_BIT = m32
build64: TARGET_BIT = m64

How does the container get the flag and skip build64 when necessary?

Thanks

wysota
23rd February 2007, 00:46
What is the error? And can't you judge by the QMAKESPEC used instead of basing on existing directories? You can use $$find and $$count to search the QMAKESPEC variable for "64" and configure for 64bit if you find it and for 32 otherwise.

jpn
28th February 2007, 10:02
Maybe this would be sufficient?

*-64:TARGET_BIT = m64