Explicitly check for iOS/tvOS.

This commit is contained in:
aspen 2020-07-01 13:19:09 -04:00
parent 22e8ced9fd
commit 67b162f043
No known key found for this signature in database
GPG key ID: 732932968965DE56

View file

@ -176,7 +176,7 @@ impl Step for Llvm {
}
// Are we compiling for iOS/tvOS?
if target.contains("apple") && !target.contains("darwin") {
if target.contains("apple-ios") || target.contains("apple-tvos") {
// These two defines prevent CMake from automatically trying to add a MacOSX sysroot, which leads to a compiler error.
cfg.define("CMAKE_OSX_SYSROOT", "/");
cfg.define("CMAKE_OSX_DEPLOYMENT_TARGET", "");