CMake: Separate minimal support for iOS and macOS
Differentiate between the minimal supported version of macOS (10.10) and iOS (12.0) instead of setting CMAKE_OSX_DEPLOYMENT_TARGET to (macOS-only) 10.10 for both platforms.
This commit is contained in:
parent
86c1fe4c79
commit
161ecbf01d
@ -28,8 +28,12 @@ endif()
|
|||||||
|
|
||||||
if(APPLE AND NOT CMAKE_OSX_DEPLOYMENT_TARGET)
|
if(APPLE AND NOT CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||||
# If no deployment target has been set default to the minimum supported
|
# If no deployment target has been set default to the minimum supported
|
||||||
# OS X version (this has to be set before the first project() call)
|
# OS version (this has to be set before the first project() call)
|
||||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.10 CACHE STRING "macOS Deployment Target")
|
if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
||||||
|
set(CMAKE_OSX_DEPLOYMENT_TARGET 12.0 CACHE STRING "iOS Deployment Target")
|
||||||
|
else()
|
||||||
|
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.10 CACHE STRING "macOS Deployment Target")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(build/cmake/policies.cmake NO_POLICY_SCOPE)
|
include(build/cmake/policies.cmake NO_POLICY_SCOPE)
|
||||||
|
Loading…
Reference in New Issue
Block a user