summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 4f3f2c5..aaa622f 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -3169,6 +3169,7 @@ std::string cmTarget::GetFullPath(const char* config, bool implib,
std::string cmTarget::NormalGetFullPath(const char* config, bool implib,
bool realname)
{
+ // TODO: Re-factor with cmOSXBundleGenerator's constructor.
// Start with the output directory for the target.
std::string fpath = this->GetDirectory(config, implib);
fpath += "/";
@@ -3185,6 +3186,18 @@ std::string cmTarget::NormalGetFullPath(const char* config, bool implib,
fpath += this->GetFrameworkVersion();
fpath += "/";
}
+ if(this->IsCFBundleOnApple())
+ {
+ fpath += this->GetFullName(config, false);
+ fpath += ".";
+ const char *ext = this->GetProperty("BUNDLE_EXTENSION");
+ if (!ext)
+ {
+ ext = "bundle";
+ }
+ fpath += ext;
+ fpath += "/Contents/MacOS/";
+ }
// Add the full name of the target.
if(implib)