Fix developer warnings that a plugin does not belong to a Qt module
When building qtsvg or qtimageformats there are a bunch of configuration warnings like: The plug-in 'qtiff' does not belong to any Qt module. This happens because qt_get_module_for_plugin() checks for modules only in the QT_KNOWN_MODULES variable. find_package()'d modules will not appear there though, but only in QT_ALL_MODULES_FOUND_VIA_FIND_PACKAGE. Change the function to check for Qt modules in both variables. This fixes all the warnings regarding plugins not belonging to a module. Change-Id: I39e668801a93794b62888cf868b97c55f57dccdd Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>bb10
parent
c7ec7cd2a1
commit
1291e8d094
|
|
@ -1521,8 +1521,12 @@ endfunction()
|
|||
# Utility function to find the module to which a plug-in belongs.
|
||||
# This will set the QT_MODULE target property on the plug-in - e.g. "Gui", "Sql"...
|
||||
function(qt_get_module_for_plugin target target_type)
|
||||
foreach(qt_module ${QT_KNOWN_MODULES})
|
||||
get_target_property(plugin_types "${qt_module}" MODULE_PLUGIN_TYPES)
|
||||
set(known_modules ${QT_ALL_MODULES_FOUND_VIA_FIND_PACKAGE} ${QT_KNOWN_MODULES})
|
||||
list(REMOVE_DUPLICATES known_modules)
|
||||
foreach(qt_module ${known_modules})
|
||||
get_target_property(plugin_types
|
||||
"${QT_CMAKE_EXPORT_NAMESPACE}::${qt_module}"
|
||||
MODULE_PLUGIN_TYPES)
|
||||
if(plugin_types)
|
||||
foreach(plugin_type ${plugin_types})
|
||||
if("${target_type}" STREQUAL "${plugin_type}")
|
||||
|
|
|
|||
Loading…
Reference in New Issue