diff options
author | Gregor Jasny <gjasny@googlemail.com> | 2015-10-23 20:19:43 (GMT) |
---|---|---|
committer | Gregor Jasny <gjasny@googlemail.com> | 2015-10-23 20:19:43 (GMT) |
commit | a91eebebdb2a012c233db7869ec0ade534c4dd57 (patch) | |
tree | b4440891a66ab81bf9512af804a15eca402eb731 /Source | |
parent | 2f269fdf0c293e80325c748c985279bc4067af3e (diff) | |
download | CMake-a91eebebdb2a012c233db7869ec0ade534c4dd57.zip CMake-a91eebebdb2a012c233db7869ec0ade534c4dd57.tar.gz CMake-a91eebebdb2a012c233db7869ec0ade534c4dd57.tar.bz2 |
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 a1f143a..148b4a8 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 |