summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-10-19 14:16:04 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-10-26 08:54:22 +0000
commitd555327a57cb1419fbc19c7dd0b12f6c845598a5 (patch)
treeefa25a5dd1a3e44f3b2f9b4007b56a7778e8b302
parent199b67f11c7c5b9ae0aaf60f3e7ea20dafc21ce4 (diff)
macOS: Explicitly define lower bound for supported SDK version
We need to support apps building against the 10.13 SDK, so that they can opt out of dark mode and layer-backing. This does not mean we can't require 10.14 to build Qt itself, but doing so should not require the app to also build against the 10.14 SDK. Change-Id: I53bd0fc8bf56c0be6614acec14d5173589e2620f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rw-r--r--mkspecs/common/macx.conf3
-rw-r--r--mkspecs/features/mac/default_post.prf15
2 files changed, 11 insertions, 7 deletions
diff --git a/mkspecs/common/macx.conf b/mkspecs/common/macx.conf
index d61ad33351..889027ada5 100644
--- a/mkspecs/common/macx.conf
+++ b/mkspecs/common/macx.conf
@@ -7,7 +7,8 @@ QMAKE_MAC_SDK = macosx
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.12
QMAKE_APPLE_DEVICE_ARCHS = x86_64
-QT_MAC_SDK_VERSION_TESTED_WITH = 10.14
+QT_MAC_SDK_VERSION_MIN = 10.13
+QT_MAC_SDK_VERSION_MAX = 10.14
device.sdk = macosx
device.target = device
diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf
index ae17f076a3..5d3ab7ed6e 100644
--- a/mkspecs/features/mac/default_post.prf
+++ b/mkspecs/features/mac/default_post.prf
@@ -9,19 +9,22 @@ contains(TEMPLATE, .*app) {
# Detect incompatible SDK versions
- !versionAtLeast(QMAKE_MAC_SDK_VERSION, $$QT_MAC_SDK_VERSION): \
- warning("Qt requires at least version $$QT_MAC_SDK_VERSION of the platform SDK," \
+ isEmpty(QT_MAC_SDK_VERSION_MIN): \
+ QT_MAC_SDK_VERSION_MIN = $$QT_MAC_SDK_VERSION
+
+ !versionAtLeast(QMAKE_MAC_SDK_VERSION, $$QT_MAC_SDK_VERSION_MIN): \
+ warning("Qt requires at least version $$QT_MAC_SDK_VERSION_MIN of the platform SDK," \
"you're using $${QMAKE_MAC_SDK_VERSION}. Please upgrade.")
- !isEmpty(QT_MAC_SDK_VERSION_TESTED_WITH) {
+ !isEmpty(QT_MAC_SDK_VERSION_MAX) {
# For Qt developers only
!isEmpty($$list($$(QT_MAC_SDK_NO_VERSION_CHECK))): \
CONFIG += sdk_no_version_check
QMAKE_MAC_SDK_MAJOR_MINOR_VERSION = $$replace(QMAKE_MAC_SDK_VERSION, "(\d+)(\.\d+)(\.\d+)?", \1\2)
- !sdk_no_version_check:!versionAtMost(QMAKE_MAC_SDK_MAJOR_MINOR_VERSION, $$QT_MAC_SDK_VERSION_TESTED_WITH) {
- warning("Qt has only been tested with version $$QT_MAC_SDK_VERSION_TESTED_WITH"\
+ !sdk_no_version_check:!versionAtMost(QMAKE_MAC_SDK_MAJOR_MINOR_VERSION, $$QT_MAC_SDK_VERSION_MAX) {
+ warning("Qt has only been tested with version $$QT_MAC_SDK_VERSION_MAX"\
"of the platform SDK, you're using $${QMAKE_MAC_SDK_MAJOR_MINOR_VERSION}.")
warning("This is an unsupported configuration. You may experience build issues," \
"and by using")
@@ -29,7 +32,7 @@ contains(TEMPLATE, .*app) {
"that Qt has not been prepared for.")
warning("Please downgrade the SDK you use to build your app to version" \
- "$$QT_MAC_SDK_VERSION_TESTED_WITH, or configure")
+ "$$QT_MAC_SDK_VERSION_MAX, or configure")
warning("with CONFIG+=sdk_no_version_check when running qmake" \
"to silence this warning.")
}