summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorHarry Mallon <hjmallon@gmail.com>2022-09-14 18:21:42 (GMT)
committerBrad King <brad.king@kitware.com>2022-09-14 18:49:05 (GMT)
commitd26c520f4bc5122eba08136ba75d9a3f71159724 (patch)
tree3df1f701964c2e775776b2630c8cff7360e89c93 /Source
parentc3e68020d61ae306261b4f953947483a960edf32 (diff)
downloadCMake-d26c520f4bc5122eba08136ba75d9a3f71159724.zip
CMake-d26c520f4bc5122eba08136ba75d9a3f71159724.tar.gz
CMake-d26c520f4bc5122eba08136ba75d9a3f71159724.tar.bz2
export: Fix IMPORTED_LOCATION of iOS flat app bundles
iOS/tvOS app bundles are flat and do not include the `Contents/MacOS/` layers, so they should not be in the `IMPORTED_LOCATION`. Use the same logic that commit 34f5ef564a (iOS: Fix App Bundle layout, 2015-12-10, v3.5.0-rc1~129^2~1) added for the installation layout. Fixes: #23963
Diffstat (limited to 'Source')
-rw-r--r--Source/cmExportInstallFileGenerator.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index 7d8572d..195737b 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -436,7 +436,10 @@ void cmExportInstallFileGenerator::SetImportLocationProperty(
// Append the installed file name.
if (target->IsAppBundleOnApple()) {
value += cmInstallTargetGenerator::GetInstallFilename(target, config);
- value += ".app/Contents/MacOS/";
+ value += ".app/";
+ if (!target->Makefile->PlatformIsAppleEmbedded()) {
+ value += "Contents/MacOS/";
+ }
value += cmInstallTargetGenerator::GetInstallFilename(target, config);
} else {
value += cmInstallTargetGenerator::GetInstallFilename(