summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2015-10-23 20:19:43 (GMT)
committerGregor Jasny <gjasny@googlemail.com>2015-10-23 20:19:43 (GMT)
commita91eebebdb2a012c233db7869ec0ade534c4dd57 (patch)
treeb4440891a66ab81bf9512af804a15eca402eb731 /Source
parent2f269fdf0c293e80325c748c985279bc4067af3e (diff)
downloadCMake-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.cxx21
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