CMake: Improve 'Generating Plugins' message

Use message(STATUS) for the 'Generating Plugins' message.

This way it will go to stdout instead of stderr, which follows the
convention we have for most of our other messages.

Also list only the modules that actually have plugins, rather than all
known modules.

Pick-to: 6.2 6.3 6.4
Change-Id: I1ea0ed71418ede54790cabd32e03e82fc69f2858
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Alexandru Croitor 2022-07-01 15:00:50 +02:00
parent 6ec339c484
commit eb8da02d05

View File

@ -411,7 +411,7 @@ function(qt_internal_create_plugins_files)
endif() endif()
qt_internal_get_qt_repo_known_modules(repo_known_modules) qt_internal_get_qt_repo_known_modules(repo_known_modules)
message("Generating Plugins files for ${repo_known_modules}...") set(modules_with_plugins "")
foreach (QT_MODULE ${repo_known_modules}) foreach (QT_MODULE ${repo_known_modules})
get_target_property(target_type "${QT_MODULE}" TYPE) get_target_property(target_type "${QT_MODULE}" TYPE)
if(target_type STREQUAL "INTERFACE_LIBRARY") if(target_type STREQUAL "INTERFACE_LIBRARY")
@ -463,6 +463,7 @@ endif()")
get_target_property(qt_plugins "${QT_MODULE}" QT_PLUGINS) get_target_property(qt_plugins "${QT_MODULE}" QT_PLUGINS)
if(qt_plugins OR QT_MODULE_PLUGIN_INCLUDES) if(qt_plugins OR QT_MODULE_PLUGIN_INCLUDES)
list(APPEND modules_with_plugins "${QT_MODULE}")
configure_file( configure_file(
"${QT_CMAKE_DIR}/QtPlugins.cmake.in" "${QT_CMAKE_DIR}/QtPlugins.cmake.in"
"${config_build_dir}/${INSTALL_CMAKE_NAMESPACE}${QT_MODULE}Plugins.cmake" "${config_build_dir}/${INSTALL_CMAKE_NAMESPACE}${QT_MODULE}Plugins.cmake"
@ -475,6 +476,10 @@ endif()")
) )
endif() endif()
endforeach() endforeach()
if(modules_with_plugins)
message(STATUS "Generated QtModulePlugins.cmake files for the following modules:"
" ${modules_with_plugins}")
endif()
endfunction() endfunction()
function(qt_generate_install_prefixes out_var) function(qt_generate_install_prefixes out_var)