What is the most sensible way to use Mac OS SDKs from a Qt project? You need to have a path to the base SDK (MacOSX10.X.sdk), paths to the headers you need, and to indicate the frameworks you are using.
At the moment I am doing this in my pro file (with help from here; Qt, Qmake and Mac Os X SDKs):
MAC_SDK = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
if( !exists( $$MAC_SDK) ) {
error("The selected Mac OSX SDK does not exist at $$MAC_SDK!")
}
QMAKE_MAC_SDK = $$MAC_SDK
INCLUDEPATH += $$QMAKE_MAC_SDK/System/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers
DEPENDPATH += $$QMAKE_MAC_SDK/System/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers
LIBS += -framework CoreFoundation
The SDKs are in the Xcode app bundle, what the hell? I was wondering if there is an environment variable which stores the path to the SDKs. Also, switching SDK versions, I have to go the the MAC_SDK path and change 10.7 to something else, is that the best way?