Results 1 to 4 of 4

Thread: .pro project file includes "unix" with "macx" defintions with qmake

  1. #1
    Join Date
    Jul 2007
    Posts
    56
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default .pro project file includes "unix" with "macx" defintions with qmake

    I have a .pro project file that I'm using for my Win/Mac/Linux project with Qt 4.3.5.

    I have some platform specific definitions such as:

    Qt Code:
    1. unix {
    2. INCLUDEPATH += ./unix_stuff
    3. }
    4.  
    5. macx {
    6. INCLUDEPATH += ./mac_stuff
    7. }
    To copy to clipboard, switch view to plain text mode 

    The problem I'm having is that on Mac OS, qmake seems to treat "unix" as true and my unix specific definitions are getting included also.

    How can I get my project files to include Mac OS only items and not unix?

  2. #2
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: .pro project file includes "unix" with "macx" defintions with qmake

    Try

    Qt Code:
    1. unix:!macx {
    2. INCLUDEPATH += ./unix_stuff
    3. }
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Jul 2007
    Posts
    56
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: .pro project file includes "unix" with "macx" defintions with qmake

    Thanks. That did the trick. Weird that it doesn't seem to be mentioned anywhere that Mac OS is regarded as also being Unix in qmake.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: .pro project file includes "unix" with "macx" defintions with qmake

    Well... macos is a unix, so it should be understandable. I think it is mentioned somewhere, though. And as far as I remember for some macos based specs (xcode maybe?), unix scope won't trigger.

Similar Threads

  1. Replies: 2
    Last Post: 8th November 2007, 20:15
  2. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57

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.