summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-01-08 14:58:06 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-01-08 14:58:11 (GMT)
commita3bba2a5ad30287a22f2a700de6a60f0869b8dac (patch)
treea53f8f47d28b7259a18020ecaedaec152c07d094 /Source/cmGlobalXCodeGenerator.cxx
parent2c089d80de3945e4f08f13557d59e04cbc942a60 (diff)
parent4017bf40de512e977d59c12f4e3f6c91f5dd953d (diff)
downloadCMake-a3bba2a5ad30287a22f2a700de6a60f0869b8dac.zip
CMake-a3bba2a5ad30287a22f2a700de6a60f0869b8dac.tar.gz
CMake-a3bba2a5ad30287a22f2a700de6a60f0869b8dac.tar.bz2
Merge topic '17431-iphone-deployment-target'
4017bf40 Darwin: Emit deployment target that matches the SDK 8f4663ff Xcode: rename embedded SDK query function Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1447
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx27
1 files changed, 24 insertions, 3 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 424ad45..338c2b4 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1172,7 +1172,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets(
// dstPath in frameworks is relative to Versions/<version>
ostr << keySources.first;
} else if (keySources.first != "MacOS") {
- if (gtgt->Target->GetMakefile()->PlatformIsAppleIos()) {
+ if (gtgt->Target->GetMakefile()->PlatformIsAppleEmbedded()) {
ostr << keySources.first;
} else {
// dstPath in bundles is relative to Contents/MacOS
@@ -2992,7 +2992,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects(
buildSettings->AddAttribute("ARCHS", this->CreateString(archs));
}
if (deploymentTarget && *deploymentTarget) {
- buildSettings->AddAttribute("MACOSX_DEPLOYMENT_TARGET",
+ buildSettings->AddAttribute(GetDeploymentPlatform(root->GetMakefile()),
this->CreateString(deploymentTarget));
}
if (!this->GeneratorToolset.empty()) {
@@ -3605,7 +3605,7 @@ bool cmGlobalXCodeGenerator::UseEffectivePlatformName(cmMakefile* mf) const
"XCODE_EMIT_EFFECTIVE_PLATFORM_NAME");
if (!epnValue) {
- return mf->PlatformIsAppleIos();
+ return mf->PlatformIsAppleEmbedded();
}
return cmSystemTools::IsOn(epnValue);
@@ -3627,3 +3627,24 @@ void cmGlobalXCodeGenerator::ComputeTargetObjectDirectory(
dir += "/";
gt->ObjectDirectory = dir;
}
+
+std::string cmGlobalXCodeGenerator::GetDeploymentPlatform(const cmMakefile* mf)
+{
+ switch (mf->GetAppleSDKType()) {
+ case cmMakefile::AppleSDK::AppleTVOS:
+ case cmMakefile::AppleSDK::AppleTVSimulator:
+ return "TVOS_DEPLOYMENT_TARGET";
+
+ case cmMakefile::AppleSDK::IPhoneOS:
+ case cmMakefile::AppleSDK::IPhoneSimulator:
+ return "IPHONEOS_DEPLOYMENT_TARGET";
+
+ case cmMakefile::AppleSDK::WatchOS:
+ case cmMakefile::AppleSDK::WatchSimulator:
+ return "WATCHOS_DEPLOYMENT_TARGET";
+
+ case cmMakefile::AppleSDK::MacOS:
+ default:
+ return "MACOSX_DEPLOYMENT_TARGET";
+ }
+}