Cocoa: emit config error when using 15.0 as deployment target

QCocoaScreen uses removed APIs, which cause the code no fail compilation
with CMAKE_OSX_DEPLOYMENT_TARGET=15.0.
Adding a compile-time check to detect this early.

Task-number: QTBUG-128900
Pick-to: 6.8 6.5
Change-Id: I7eeb60f5769af6b1622efd1e0637e85a038b7930
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit b6f3695a80f5abfbcfb0ebb5b03358b8e7bbbaf9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Tim Blechmann 2024-11-27 09:19:56 +08:00 committed by Qt Cherry-pick Bot
parent 3b4a7d4881
commit 9e22277d28

View File

@ -79,6 +79,11 @@ qt_internal_add_resource(QCocoaIntegrationPlugin "qcocoaresources"
${qcocoaresources_resource_files}
)
if(CMAKE_OSX_DEPLOYMENT_TARGET VERSION_GREATER_EQUAL 15.0)
message(FATAL_ERROR "QCocoaScreen uses APIs removed in 15.0. Please specify a
CMAKE_OSX_DEPLOYMENT_TARGET of 14.0 or lower")
endif()
## Scopes:
#####################################################################