Xcode: Use correct Object Library paths for cross-SDK builds

When calculating Object Library paths take a look at the
`XCODE_EMIT_EFFECTIVE_PLATFORM_NAME` property to enable builds with
different SDKs. Otherwise a hard-coded architecture could be chosen.

Fixes: #16040
This commit is contained in:
Gregor Jasny
2017-06-29 14:19:23 +02:00
committed by Brad King
parent 372de3f803
commit c2a6df94ed
2 changed files with 5 additions and 5 deletions

View File

@@ -147,7 +147,7 @@ cmGlobalXCodeGenerator::cmGlobalXCodeGenerator(
this->XcodeBuildCommandInitialized = false;
this->ObjectDirArchDefault = "$(CURRENT_ARCH)";
this->ComputeObjectDirArch();
this->ObjectDirArch = this->ObjectDirArchDefault;
cm->GetState()->SetIsGeneratorMultiConfig(true);
}
@@ -3087,12 +3087,12 @@ void cmGlobalXCodeGenerator::ComputeArchitectures(cmMakefile* mf)
}
}
this->ComputeObjectDirArch();
this->ComputeObjectDirArch(mf);
}
void cmGlobalXCodeGenerator::ComputeObjectDirArch()
void cmGlobalXCodeGenerator::ComputeObjectDirArch(cmMakefile* mf)
{
if (this->Architectures.size() > 1) {
if (this->Architectures.size() > 1 || this->UseEffectivePlatformName(mf)) {
this->ObjectDirArch = "$(CURRENT_ARCH)";
} else if (!this->Architectures.empty()) {
this->ObjectDirArch = this->Architectures[0];

View File

@@ -247,7 +247,7 @@ private:
const cmGeneratorTarget* t) const;
void ComputeArchitectures(cmMakefile* mf);
void ComputeObjectDirArch();
void ComputeObjectDirArch(cmMakefile* mf);
void addObject(cmXCodeObject* obj);
std::string PostBuildMakeTarget(std::string const& tName,