Results 1 to 3 of 3

Thread: qmake for both msvc/mingw ?

  1. #1
    Join Date
    Apr 2006
    Location
    San Francisco, CA
    Posts
    186
    Thanks
    55
    Thanked 12 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default qmake for both msvc/mingw ?

    I'm trying to make a qmake project file for a project that uses both the Mac, MSVC compiler, and the mingw compiler. However, it seems that the "win32" keyword could refer to either the MSVC or mingw compilers. Is there a scope/condition I can use to differentiate between these two? For instance, I have some compiler-specific headers:

    macx {
    INCLUDEPATH += mac
    } else:win32 {
    INCLUDEPATH += msvc
    } else:????? {
    INCLUDEPATH += mingw
    }
    Software Engineer



  2. #2
    Join Date
    Nov 2007
    Posts
    89
    Thanked 21 Times in 18 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qmake for both msvc/mingw ?

    You could try checking if QMAKESPEC variable contains msvc or g++.

  3. #3
    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: qmake for both msvc/mingw ?

    You can make scopes based on the specs. For instance win32-g++ { xxx } should trigger on mingw and not msvc. win32-msvc*{ xxx } should trigger on all microsoft compilers.

  4. The following user says thank you to wysota for this useful post:

    gfunk (26th November 2007)

Similar Threads

  1. Qt 4.3.1 & MinGW 5.1.3 & MSYS 1.0 qmake problem
    By mdecandia in forum Installation and Deployment
    Replies: 2
    Last Post: 2nd October 2008, 16:52
  2. MacOS settings
    By skaiser in forum Installation and Deployment
    Replies: 2
    Last Post: 19th July 2007, 07:47
  3. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57
  4. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15
  5. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 8th March 2006, 23:11

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.