diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2013-06-02 04:47:18 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2013-06-03 12:29:33 (GMT) |
commit | 483e208482ff46532e7ae48659e569580a88af9c (patch) | |
tree | fe9d3910326c45e9df4c4129de5daa02a81e3e3c /Source/cmOSXBundleGenerator.cxx | |
parent | 373faae5e1c936351b143b0561c61ef9884303e1 (diff) | |
download | CMake-483e208482ff46532e7ae48659e569580a88af9c.zip CMake-483e208482ff46532e7ae48659e569580a88af9c.tar.gz CMake-483e208482ff46532e7ae48659e569580a88af9c.tar.bz2 |
OS X: Fix getting of CFBundle LOCATION property.
This fixes bug #13797.
The kinds of changes applied in 373faae5 for frameworks are now
applied to CFBundle. The prefix and suffix for CFBundles are
now handled in cmTarget::GetFullNameInternal.
Diffstat (limited to 'Source/cmOSXBundleGenerator.cxx')
-rw-r--r-- | Source/cmOSXBundleGenerator.cxx | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx index 621a49f..d3cdf85 100644 --- a/Source/cmOSXBundleGenerator.cxx +++ b/Source/cmOSXBundleGenerator.cxx @@ -16,15 +16,6 @@ #include <cassert> -void cmOSXBundleGenerator::PrepareTargetProperties(cmTarget* target) -{ - if(target->IsCFBundleOnApple()) - { - target->SetProperty("PREFIX", ""); - target->SetProperty("SUFFIX", ""); - } -} - //---------------------------------------------------------------------------- cmOSXBundleGenerator:: cmOSXBundleGenerator(cmTarget* target, @@ -173,31 +164,27 @@ void cmOSXBundleGenerator::CreateFramework( //---------------------------------------------------------------------------- void cmOSXBundleGenerator::CreateCFBundle(const std::string& targetName, - std::string& outpath) + const std::string& root) { if (this->MustSkip()) return; // Compute bundle directory names. - std::string out = outpath; + std::string out = root; out += "/"; - out += this->Target->GetCFBundleDirectory(this->ConfigName, true); - std::string top = out; - out += "/MacOS"; + out += this->Target->GetCFBundleDirectory(this->ConfigName, false); cmSystemTools::MakeDirectory(out.c_str()); this->Makefile->AddCMakeOutputFile(out.c_str()); - std::string newoutpath = out; - // Configure the Info.plist file. Note that it needs the executable name // to be set. - std::string plist = top; + std::string plist = + this->Target->GetCFBundleDirectory(this->ConfigName, true); plist += "/Info.plist"; this->LocalGenerator->GenerateAppleInfoPList(this->Target, targetName.c_str(), plist.c_str()); this->Makefile->AddCMakeOutputFile(plist.c_str()); - outpath = newoutpath; } //---------------------------------------------------------------------------- |