diff options
author | Ben Leadbetter <ben.leadbetter@native-instruments.com> | 2022-06-30 10:00:59 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-07-01 12:18:10 (GMT) |
commit | 8bd98b8117c31ee797b33fbf04ebfc03942ea15e (patch) | |
tree | 74ba0bde4a91bf5ede9f75719a869b24976a21ce /Source/cmGeneratorExpressionNode.cxx | |
parent | 6b2bcae7d4e4356af41da60fb6b038683367c052 (diff) | |
download | CMake-8bd98b8117c31ee797b33fbf04ebfc03942ea15e.zip CMake-8bd98b8117c31ee797b33fbf04ebfc03942ea15e.tar.gz CMake-8bd98b8117c31ee797b33fbf04ebfc03942ea15e.tar.bz2 |
Genex: Fix TARGET_BUNDLE_DIR_NAME incorrect extension
Fix the genex from commit 997af2e1a6 (Genex: Add TARGET_BUNDLE_DIR_NAME,
2022-04-14, v3.24.0-rc1~233^2) to use the correct bundle directory
extension for each bundle type.
Fixes: #23683
Diffstat (limited to 'Source/cmGeneratorExpressionNode.cxx')
-rw-r--r-- | Source/cmGeneratorExpressionNode.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index b08cddb..d773fdf 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -2763,8 +2763,18 @@ struct TargetFilesystemArtifactResultCreator<ArtifactBundleDirNameTag> return std::string(); } - return target->GetAppBundleDirectory(context->Config, - cmGeneratorTarget::BundleDirLevel); + auto level = cmGeneratorTarget::BundleDirLevel; + auto config = context->Config; + if (target->IsAppBundleOnApple()) { + return target->GetAppBundleDirectory(config, level); + } + if (target->IsFrameworkOnApple()) { + return target->GetFrameworkDirectory(config, level); + } + if (target->IsCFBundleOnApple()) { + return target->GetCFBundleDirectory(config, level); + } + return std::string(); } }; |