summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-04-20 12:19:10 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-06-02 15:12:05 +0200
commit21000ede374e7efb616c27b26d4490cd65d6da3a (patch)
tree52c1a6afc46d73fd9cc000568eab8a009c7753eb /cmake
parenteb09d98065494fc2058b78cf0c7a46d3b2acf3c8 (diff)
cmake: Always copy Info.plist to build directory manually
Allows us to modify this file in place, before CMake copies it into the application bundle during its generator step. Change-Id: I73325c66b5b8919f57dbaa1cc76a7edbc145609c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtPublicAppleHelpers.cmake12
1 files changed, 5 insertions, 7 deletions
diff --git a/cmake/QtPublicAppleHelpers.cmake b/cmake/QtPublicAppleHelpers.cmake
index 11cfffc3ad..4de23a00fe 100644
--- a/cmake/QtPublicAppleHelpers.cmake
+++ b/cmake/QtPublicAppleHelpers.cmake
@@ -531,15 +531,13 @@ function(_qt_internal_set_xcode_bitcode_enablement target)
"NO")
endfunction()
-function(_qt_internal_generate_info_plist target)
+function(_qt_internal_copy_info_plist target)
# If the project already specifies a custom file, we don't override it.
- get_target_property(existing_plist "${target}" MACOSX_BUNDLE_INFO_PLIST)
- if(existing_plist)
- return()
+ get_target_property(info_plist_in "${target}" MACOSX_BUNDLE_INFO_PLIST)
+ if(NOT info_plist_in)
+ set(info_plist_in "${__qt_internal_cmake_apple_support_files_path}/Info.plist.app.in")
endif()
- set(info_plist_in "${__qt_internal_cmake_apple_support_files_path}/Info.plist.app.in")
-
string(MAKE_C_IDENTIFIER "${target}" target_identifier)
set(info_plist_out_dir
"${CMAKE_CURRENT_BINARY_DIR}/.qt/info_plist/${target_identifier}")
@@ -598,7 +596,7 @@ endfunction()
function(_qt_internal_finalize_apple_app target)
# Shared between macOS and iOS apps
- _qt_internal_generate_info_plist("${target}")
+ _qt_internal_copy_info_plist("${target}")
# Only set the various properties if targeting the Xcode generator, otherwise the various
# Xcode tokens are embedded as-is instead of being dynamically evaluated.