PDA

View Full Version : .pro project file includes "unix" with "macx" defintions with qmake



will49
8th July 2008, 01:11
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:


unix {
INCLUDEPATH += ./unix_stuff
}

macx {
INCLUDEPATH += ./mac_stuff
}


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?

munna
8th July 2008, 06:13
Try



unix:!macx {
INCLUDEPATH += ./unix_stuff
}

will49
8th July 2008, 20:07
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.

wysota
8th July 2008, 20:37
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.