diff options
author | Gregor Jasny <gjasny@googlemail.com> | 2017-03-27 18:54:22 (GMT) |
---|---|---|
committer | Gregor Jasny <gjasny@googlemail.com> | 2017-03-30 20:24:54 (GMT) |
commit | d02709d7f76624d9ec5e178d79cf3658d551f197 (patch) | |
tree | 373a020c19f19042402a05e67aa5f45ef20ba8c3 /Source/cmGeneratorTarget.cxx | |
parent | 013ffe76e7d67fdb05fe29c82421b0a000feb468 (diff) | |
download | CMake-d02709d7f76624d9ec5e178d79cf3658d551f197.zip CMake-d02709d7f76624d9ec5e178d79cf3658d551f197.tar.gz CMake-d02709d7f76624d9ec5e178d79cf3658d551f197.tar.bz2 |
Genex: Add `TARGET_BUNDLE_[CONTENT_]_DIR` generator expressions
Closes #16733
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 2938fde..7797508 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1493,6 +1493,12 @@ static bool shouldAddFullLevel(cmGeneratorTarget::BundleDirectoryLevel level) return level == cmGeneratorTarget::FullLevel; } +static bool shouldAddContentLevel( + cmGeneratorTarget::BundleDirectoryLevel level) +{ + return level == cmGeneratorTarget::ContentLevel || shouldAddFullLevel(level); +} + std::string cmGeneratorTarget::GetAppBundleDirectory( const std::string& config, BundleDirectoryLevel level) const { @@ -1503,7 +1509,7 @@ std::string cmGeneratorTarget::GetAppBundleDirectory( ext = "app"; } fpath += ext; - if (!this->Makefile->PlatformIsAppleIos()) { + if (shouldAddContentLevel(level) && !this->Makefile->PlatformIsAppleIos()) { fpath += "/Contents"; if (shouldAddFullLevel(level)) { fpath += "/MacOS"; @@ -1533,7 +1539,7 @@ std::string cmGeneratorTarget::GetCFBundleDirectory( } } fpath += ext; - if (!this->Makefile->PlatformIsAppleIos()) { + if (shouldAddContentLevel(level) && !this->Makefile->PlatformIsAppleIos()) { fpath += "/Contents"; if (shouldAddFullLevel(level)) { fpath += "/MacOS"; |