diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-08-04 17:19:47 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-08-05 16:20:47 (GMT) |
commit | 89e2a080e977b9632fa13c627b6a5370250d6ed5 (patch) | |
tree | ae24e3f07d12be05b42e80d878b8177bae84bf8a /Source/cmGeneratorTarget.cxx | |
parent | 62720e44be3e9f28e4c1e7d38206b2c51d34745e (diff) | |
download | CMake-89e2a080e977b9632fa13c627b6a5370250d6ed5.zip CMake-89e2a080e977b9632fa13c627b6a5370250d6ed5.tar.gz CMake-89e2a080e977b9632fa13c627b6a5370250d6ed5.tar.bz2 |
cmGeneratorTarget: Move GetMacContentDirectory from cmTarget.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 45 |
1 files changed, 43 insertions, 2 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 4be034f..45577e5 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -567,7 +567,7 @@ const char* cmGeneratorTarget::GetLocationForBuild() const if(this->Target->IsAppBundleOnApple()) { - std::string macdir = this->Target->BuildMacContentDirectory("", "", + std::string macdir = this->BuildMacContentDirectory("", "", false); if(!macdir.empty()) { @@ -902,6 +902,47 @@ void cmGeneratorTarget::GetFullNameComponents(std::string& prefix, //---------------------------------------------------------------------------- std::string +cmGeneratorTarget::BuildMacContentDirectory(const std::string& base, + const std::string& config, + bool contentOnly) const +{ + std::string fpath = base; + if(this->Target->IsAppBundleOnApple()) + { + fpath += this->Target->GetAppBundleDirectory(config, contentOnly); + } + if(this->Target->IsFrameworkOnApple()) + { + fpath += this->Target->GetFrameworkDirectory(config, contentOnly); + } + if(this->Target->IsCFBundleOnApple()) + { + fpath += this->Target->GetCFBundleDirectory(config, contentOnly); + } + return fpath; +} + +//---------------------------------------------------------------------------- +std::string +cmGeneratorTarget::GetMacContentDirectory(const std::string& config, + bool implib) const +{ + // Start with the output directory for the target. + std::string fpath = this->Target->GetDirectory(config, implib); + fpath += "/"; + bool contentOnly = true; + if(this->Target->IsFrameworkOnApple()) + { + // additional files with a framework go into the version specific + // directory + contentOnly = false; + } + fpath = this->BuildMacContentDirectory(fpath, config, contentOnly); + return fpath; +} + +//---------------------------------------------------------------------------- +std::string cmGeneratorTarget::GetModuleDefinitionFile(const std::string& config) const { std::string data; @@ -1527,7 +1568,7 @@ std::string cmGeneratorTarget::NormalGetFullPath(const std::string& config, fpath += "/"; if(this->Target->IsAppBundleOnApple()) { - fpath = this->Target->BuildMacContentDirectory(fpath, config, false); + fpath = this->BuildMacContentDirectory(fpath, config, false); fpath += "/"; } |