summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-05-04 15:59:24 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2022-05-20 13:05:51 +0200
commite2620b538b6b7383b1f9814ed54ebaac46de3b60 (patch)
treefc9e6f50808890468b838fa8e6d8653289e337ed
parent9539c8a7f842a6789157ac49dc230a01f4a76d94 (diff)
CMake: Split some iOS handling code into separate functions
Pick-to: 6.2 6.3 Change-Id: I722194c11ce2588ada78597129b5a185f1e9fc69 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--src/corelib/Qt6CoreMacros.cmake13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake
index d4e2814d8b..3e040ff2bd 100644
--- a/src/corelib/Qt6CoreMacros.cmake
+++ b/src/corelib/Qt6CoreMacros.cmake
@@ -902,7 +902,7 @@ function(_qt_internal_set_placeholder_apple_bundle_version target)
endif()
endfunction()
-function(_qt_internal_finalize_ios_app target)
+function(_qt_internal_set_xcode_development_team_id target)
# If user hasn't provided a development team id, try to find the first one specified
# in the Xcode preferences.
if(NOT CMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM AND NOT QT_NO_SET_XCODE_DEVELOPMENT_TEAM_ID)
@@ -913,7 +913,9 @@ function(_qt_internal_finalize_ios_app target)
PROPERTIES XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "${team_id}")
endif()
endif()
+endfunction()
+function(_qt_internal_set_xcode_bundle_identifier target)
# If user hasn't provided a bundle identifier for the app, get a default identifier
# using the default bundle prefix from Xcode preferences and add it to the generated
# Info.plist file.
@@ -925,17 +927,26 @@ function(_qt_internal_finalize_ios_app target)
PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "${bundle_id}")
endif()
endif()
+endfunction()
+function(_qt_internal_set_xcode_product_bundle_identifier target)
# Reuse the same bundle identifier for the Xcode property.
if(NOT CMAKE_XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER
AND NOT QT_NO_SET_XCODE_BUNDLE_IDENTIFIER)
get_target_property(existing_id "${target}" XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER)
if(NOT existing_id)
+ _qt_internal_get_default_ios_bundle_identifier(bundle_id)
set_target_properties("${target}"
PROPERTIES XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER
"${bundle_id}")
endif()
endif()
+endfunction()
+
+function(_qt_internal_finalize_ios_app target)
+ _qt_internal_set_xcode_development_team_id("${target}")
+ _qt_internal_set_xcode_bundle_identifier("${target}")
+ _qt_internal_set_xcode_product_bundle_identifier("${target}")
_qt_internal_handle_ios_launch_screen("${target}")
_qt_internal_set_placeholder_apple_bundle_version("${target}")