Set a default value for CMAKE_OSX_DEPLOYMENT_TARGET
This replicates the behavior of QMAKE_MACOSX_DEPLOYMENT_TARGET in qmake. Change-Id: I273cd26994f2edfc52dc7b6278252c37b65b2356 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
parent
4ee289d2d8
commit
e9672c747c
@ -173,7 +173,22 @@ function(qt_auto_detect_cmake_config)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(qt_auto_detect_darwin)
|
||||
if(APPLE)
|
||||
# If no CMAKE_OSX_DEPLOYMENT_TARGET is provided, default
|
||||
# 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)
|
||||
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()
|
||||
message(STATUS "CMAKE_OSX_DEPLOYMENT_TARGET set to: \"${CMAKE_OSX_DEPLOYMENT_TARGET}\".")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
qt_auto_detect_cmake_config()
|
||||
qt_auto_detect_darwin()
|
||||
qt_auto_detect_ios()
|
||||
qt_auto_detect_android()
|
||||
qt_auto_detect_vpckg()
|
||||
|
Loading…
x
Reference in New Issue
Block a user