diff --git a/src/corelib/Qt6AndroidMacros.cmake b/src/corelib/Qt6AndroidMacros.cmake index 1e285784e7e..91d6d7c865a 100644 --- a/src/corelib/Qt6AndroidMacros.cmake +++ b/src/corelib/Qt6AndroidMacros.cmake @@ -573,9 +573,7 @@ function(qt6_android_add_apk_target target) set(extra_deps "") - if(QT_ENABLE_VERBOSE_DEPLOYMENT) - set(uses_terminal USES_TERMINAL) - endif() + _qt_internal_android_get_use_terminal_for_deployment(uses_terminal) # Plugins still might be added after creating the deployment targets. if(NOT TARGET qt_internal_plugins) @@ -1784,6 +1782,15 @@ function(_qt_internal_expose_android_package_source_dir_to_ide target) endif() endfunction() +# Enables the terminal usage for the add_custom_command calls when verbose deployment is enabled. +function(_qt_internal_android_get_use_terminal_for_deployment out_var) + if(QT_ENABLE_VERBOSE_DEPLOYMENT) + set(${out_var} USES_TERMINAL PARENT_SCOPE) + else() + set(${out_var} "" PARENT_SCOPE) + endif() +endfunction() + # Return the one of the deployment flags either release or debug depending on # the preferred config. The returned "flags" are wrapped into generator # expression so only usable at the generator stage.