From d26c520f4bc5122eba08136ba75d9a3f71159724 Mon Sep 17 00:00:00 2001 From: Harry Mallon Date: Wed, 14 Sep 2022 19:21:42 +0100 Subject: 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 --- Source/cmExportInstallFileGenerator.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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( -- cgit v0.12