Xcode: Properly handle non-resource Bundle files on iOS

Issue: #16680
This commit is contained in:
Gregor Jasny
2017-02-26 22:14:34 +01:00
parent 9a733c7bd6
commit 484ccb0c45

View File

@@ -1154,8 +1154,12 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets(
// dstPath in frameworks is relative to Versions/<version>
ostr << mit->first;
} else if (mit->first != "MacOS") {
// dstPath in bundles is relative to Contents/MacOS
ostr << "../" << mit->first.c_str();
if (gtgt->Target->GetMakefile()->PlatformIsAppleIos()) {
ostr << mit->first;
} else {
// dstPath in bundles is relative to Contents/MacOS
ostr << "../" << mit->first;
}
}
copyFilesBuildPhase->AddAttribute("dstPath",
this->CreateString(ostr.str()));