diff --git a/src/corelib/Qt6CoreDeploySupport.cmake b/src/corelib/Qt6CoreDeploySupport.cmake index aeda7405be..e189b26538 100644 --- a/src/corelib/Qt6CoreDeploySupport.cmake +++ b/src/corelib/Qt6CoreDeploySupport.cmake @@ -316,6 +316,7 @@ function(qt6_deploy_runtime_dependencies) ADDITIONAL_LIBRARIES ADDITIONAL_MODULES ${file_GRD_options} + DEPLOY_TOOL_OPTIONS ) cmake_parse_arguments(PARSE_ARGV 0 arg "${no_value_options}" "${single_value_options}" "${multi_value_options}" @@ -403,6 +404,7 @@ function(qt6_deploy_runtime_dependencies) if(arg_NO_COMPILER_RUNTIME) list(APPEND tool_options --no-compiler-runtime) endif() + list(APPEND tool_options ${arg_DEPLOY_TOOL_OPTIONS}) elseif(__QT_DEPLOY_SYSTEM_NAME STREQUAL Darwin) set(extra_binaries_option "-executable=") if(NOT arg_NO_APP_STORE_COMPLIANCE) @@ -411,6 +413,7 @@ function(qt6_deploy_runtime_dependencies) if(NOT arg_NO_OVERWRITE) list(APPEND tool_options -always-overwrite) endif() + list(APPEND tool_options ${arg_DEPLOY_TOOL_OPTIONS}) endif() # This is an internal variable. It is normally unset and is only intended diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake index dbafe06dc5..e80bf0bbac 100644 --- a/src/corelib/Qt6CoreMacros.cmake +++ b/src/corelib/Qt6CoreMacros.cmake @@ -3267,6 +3267,7 @@ function(qt6_generate_deploy_app_script) ) set(qt_deploy_runtime_dependencies_options # These options are forwarded as is to qt_deploy_runtime_dependencies. + DEPLOY_TOOL_OPTIONS PRE_INCLUDE_REGEXES PRE_EXCLUDE_REGEXES POST_INCLUDE_REGEXES diff --git a/src/corelib/doc/src/cmake/qt_deploy_runtime_dependencies.qdoc b/src/corelib/doc/src/cmake/qt_deploy_runtime_dependencies.qdoc index 2eac3f3199..96f53cd571 100644 --- a/src/corelib/doc/src/cmake/qt_deploy_runtime_dependencies.qdoc +++ b/src/corelib/doc/src/cmake/qt_deploy_runtime_dependencies.qdoc @@ -39,6 +39,7 @@ qt_deploy_runtime_dependencies( [NO_APP_STORE_COMPLIANCE] [NO_TRANSLATIONS] [NO_COMPILER_RUNTIME] + [DEPLOY_TOOL_OPTIONS] [PRE_INCLUDE_REGEXES regexes...] [PRE_EXCLUDE_REGEXES regexes...] [POST_INCLUDE_REGEXES regexes...] @@ -132,6 +133,9 @@ in a customized way. For Windows desktop applications, the required runtime files for the compiler are also installed by default. To prevent this, specify \c{NO_COMPILER_RUNTIME}. +You can use \c{DEPLOY_TOOL_OPTIONS} to pass additional options to the underlying +deployment tool. + On Linux, deploying runtime dependencies is based on CMake's \c{file(GET_RUNTIME_DEPENDENCIES)} command. The options \c{PRE_INCLUDE_REGEXES}, \c{PRE_EXCLUDE_REGEXES}, \c{POST_INCLUDE_REGEXES}, \c{POST_EXCLUDE_REGEXES}, diff --git a/src/corelib/doc/src/cmake/qt_generate_deploy_app_script.qdoc b/src/corelib/doc/src/cmake/qt_generate_deploy_app_script.qdoc index f52a0f1661..f0cea57072 100644 --- a/src/corelib/doc/src/cmake/qt_generate_deploy_app_script.qdoc +++ b/src/corelib/doc/src/cmake/qt_generate_deploy_app_script.qdoc @@ -24,6 +24,7 @@ qt_generate_deploy_app_script( [NO_TRANSLATIONS] [NO_COMPILER_RUNTIME] [NO_UNSUPPORTED_PLATFORM_ERROR] + [DEPLOY_TOOL_OPTIONS ...] [PRE_INCLUDE_REGEXES regexes...] [PRE_EXCLUDE_REGEXES regexes...] [POST_INCLUDE_REGEXES regexes...] @@ -74,6 +75,9 @@ customized way. For Windows desktop applications, the required runtime files for the compiler are also installed by default. To prevent this, specify \c{NO_COMPILER_RUNTIME}. +You can use \c{DEPLOY_TOOL_OPTIONS} to pass additional options to the underlying +deployment tool. + For deploying a QML application, use \l{qt6_generate_deploy_qml_app_script}{qt_generate_deploy_qml_app_script()} instead.