diff --git a/compiler.pri b/compiler.pri index a16ea43a9..7d95b3ee4 100644 --- a/compiler.pri +++ b/compiler.pri @@ -1,3 +1,5 @@ +include(qt.pri) + CONFIG *= warn_on win32 { @@ -136,7 +138,14 @@ macx { !CONFIG(universal) { CONFIG += no-pch - QMAKE_MAC_SDK = $$system(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk + + # Qt 5.1 and greater want short-form OS X SDKs. + isEqual(QT_MAJOR_VERSION, 5) { + QMAKE_MAC_SDK = macosx10.8 + } else { + QMAKE_MAC_SDK = $$system(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk + } + QMAKE_CC = $$system(xcrun -find clang) QMAKE_CXX = $$system(xcrun -find clang++) QMAKE_LINK = $$system(xcrun -find clang++)