From 161ecbf01d05a487bf126c2075cb1ee6c5393189 Mon Sep 17 00:00:00 2001 From: Dimitri Schoolwerth Date: Fri, 8 Jan 2021 13:00:02 +0100 Subject: [PATCH] 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. --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 76496f1708..a78472a7cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,8 +28,12 @@ endif() if(APPLE AND NOT CMAKE_OSX_DEPLOYMENT_TARGET) # 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) - set(CMAKE_OSX_DEPLOYMENT_TARGET 10.10 CACHE STRING "macOS Deployment Target") + # OS version (this has to be set before the first project() call) + 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() include(build/cmake/policies.cmake NO_POLICY_SCOPE)