diff options
author | Nicolas Despres <nicolas.despres@gmail.com> | 2012-07-11 09:19:25 (GMT) |
---|---|---|
committer | Peter Kümmel <syntheticpp@gmx.net> | 2012-07-17 12:03:08 (GMT) |
commit | 54d9713adb016423d20c610163726f80da435588 (patch) | |
tree | 2242d14486a7503b6b0ae395c341f5a3b9fa7aef /Source/cmTarget.cxx | |
parent | 10686a17f4457fd6032543992538850be5cc8d88 (diff) | |
download | CMake-54d9713adb016423d20c610163726f80da435588.zip CMake-54d9713adb016423d20c610163726f80da435588.tar.gz CMake-54d9713adb016423d20c610163726f80da435588.tar.bz2 |
Ninja: Add support for CFBundle.
This patch fixes test CFBundleTest on Darwin.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 13 |
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) |