CMake: Set minimum deployment target only for host macOS

A future change will come that sets it for iOS and friends.

Change-Id: I74b688ee62d24137e3cdf5475e1a9e858698ccf0
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Alexandru Croitor 2020-02-21 15:47:01 +01:00
parent e3c4870feb
commit 6d29264e3e

View File

@ -179,7 +179,8 @@ function(qt_auto_detect_darwin)
# to a value that we choose. This replicates the behavior
# in mkspecs/common/macx.conf where
# QMAKE_MACOSX_DEPLOYMENT_TARGET is set.
if(NOT CMAKE_OSX_DEPLOYMENT_TARGET)
# Currently only set for macOS, and not the mobile platforms.
if(NOT CMAKE_OSX_DEPLOYMENT_TARGET AND NOT CMAKE_SYSTEM_NAME)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14" CACHE STRING
"Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value.")
endif()