summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-01-08 14:58:06 +0000
committerKitware Robot <kwrobot@kitware.com>2018-01-08 09:58:11 -0500
commita3bba2a5ad30287a22f2a700de6a60f0869b8dac (patch)
treea53f8f47d28b7259a18020ecaedaec152c07d094 /Modules
parent2c089d80de3945e4f08f13557d59e04cbc942a60 (diff)
parent4017bf40de512e977d59c12f4e3f6c91f5dd953d (diff)
downloadcmake-a3bba2a5ad30287a22f2a700de6a60f0869b8dac.tar.gz
Merge topic '17431-iphone-deployment-target'
4017bf40 Darwin: Emit deployment target that matches the SDK 8f4663ff Xcode: rename embedded SDK query function Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1447
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Platform/Darwin-Clang.cmake15
1 files changed, 15 insertions, 0 deletions
diff --git a/Modules/Platform/Darwin-Clang.cmake b/Modules/Platform/Darwin-Clang.cmake
index a6661a849d..f8a07ec2dd 100644
--- a/Modules/Platform/Darwin-Clang.cmake
+++ b/Modules/Platform/Darwin-Clang.cmake
@@ -17,4 +17,19 @@ macro(__darwin_compiler_clang lang)
if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.2)
set(CMAKE_${lang}_SYSTEM_FRAMEWORK_SEARCH_FLAG "-iframework ")
endif()
+ if(_CMAKE_OSX_SYSROOT_PATH MATCHES "/iPhoneOS")
+ set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG "-miphoneos-version-min=")
+ elseif(_CMAKE_OSX_SYSROOT_PATH MATCHES "/iPhoneSimulator")
+ set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG "-mios-simulator-version-min=")
+ elseif(_CMAKE_OSX_SYSROOT_PATH MATCHES "/AppleTVOS")
+ set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG "-mtvos-version-min=")
+ elseif(_CMAKE_OSX_SYSROOT_PATH MATCHES "/AppleTVSimulator")
+ set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG "-mtvos-simulator-version-min=")
+ elseif(_CMAKE_OSX_SYSROOT_PATH MATCHES "/WatchOS")
+ set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG "-mwatchos-version-min=")
+ elseif(_CMAKE_OSX_SYSROOT_PATH MATCHES "/WatchSimulator")
+ set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG "-mwatchos-simulator-version-min=")
+ else()
+ set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG "-mmacosx-version-min=")
+ endif()
endmacro()