Honor BUNDLE_EXTENSION also for Frameworks (#14742)
This commit is contained in:
parent
2b909c08f5
commit
134d5c1f7c
|
@ -1400,7 +1400,12 @@ std::string cmGeneratorTarget::GetFrameworkDirectory(const std::string& config,
|
|||
{
|
||||
std::string fpath;
|
||||
fpath += this->GetOutputName(config, false);
|
||||
fpath += ".framework";
|
||||
fpath += ".";
|
||||
const char* ext = this->GetProperty("BUNDLE_EXTENSION");
|
||||
if (!ext) {
|
||||
ext = "framework";
|
||||
}
|
||||
fpath += ext;
|
||||
if (!rootDir && !this->Makefile->PlatformIsAppleIos()) {
|
||||
fpath += "/Versions/";
|
||||
fpath += this->GetFrameworkVersion();
|
||||
|
@ -3016,7 +3021,13 @@ void cmGeneratorTarget::GetFullNameInternal(const std::string& config,
|
|||
std::string fw_prefix;
|
||||
if (this->IsFrameworkOnApple()) {
|
||||
fw_prefix = this->GetOutputName(config, false);
|
||||
fw_prefix += ".framework/";
|
||||
fw_prefix += ".";
|
||||
const char* ext = this->GetProperty("BUNDLE_EXTENSION");
|
||||
if (!ext) {
|
||||
ext = "framework";
|
||||
}
|
||||
fw_prefix += ext;
|
||||
fw_prefix += "/";
|
||||
targetPrefix = fw_prefix.c_str();
|
||||
targetSuffix = CM_NULLPTR;
|
||||
}
|
||||
|
|
|
@ -1844,6 +1844,11 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
|
|||
std::string fw_version = gtgt->GetFrameworkVersion();
|
||||
buildSettings->AddAttribute("FRAMEWORK_VERSION",
|
||||
this->CreateString(fw_version));
|
||||
const char* ext = gtgt->GetProperty("BUNDLE_EXTENSION");
|
||||
if (ext) {
|
||||
buildSettings->AddAttribute("WRAPPER_EXTENSION",
|
||||
this->CreateString(ext));
|
||||
}
|
||||
|
||||
std::string plist = this->ComputeInfoPListLocation(gtgt);
|
||||
// Xcode will create the final version of Info.plist at build time,
|
||||
|
|
Loading…
Reference in New Issue