summaryrefslogtreecommitdiffstats
path: root/mkspecs/macx-ios-clang/features/default_post.prf
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs/macx-ios-clang/features/default_post.prf')
-rw-r--r--mkspecs/macx-ios-clang/features/default_post.prf15
1 files changed, 15 insertions, 0 deletions
diff --git a/mkspecs/macx-ios-clang/features/default_post.prf b/mkspecs/macx-ios-clang/features/default_post.prf
index aa849eb8b1..f1f23dd716 100644
--- a/mkspecs/macx-ios-clang/features/default_post.prf
+++ b/mkspecs/macx-ios-clang/features/default_post.prf
@@ -174,6 +174,21 @@ macx-xcode {
ios_device_family.value = $$QMAKE_IOS_TARGETED_DEVICE_FAMILY
QMAKE_MAC_XCODE_SETTINGS += ios_device_family
+ # If QMAKE_BUNDLE_DATA contains an asset catalog that includes an
+ # AppIcon.appiconset, we configure Xcode to use it for app icons.
+ for(bundle_data, QMAKE_BUNDLE_DATA) {
+ for(bundle_file, $${bundle_data}.files) {
+ !contains(bundle_file, .*\.xcassets$): next()
+ !exists($$absolute_path($$bundle_file/AppIcon.appiconset, $$_PRO_FILE_PWD_)): next()
+
+ asset_catalog_appicon.name = "ASSETCATALOG_COMPILER_APPICON_NAME"
+ asset_catalog_appicon.value = "AppIcon"
+ QMAKE_MAC_XCODE_SETTINGS += asset_catalog_appicon
+ break()
+ }
+ !isEmpty(asset_catalog_appicon.name): break()
+ }
+
# Set up default 4-inch iPhone/iPod launch image so that our apps
# support the full screen resolution of those devices.
launch_image = Default-568h@2x.png