summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2013-06-02 04:47:18 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2013-06-03 12:29:33 (GMT)
commit483e208482ff46532e7ae48659e569580a88af9c (patch)
treefe9d3910326c45e9df4c4129de5daa02a81e3e3c /Source/cmTarget.cxx
parent373faae5e1c936351b143b0561c61ef9884303e1 (diff)
downloadCMake-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/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx19
1 files changed, 17 insertions, 2 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 093b30e..fb6d0a8 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -3278,7 +3278,7 @@ const char* cmTarget::NormalGetLocation(const char* config)
this->Location += cfgid;
}
- if(this->IsCFBundleOnApple() || this->IsAppBundleOnApple())
+ if(this->IsAppBundleOnApple())
{
std::string macdir = this->BuildMacContentDirectory("", config, false);
if(!macdir.empty())
@@ -3891,7 +3891,7 @@ std::string cmTarget::NormalGetFullPath(const char* config, bool implib,
{
std::string fpath = this->GetDirectory(config, implib);
fpath += "/";
- if(this->IsCFBundleOnApple() || this->IsAppBundleOnApple())
+ if(this->IsAppBundleOnApple())
{
fpath = this->BuildMacContentDirectory(fpath, config, false);
fpath += "/";
@@ -4037,6 +4037,21 @@ void cmTarget::GetFullNameInternal(const char* config,
targetSuffix = 0;
}
+ if(this->IsCFBundleOnApple())
+ {
+ fw_prefix = this->GetOutputName(config, false);
+ fw_prefix += ".";
+ const char *ext = this->GetProperty("BUNDLE_EXTENSION");
+ if (!ext)
+ {
+ ext = "bundle";
+ }
+ fw_prefix += ext;
+ fw_prefix += "/Contents/MacOS/";
+ targetPrefix = fw_prefix.c_str();
+ targetSuffix = 0;
+ }
+
// Begin the final name with the prefix.
outPrefix = targetPrefix?targetPrefix:"";