From bc1ef19c11cb8d5538c9ff8a10e91327761ff422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 14 Jul 2022 12:12:54 +0200 Subject: [PATCH] cmake: Share most finalizers between macOS and iOS apps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The macOS app code path was missing a bunch of finalizers that also makes sense for macOS apps. Change-Id: I2b779a1d64086824f43e304f2c7d3b1cd2780070 Reviewed-by: Alexandru Croitor (cherry picked from commit d5580aa7194b84306da52efb189cf126dbaee1f7) Reviewed-by: Tor Arne Vestbø --- src/corelib/Qt6CoreMacros.cmake | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake index 786dd0c3b3f..824991b2354 100644 --- a/src/corelib/Qt6CoreMacros.cmake +++ b/src/corelib/Qt6CoreMacros.cmake @@ -1229,17 +1229,22 @@ function(_qt_internal_set_xcode_bitcode_enablement target) "NO") endfunction() -function(_qt_internal_finalize_ios_app target) +function(_qt_internal_finalize_apple_app target) + # Shared between macOS and iOS apps _qt_internal_set_xcode_development_team_id("${target}") _qt_internal_set_xcode_bundle_identifier("${target}") - _qt_internal_set_xcode_targeted_device_family("${target}") _qt_internal_set_xcode_code_sign_style("${target}") _qt_internal_set_xcode_bundle_display_name("${target}") - _qt_internal_set_xcode_bitcode_enablement("${target}") _qt_internal_set_xcode_install_path("${target}") - - _qt_internal_handle_ios_launch_screen("${target}") _qt_internal_set_placeholder_apple_bundle_version("${target}") +endfunction() + +function(_qt_internal_finalize_ios_app target) + _qt_internal_finalize_apple_app("${target}") + + _qt_internal_set_xcode_targeted_device_family("${target}") + _qt_internal_set_xcode_bitcode_enablement("${target}") + _qt_internal_handle_ios_launch_screen("${target}") _qt_internal_generate_ios_info_plist("${target}") endfunction() @@ -1249,6 +1254,8 @@ function(_qt_internal_finalize_macos_app target) return() endif() + _qt_internal_finalize_apple_app("${target}") + # Make sure the install rpath has at least the minimum needed if the app # has any non-static frameworks. We can't rigorously know if the app will # have any, even with a static Qt, so always add this. If there are no @@ -1257,8 +1264,6 @@ function(_qt_internal_finalize_macos_app target) list(APPEND install_rpath "@executable_path/../Frameworks") list(REMOVE_DUPLICATES install_rpath) set_property(TARGET ${target} PROPERTY INSTALL_RPATH "${install_rpath}") - - _qt_internal_set_xcode_install_path("${target}") endfunction() if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS)