diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-09 21:58:19 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-19 18:27:41 (GMT) |
commit | 88d10d55ac68f2251a549cf09292af8a1fb66ba3 (patch) | |
tree | 3305c9e61c5a26051b6e2bd8526a0bd8ba00d821 /Source/cmGeneratorTarget.cxx | |
parent | b5f5de70c0b754010f151cde75783a2cc62db835 (diff) | |
download | CMake-88d10d55ac68f2251a549cf09292af8a1fb66ba3.zip CMake-88d10d55ac68f2251a549cf09292af8a1fb66ba3.tar.gz CMake-88d10d55ac68f2251a549cf09292af8a1fb66ba3.tar.bz2 |
cmGeneratorTarget: Copy IsAppBundleOnApple from cmTarget.
Leave the cmTarget method behind for now to implement cmInstallCommand.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 42b5c63..ab0d02b 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -851,7 +851,7 @@ const char* cmGeneratorTarget::GetLocationForBuild() const location += cfgid; } - if(this->Target->IsAppBundleOnApple()) + if(this->IsAppBundleOnApple()) { std::string macdir = this->BuildMacContentDirectory("", "", false); @@ -1573,7 +1573,7 @@ cmGeneratorTarget::GetAppBundleDirectory(const std::string& config, bool cmGeneratorTarget::IsBundleOnApple() const { return this->IsFrameworkOnApple() - || this->Target->IsAppBundleOnApple() + || this->IsAppBundleOnApple() || this->Target->IsCFBundleOnApple(); } @@ -1935,7 +1935,7 @@ cmGeneratorTarget::BuildMacContentDirectory(const std::string& base, bool contentOnly) const { std::string fpath = base; - if(this->Target->IsAppBundleOnApple()) + if(this->IsAppBundleOnApple()) { fpath += this->GetAppBundleDirectory(config, contentOnly); } @@ -3143,7 +3143,7 @@ std::string cmGeneratorTarget::NormalGetFullPath(const std::string& config, { std::string fpath = this->GetDirectory(config, implib); fpath += "/"; - if(this->Target->IsAppBundleOnApple()) + if(this->IsAppBundleOnApple()) { fpath = this->BuildMacContentDirectory(fpath, config, false); fpath += "/"; @@ -3438,8 +3438,7 @@ void cmGeneratorTarget::GetFullNameInternal(const std::string& config, configPostfix = this->GetProperty(configProp); // Mac application bundles and frameworks have no postfix. if(configPostfix && - (this->Target->IsAppBundleOnApple() - || this->IsFrameworkOnApple())) + (this->IsAppBundleOnApple() || this->IsFrameworkOnApple())) { configPostfix = 0; } @@ -5955,3 +5954,11 @@ bool cmGeneratorTarget::IsFrameworkOnApple() const this->Makefile->IsOn("APPLE") && this->GetPropertyAsBool("FRAMEWORK")); } + +//---------------------------------------------------------------------------- +bool cmGeneratorTarget::IsAppBundleOnApple() const +{ + return (this->GetType() == cmState::EXECUTABLE && + this->Makefile->IsOn("APPLE") && + this->GetPropertyAsBool("MACOSX_BUNDLE")); +} |