Browse Source

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
Harry Mallon 3 years ago
parent
commit
d26c520f4b
1 changed files with 4 additions and 1 deletions
  1. 4 1
      Source/cmExportInstallFileGenerator.cxx

+ 4 - 1
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(