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>
This commit is contained in:
parent
199b67f11c
commit
d555327a57
@ -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
|
||||
|
@ -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.")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user