diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-08-04 17:19:48 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-08-05 16:20:48 (GMT) |
commit | 7a460852fa1bc9df22d4c54bac3d57f909488608 (patch) | |
tree | f8ddae764be99f8a20e9727563324ab5a9ae56a7 | |
parent | d560bfd2739f2594119c49d82485b99bb4fbbe1f (diff) | |
download | CMake-7a460852fa1bc9df22d4c54bac3d57f909488608.zip CMake-7a460852fa1bc9df22d4c54bac3d57f909488608.tar.gz CMake-7a460852fa1bc9df22d4c54bac3d57f909488608.tar.bz2 |
cmGeneratorTarget: Move GetAppBundleDirectory from cmTarget.
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 15 | ||||
-rw-r--r-- | Source/cmGeneratorTarget.h | 4 | ||||
-rw-r--r-- | Source/cmOSXBundleGenerator.cxx | 4 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 11 | ||||
-rw-r--r-- | Source/cmTarget.h | 4 |
5 files changed, 20 insertions, 18 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 2de3c77..0fdf646 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -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()) { diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 6d084f7..f0d8c60 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -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". */ diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx index 7df2f78..1d85d9c 100644 --- a/Source/cmOSXBundleGenerator.cxx +++ b/Source/cmOSXBundleGenerator.cxx @@ -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, diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index b49ad9b..e8ef770 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -5323,17 +5323,6 @@ std::string cmTarget::GetCFBundleDirectory(const std::string& config, } //---------------------------------------------------------------------------- -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() { this->Pointer = new cmTargetInternals; diff --git a/Source/cmTarget.h b/Source/cmTarget.h index c1c518f..4b804da 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -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; |