cmGeneratorTarget: Move GetAppBundleDirectory from cmTarget.

This commit is contained in:
Stephen Kelly 2015-08-04 19:19:48 +02:00
parent d560bfd273
commit 7a460852fa
5 changed files with 20 additions and 18 deletions

View File

@ -890,6 +890,19 @@ std::string cmGeneratorTarget::GetSOName(const std::string& config) const
}
}
//----------------------------------------------------------------------------
std::string
cmGeneratorTarget::GetAppBundleDirectory(const std::string& config,
bool contentOnly) const
{
std::string fpath = this->Target->GetFullName(config, false);
fpath += ".app/Contents";
if(!contentOnly)
fpath += "/MacOS";
return fpath;
}
//----------------------------------------------------------------------------
std::string
cmGeneratorTarget::GetInstallNameDirForBuildTree(
@ -976,7 +989,7 @@ cmGeneratorTarget::BuildMacContentDirectory(const std::string& base,
std::string fpath = base;
if(this->Target->IsAppBundleOnApple())
{
fpath += this->Target->GetAppBundleDirectory(config, contentOnly);
fpath += this->GetAppBundleDirectory(config, contentOnly);
}
if(this->Target->IsFrameworkOnApple())
{

View File

@ -115,6 +115,10 @@ public:
bool realname) const;
std::string NormalGetRealName(const std::string& config) const;
/** @return the Mac App directory without the base */
std::string GetAppBundleDirectory(const std::string& config,
bool contentOnly) const;
/** Return the install name directory for the target in the
* build tree. For example: "\@rpath/", "\@loader_path/",
* or "/full/path/to/library". */

View File

@ -47,7 +47,7 @@ void cmOSXBundleGenerator::CreateAppBundle(const std::string& targetName,
// Compute bundle directory names.
std::string out = outpath;
out += "/";
out += this->GT->Target->GetAppBundleDirectory(this->ConfigName, false);
out += this->GT->GetAppBundleDirectory(this->ConfigName, false);
cmSystemTools::MakeDirectory(out.c_str());
this->Makefile->AddCMakeOutputFile(out);
@ -57,7 +57,7 @@ void cmOSXBundleGenerator::CreateAppBundle(const std::string& targetName,
// to be set.
std::string plist = outpath;
plist += "/";
plist += this->GT->Target->GetAppBundleDirectory(this->ConfigName, true);
plist += this->GT->GetAppBundleDirectory(this->ConfigName, true);
plist += "/Info.plist";
this->LocalGenerator->GenerateAppleInfoPList(this->GT->Target,
targetName,

View File

@ -5322,17 +5322,6 @@ std::string cmTarget::GetCFBundleDirectory(const std::string& config,
return fpath;
}
//----------------------------------------------------------------------------
std::string cmTarget::GetAppBundleDirectory(const std::string& config,
bool contentOnly) const
{
std::string fpath = this->GetFullName(config, false);
fpath += ".app/Contents";
if(!contentOnly)
fpath += "/MacOS";
return fpath;
}
//----------------------------------------------------------------------------
cmTargetInternalPointer::cmTargetInternalPointer()
{

View File

@ -473,10 +473,6 @@ public:
std::string GetCFBundleDirectory(const std::string& config,
bool contentOnly) const;
/** @return the Mac App directory without the base */
std::string GetAppBundleDirectory(const std::string& config,
bool contentOnly) const;
std::vector<std::string> GetIncludeDirectories(
const std::string& config,
const std::string& language) const;