Results 1 to 3 of 3

Thread: Help with qmake and pro setting

  1. #1
    Join Date
    Dec 2006
    Posts
    426
    Thanks
    8
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Help with qmake and pro setting

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Help with qmake and pro setting

    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.
    Last edited by wysota; 23rd February 2007 at 00:53.

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Help with qmake and pro setting

    Maybe this would be sufficient?
    *-64:TARGET_BIT = m64
    J-P Nurmi

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.