diff --git a/src/corelib/Qt6CoreDeploySupport.cmake b/src/corelib/Qt6CoreDeploySupport.cmake index 0b7b702a4e6..aeda7405be2 100644 --- a/src/corelib/Qt6CoreDeploySupport.cmake +++ b/src/corelib/Qt6CoreDeploySupport.cmake @@ -287,6 +287,7 @@ function(qt6_deploy_runtime_dependencies) NO_OVERWRITE NO_APP_STORE_COMPLIANCE # TODO: Might want a better name NO_TRANSLATIONS + NO_COMPILER_RUNTIME ) set(single_value_options EXECUTABLE @@ -399,6 +400,9 @@ function(qt6_deploy_runtime_dependencies) if(arg_NO_TRANSLATIONS) list(APPEND tool_options --no-translations) endif() + if(arg_NO_COMPILER_RUNTIME) + list(APPEND tool_options --no-compiler-runtime) + endif() elseif(__QT_DEPLOY_SYSTEM_NAME STREQUAL Darwin) set(extra_binaries_option "-executable=") if(NOT arg_NO_APP_STORE_COMPLIANCE) diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake index 94e3bd057ec..721358b9001 100644 --- a/src/corelib/Qt6CoreMacros.cmake +++ b/src/corelib/Qt6CoreMacros.cmake @@ -2977,6 +2977,7 @@ function(qt6_generate_deploy_app_script) # mutually exclusive with the TARGET keyword. set(no_value_options NO_TRANSLATIONS + NO_COMPILER_RUNTIME NO_UNSUPPORTED_PLATFORM_ERROR ) set(single_value_options @@ -3043,6 +3044,9 @@ function(qt6_generate_deploy_app_script) if(arg_NO_TRANSLATIONS) string(APPEND common_deploy_args " NO_TRANSLATIONS\n") endif() + if(arg_NO_COMPILER_RUNTIME) + string(APPEND common_deploy_args " NO_COMPILER_RUNTIME\n") + endif() # Forward the arguments that are exactly the same for qt_deploy_runtime_dependencies. foreach(var IN LISTS qt_deploy_runtime_dependencies_options) 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 dc5715e3af7..ec03eba7063 100644 --- a/src/corelib/doc/src/cmake/qt_deploy_runtime_dependencies.qdoc +++ b/src/corelib/doc/src/cmake/qt_deploy_runtime_dependencies.qdoc @@ -38,6 +38,7 @@ qt_deploy_runtime_dependencies( [NO_OVERWRITE] [NO_APP_STORE_COMPLIANCE] [NO_TRANSLATIONS] + [NO_COMPILER_RUNTIME] [PRE_INCLUDE_REGEXES regexes...] [PRE_EXCLUDE_REGEXES regexes...] [POST_INCLUDE_REGEXES regexes...] @@ -124,6 +125,9 @@ inhibit this behavior, specify \c{NO_TRANSLATIONS}. Use \l{qt6_deploy_translations}{qt_deploy_translations()} to deploy translations 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}. + 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 34d81b06cef..7566455d9d1 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 @@ -22,6 +22,7 @@ qt_generate_deploy_app_script( TARGET target OUTPUT_SCRIPT [NO_TRANSLATIONS] + [NO_COMPILER_RUNTIME] [NO_UNSUPPORTED_PLATFORM_ERROR] [PRE_INCLUDE_REGEXES regexes...] [PRE_EXCLUDE_REGEXES regexes...] @@ -70,6 +71,9 @@ inhibit this behavior, specify \c{NO_TRANSLATIONS}. Use \l{qt6_deploy_translations}{qt_deploy_translations()} to deploy translations 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}. + For deploying a QML application, use \l{qt6_generate_deploy_qml_app_script}{qt_generate_deploy_qml_app_script()} instead.