diff options
author | Mikkel Krautz <mikkel@krautz.dk> | 2017-12-31 03:38:33 +0300 |
---|---|---|
committer | Mikkel Krautz <mikkel@krautz.dk> | 2017-12-31 03:39:49 +0300 |
commit | da3222d72152197ebcef4e59dfb78a76a5c484c3 (patch) | |
tree | 2186f3a8275b0354af18b445790e25c2d87aa86f /qmake/compiler.pri | |
parent | 742a5d98b5bef5dc695eba9af72119170d33297a (diff) |
qmake/compiler.pri: target macOS 10.8 when building against Qt 5.10 or above.
Qt 5.10 uses features available only on macOS 10.8, such as
std::future<void>.
See the referenced issue for more information.
Fixes mumble-voip/mumble#3288
Diffstat (limited to 'qmake/compiler.pri')
-rw-r--r-- | qmake/compiler.pri | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/qmake/compiler.pri b/qmake/compiler.pri index 7151da491..499332e82 100644 --- a/qmake/compiler.pri +++ b/qmake/compiler.pri @@ -359,11 +359,18 @@ macx { QMAKE_CC = $$system(xcrun -find clang) QMAKE_CXX = $$system(xcrun -find clang++) QMAKE_LINK = $$system(xcrun -find clang++) - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 - QMAKE_CFLAGS += -mmacosx-version-min=10.7 - QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 - QMAKE_OBJECTIVE_CFLAGS += -mmacosx-version-min=10.7 - QMAKE_OBJECTIVE_CXXFLAGS += -mmacosx-version-min=10.7 + + # Set target macOS version to 10.8 for Qt 5.10 and above. + MUMBLE_TARGET_MACOS_VERSION = 10.7 + isEqual(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 9) { + MUMBLE_TARGET_MACOS_VERSION = 10.8 + } + + QMAKE_MACOSX_DEPLOYMENT_TARGET = $$MUMBLE_TARGET_MACOS_VERSION + QMAKE_CFLAGS += -mmacosx-version-min=$$MUMBLE_TARGET_MACOS_VERSION + QMAKE_CXXFLAGS += -mmacosx-version-min=$$MUMBLE_TARGET_MACOS_VERSION + QMAKE_OBJECTIVE_CFLAGS += -mmacosx-version-min=$$MUMBLE_TARGET_MACOS_VERSION + QMAKE_OBJECTIVE_CXXFLAGS += -mmacosx-version-min=$$MUMBLE_TARGET_MACOS_VERSION } else { XCODE_PATH=$$system(xcode-select -print-path) CONFIG += x86 ppc no-cocoa |