cmLocalGenerator: Port PList handling to cmGeneratorTarget.

This commit is contained in:
Stephen Kelly 2015-10-09 22:31:05 +02:00
parent 31c4aee75a
commit 37ab74a607
4 changed files with 12 additions and 11 deletions

View File

@ -2062,7 +2062,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
// a per-configuration Info.plist file. The cfbundle plist
// is very similar to the application bundle plist
this->CurrentLocalGenerator
->GenerateAppleInfoPList(&target, "$(EXECUTABLE_NAME)",
->GenerateAppleInfoPList(gtgt, "$(EXECUTABLE_NAME)",
plist.c_str());
std::string path =
this->ConvertToRelativeForXCode(plist.c_str());
@ -2111,7 +2111,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
// so let it replace the framework name. This avoids creating
// a per-configuration Info.plist file.
this->CurrentLocalGenerator
->GenerateFrameworkInfoPList(&target, "$(EXECUTABLE_NAME)",
->GenerateFrameworkInfoPList(gtgt, "$(EXECUTABLE_NAME)",
plist.c_str());
std::string path =
this->ConvertToRelativeForXCode(plist.c_str());
@ -2154,7 +2154,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
// so let it replace the executable name. This avoids creating
// a per-configuration Info.plist file.
this->CurrentLocalGenerator
->GenerateAppleInfoPList(&target, "$(EXECUTABLE_NAME)",
->GenerateAppleInfoPList(gtgt, "$(EXECUTABLE_NAME)",
plist.c_str());
std::string path =
this->ConvertToRelativeForXCode(plist.c_str());

View File

@ -3012,7 +3012,7 @@ bool cmLocalGenerator::CheckDefinition(std::string const& define) const
}
//----------------------------------------------------------------------------
static void cmLGInfoProp(cmMakefile* mf, cmTarget* target,
static void cmLGInfoProp(cmMakefile* mf, cmGeneratorTarget* target,
const std::string& prop)
{
if(const char* val = target->GetProperty(prop))
@ -3022,7 +3022,7 @@ static void cmLGInfoProp(cmMakefile* mf, cmTarget* target,
}
//----------------------------------------------------------------------------
void cmLocalGenerator::GenerateAppleInfoPList(cmTarget* target,
void cmLocalGenerator::GenerateAppleInfoPList(cmGeneratorTarget* target,
const std::string& targetName,
const char* fname)
{
@ -3066,7 +3066,7 @@ void cmLocalGenerator::GenerateAppleInfoPList(cmTarget* target,
}
//----------------------------------------------------------------------------
void cmLocalGenerator::GenerateFrameworkInfoPList(cmTarget* target,
void cmLocalGenerator::GenerateFrameworkInfoPList(cmGeneratorTarget* target,
const std::string& targetName,
const char* fname)
{

View File

@ -279,13 +279,14 @@ public:
/**
* Generate a Mac OS X application bundle Info.plist file.
*/
void GenerateAppleInfoPList(cmTarget* target, const std::string& targetName,
void GenerateAppleInfoPList(cmGeneratorTarget* target,
const std::string& targetName,
const char* fname);
/**
* Generate a Mac OS X framework Info.plist file.
*/
void GenerateFrameworkInfoPList(cmTarget* target,
void GenerateFrameworkInfoPList(cmGeneratorTarget* target,
const std::string& targetName,
const char* fname);
/** Construct a comment for a custom command. */

View File

@ -59,7 +59,7 @@ void cmOSXBundleGenerator::CreateAppBundle(const std::string& targetName,
plist += "/";
plist += this->GT->GetAppBundleDirectory(this->ConfigName, true);
plist += "/Info.plist";
this->LocalGenerator->GenerateAppleInfoPList(this->GT->Target,
this->LocalGenerator->GenerateAppleInfoPList(this->GT,
targetName,
plist.c_str());
this->Makefile->AddCMakeOutputFile(plist);
@ -90,7 +90,7 @@ void cmOSXBundleGenerator::CreateFramework(
std::string plist = newoutpath;
plist += "/Resources/Info.plist";
std::string name = cmSystemTools::GetFilenameName(targetName);
this->LocalGenerator->GenerateFrameworkInfoPList(this->GT->Target,
this->LocalGenerator->GenerateFrameworkInfoPList(this->GT,
name,
plist.c_str());
@ -182,7 +182,7 @@ void cmOSXBundleGenerator::CreateCFBundle(const std::string& targetName,
this->GT->GetCFBundleDirectory(this->ConfigName, true);
plist += "/Info.plist";
std::string name = cmSystemTools::GetFilenameName(targetName);
this->LocalGenerator->GenerateAppleInfoPList(this->GT->Target,
this->LocalGenerator->GenerateAppleInfoPList(this->GT,
name,
plist.c_str());
this->Makefile->AddCMakeOutputFile(plist);