From 0a0f7778215df9fd05434800aacf72cd4bb63fa1 Mon Sep 17 00:00:00 2001 From: Christian Heimlich Date: Thu, 9 Mar 2023 10:40:19 -0500 Subject: [PATCH] CMake: Add NO_COMPILER_RUNTIME to qt_generate_deploy_qml_app_script Provides the NO_COMPILER_RUNTIME boolean option to qt_generate_deploy_qml_app_script(), which forwards to qt_deploy_runtime_dependencies(). On Windows, this option prevents the deployment of compiler runtimes. [ChangeLog][CMake] Added the option NO_COMPILER_RUNTIME to qt_generate_deploy_qml_app_script. Task-number: QTBUG-111741 Pick-to: 6.5 6.5.0 Change-Id: Ic51fc5430e21b8c5aba201d4675a37c9c220a3f2 Reviewed-by: Alexandru Croitor Reviewed-by: Amir Masoud Abdol Reviewed-by: Joerg Bornemann --- src/qml/Qt6QmlMacros.cmake | 4 ++++ src/qml/doc/src/cmake/qt_generate_deploy_qml_app_script.qdoc | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/qml/Qt6QmlMacros.cmake b/src/qml/Qt6QmlMacros.cmake index 0284d0e75f..9c9286ed5c 100644 --- a/src/qml/Qt6QmlMacros.cmake +++ b/src/qml/Qt6QmlMacros.cmake @@ -3072,6 +3072,7 @@ function(qt6_generate_deploy_qml_app_script) set(no_value_options NO_UNSUPPORTED_PLATFORM_ERROR NO_TRANSLATIONS + NO_COMPILER_RUNTIME MACOS_BUNDLE_POST_BUILD DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM ) @@ -3155,6 +3156,9 @@ function(qt6_generate_deploy_qml_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/qml/doc/src/cmake/qt_generate_deploy_qml_app_script.qdoc b/src/qml/doc/src/cmake/qt_generate_deploy_qml_app_script.qdoc index 0b6421ce8f..0fd03a8c93 100644 --- a/src/qml/doc/src/cmake/qt_generate_deploy_qml_app_script.qdoc +++ b/src/qml/doc/src/cmake/qt_generate_deploy_qml_app_script.qdoc @@ -24,6 +24,7 @@ qt_generate_deploy_qml_app_script( OUTPUT_SCRIPT [NO_UNSUPPORTED_PLATFORM_ERROR] [NO_TRANSLATIONS] + [NO_COMPILER_RUNTIME] [DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM] [MACOS_BUNDLE_POST_BUILD] [PRE_INCLUDE_REGEXES regexes...] @@ -99,6 +100,9 @@ inhibit this behavior, specify \c{NO_TRANSLATIONS}. Use \l{qt_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}. + The options \c{PRE_INCLUDE_REGEXES}, \c{PRE_EXCLUDE_REGEXES}, \c{POST_INCLUDE_REGEXES}, \c{POST_EXCLUDE_REGEXES}, \c{POST_INCLUDE_FILES}, and \c{POST_EXCLUDE_FILES} can be specified to control the deployment of runtime