mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-01 11:22:21 -06:00
iOS: Add IOS variable
Since commit 11da882a12 (Apple: Introduce separate system name for iOS,
tvOS, and watchOS, 2018-01-15, v3.14.0-rc1~14^2~1) we support setting
`CMAKE_SYSTEM_NAME` to `iOS`. Existing iOS toolchain files already
set `IOS` as a short-hand variable, so do the same here.
This commit is contained in:
committed by
Brad King
parent
20a41aa589
commit
e427c7c1d8
@@ -259,6 +259,7 @@ Variables that Describe the System
|
||||
/variable/CMAKE_SYSTEM_VERSION
|
||||
/variable/CYGWIN
|
||||
/variable/GHS-MULTI
|
||||
/variable/IOS
|
||||
/variable/MINGW
|
||||
/variable/MSVC
|
||||
/variable/MSVC10
|
||||
|
||||
4
Help/variable/IOS.rst
Normal file
4
Help/variable/IOS.rst
Normal file
@@ -0,0 +1,4 @@
|
||||
IOS
|
||||
---
|
||||
|
||||
Set to ``1`` when the target system (:variable:`CMAKE_SYSTEM_NAME`) is ``iOS``.
|
||||
@@ -4,4 +4,6 @@ if(NOT _CMAKE_OSX_SYSROOT_PATH MATCHES "/iPhone(OS|Simulator)")
|
||||
message(FATAL_ERROR "${CMAKE_OSX_SYSROOT} is not an iOS SDK")
|
||||
endif()
|
||||
|
||||
set(IOS 1)
|
||||
|
||||
set(_CMAKE_FEATURE_DETECTION_TARGET_TYPE STATIC_LIBRARY)
|
||||
|
||||
@@ -6,6 +6,10 @@ if(XCODE_VERSION VERSION_GREATER_EQUAL 9)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10)
|
||||
endif()
|
||||
|
||||
if(NOT IOS)
|
||||
message(FATAL_ERROR "IOS variable is not set")
|
||||
endif()
|
||||
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO")
|
||||
|
||||
Reference in New Issue
Block a user