Commit af9187ae authored by Gregor Jasny's avatar Gregor Jasny

Darwin: Introduce separate system name for iOS, tvOS, and watchOS

Issue: #17870
parent 894a41fc
......@@ -45,6 +45,12 @@ elseif(NOT "x$ENV{SDKROOT}" STREQUAL "x" AND
(NOT "x$ENV{SDKROOT}" MATCHES "/" OR IS_DIRECTORY "$ENV{SDKROOT}"))
# Use the value of SDKROOT from the environment.
set(_CMAKE_OSX_SYSROOT_DEFAULT "$ENV{SDKROOT}")
elseif(CMAKE_SYSTEM_NAME STREQUAL iOS)
set(_CMAKE_OSX_SYSROOT_DEFAULT "iphoneos")
elseif(CMAKE_SYSTEM_NAME STREQUAL tvOS)
set(_CMAKE_OSX_SYSROOT_DEFAULT "appletvos")
elseif(CMAKE_SYSTEM_NAME STREQUAL watchOS)
set(_CMAKE_OSX_SYSROOT_DEFAULT "watchos")
elseif("${CMAKE_GENERATOR}" MATCHES Xcode
OR CMAKE_OSX_DEPLOYMENT_TARGET
OR CMAKE_OSX_ARCHITECTURES MATCHES "[^;]"
......
set(APPLE 1)
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
if(NOT CMAKE_CROSSCOMPILING)
message(FATAL_ERROR "Internal CMake error.")
endif()
endif()
# Darwin versions:
# 6.x == Mac OSX 10.2 (Jaguar)
# 7.x == Mac OSX 10.3 (Panther)
......
include(Platform/Darwin-Determine-CXX)
include(Platform/Darwin-Initialize)
include(Platform/Darwin)
include(Platform/Darwin-Determine-CXX)
include(Platform/Darwin-Initialize)
include(Platform/Darwin)
include(Platform/Darwin-Determine-CXX)
include(Platform/Darwin-Initialize)
include(Platform/Darwin)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment