Skip to content

Commit

Permalink
Add USES_TERMINAL to add_custom_target and add_custom_command
Browse files Browse the repository at this point in the history
This shows the output immediately to the console.

Pick-to: 6.7
Change-Id: Ia7f40c10ea24e4c95d5d8fa95fd1bc2bd76d61ca
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
  • Loading branch information
misery committed Feb 13, 2024
1 parent 9cca899 commit d588924
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/corelib/Qt6AndroidMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,10 @@ function(qt6_android_add_apk_target target)

set(extra_deps "")

if(QT_ENABLE_VERBOSE_DEPLOYMENT)
set(uses_terminal USES_TERMINAL)
endif()

# Plugins still might be added after creating the deployment targets.
if(NOT TARGET qt_internal_plugins)
add_custom_target(qt_internal_plugins)
Expand All @@ -445,6 +449,7 @@ function(qt6_android_add_apk_target target)
DEPENDS ${target} ${extra_deps}
COMMAND ${copy_command}
COMMENT "Copying ${target} binary to apk folder"
${uses_terminal}
)

set(sign_apk "")
Expand Down Expand Up @@ -515,6 +520,7 @@ function(qt6_android_add_apk_target target)
DEPENDS "${target}" "${deployment_file}" ${extra_deps}
DEPFILE "${dep_file_path}"
VERBATIM
${uses_terminal}
)
cmake_policy(POP)

Expand All @@ -531,6 +537,7 @@ function(qt6_android_add_apk_target target)
${sign_apk}
COMMENT "Creating APK for ${target}"
VERBATIM
${uses_terminal}
)
endif()

Expand All @@ -547,6 +554,7 @@ function(qt6_android_add_apk_target target)
${sign_aab}
${extra_args}
COMMENT "Creating AAB for ${target}"
${uses_terminal}
)

if(QT_IS_ANDROID_MULTI_ABI_EXTERNAL_PROJECT)
Expand Down Expand Up @@ -586,6 +594,7 @@ function(qt6_android_add_apk_target target)
COMMENT "Resolving ${CMAKE_ANDROID_ARCH_ABI} dependencies for the ${target} APK"
DEPFILE "${dep_file}"
VERBATIM
${uses_terminal}
)
add_custom_target(qt_internal_${target}_copy_apk_dependencies
DEPENDS "${timestamp_file}")
Expand All @@ -599,6 +608,7 @@ function(qt6_android_add_apk_target target)
--copy-dependencies-only
${extra_args}
COMMENT "Resolving ${CMAKE_ANDROID_ARCH_ABI} dependencies for the ${target} APK"
${uses_terminal}
)
endif()
endif()
Expand Down

0 comments on commit d588924

Please sign in to comment.