diff options
author | Brad King <brad.king@kitware.com> | 2015-10-26 17:13:02 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-10-26 17:13:02 (GMT) |
commit | d71920c45763fe15fa93c2fc1f5aceabba23975e (patch) | |
tree | 6533a1271f70a12006f3fa82a81265401af38241 /Source | |
parent | 4c4da56b2eb22fd902a100b294ff2acb6d77fac3 (diff) | |
parent | a91eebebdb2a012c233db7869ec0ade534c4dd57 (diff) | |
download | CMake-d71920c45763fe15fa93c2fc1f5aceabba23975e.zip CMake-d71920c45763fe15fa93c2fc1f5aceabba23975e.tar.gz CMake-d71920c45763fe15fa93c2fc1f5aceabba23975e.tar.bz2 |
Merge topic 'xcode-watch-and-tvos'
a91eebeb Xcode: Recognise Watch and TV OS as embedded platforms
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefile.cxx | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 264b169..40e2892 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2407,10 +2407,23 @@ bool cmMakefile::PlatformIsAppleIos() const sdkRoot = this->GetSafeDefinition("CMAKE_OSX_SYSROOT"); sdkRoot = cmSystemTools::LowerCase(sdkRoot); - return sdkRoot.find("iphoneos") == 0 || - sdkRoot.find("/iphoneos") != std::string::npos || - sdkRoot.find("iphonesimulator") == 0 || - sdkRoot.find("/iphonesimulator") != std::string::npos; + const std::string embedded[] = + { + "appletvos", "appletvsimulator", + "iphoneos", "iphonesimulator", + "watchos", "watchsimulator", + }; + + for(size_t i = 0; i < sizeof(embedded) / sizeof(embedded[0]); ++i) + { + if(sdkRoot.find(embedded[i]) == 0 || + sdkRoot.find(std::string("/") + embedded[i]) != std::string::npos) + { + return true; + } + } + + return false; } const char* cmMakefile::GetSONameFlag(const std::string& language) const |