mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Re-factor CFBundle generation.
This commit is contained in:
committed by
Peter Kümmel
parent
03bdaf5453
commit
7bb56c511e
@@ -28,11 +28,7 @@ cmMakefileLibraryTargetGenerator
|
||||
cmMakefileTargetGenerator(target),
|
||||
OSXBundleGenerator(0)
|
||||
{
|
||||
if(this->Target->IsCFBundleOnApple())
|
||||
{
|
||||
target->SetProperty("PREFIX", "");
|
||||
target->SetProperty("SUFFIX", "");
|
||||
}
|
||||
cmOSXBundleGenerator::PrepareTargetProperties(this->Target);
|
||||
|
||||
this->CustomCommandDriver = OnDepends;
|
||||
this->Target->GetLibraryNames(
|
||||
@@ -249,27 +245,6 @@ void cmMakefileLibraryTargetGenerator::WriteFrameworkRules(bool relink)
|
||||
this->WriteLibraryRules(linkRuleVar.c_str(), extraFlags.c_str(), relink);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void
|
||||
cmMakefileLibraryTargetGenerator::CreateCFBundle(std::string& targetName,
|
||||
std::string& outpath)
|
||||
{
|
||||
// Compute bundle directory names.
|
||||
outpath = this->MacContentDirectory;
|
||||
outpath += "MacOS";
|
||||
cmSystemTools::MakeDirectory(outpath.c_str());
|
||||
this->Makefile->AddCMakeOutputFile(outpath.c_str());
|
||||
outpath += "/";
|
||||
|
||||
// Configure the Info.plist file. Note that it needs the executable name
|
||||
// to be set.
|
||||
std::string plist = this->MacContentDirectory + "Info.plist";
|
||||
this->LocalGenerator->GenerateAppleInfoPList(this->Target,
|
||||
targetName.c_str(),
|
||||
plist.c_str());
|
||||
this->Makefile->AddCMakeOutputFile(plist.c_str());
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmMakefileLibraryTargetGenerator::WriteLibraryRules
|
||||
(const char* linkRuleVar, const char* extraFlags, bool relink)
|
||||
@@ -328,7 +303,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
|
||||
{
|
||||
outpath = this->Target->GetDirectory(this->ConfigName);
|
||||
outpath += "/";
|
||||
this->CreateCFBundle(targetName, outpath);
|
||||
this->OSXBundleGenerator->CreateCFBundle(targetName, outpath);
|
||||
}
|
||||
else if(relink)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user