Look for Svg plugins within the Gui module's directory as well
In Qt 5 these plugins were loaded as part of the Svg module (at least with my patches). With Qt 6 (for which I've dropped my patches) we need to include the plugin's config file manually.
This commit is contained in:
parent
62df4284da
commit
deb9b4467f
|
@ -82,13 +82,22 @@ macro (use_qt_module)
|
||||||
|
|
||||||
# find and use plugins
|
# find and use plugins
|
||||||
foreach (PLUGIN ${ARGS_PLUGINS})
|
foreach (PLUGIN ${ARGS_PLUGINS})
|
||||||
if (NOT TARGET "${ARGS_PREFIX}::Q${PLUGIN}Plugin")
|
set(PLUGIN_TARGET "${ARGS_PREFIX}::Q${PLUGIN}Plugin")
|
||||||
|
if (NOT TARGET "${PLUGIN_TARGET}")
|
||||||
find_package("${ARGS_PREFIX}${ARGS_MODULE}" "${META_QT5_VERSION}" REQUIRED)
|
find_package("${ARGS_PREFIX}${ARGS_MODULE}" "${META_QT5_VERSION}" REQUIRED)
|
||||||
endif ()
|
endif ()
|
||||||
if (NOT TARGET "${ARGS_PREFIX}::Q${PLUGIN}Plugin")
|
if (NOT TARGET "${PLUGIN_TARGET}" AND PLUGIN MATCHES "Svg.*" AND ARGS_MODULE STREQUAL "Svg")
|
||||||
|
# look for Svg plugins within the Gui module's directory as well
|
||||||
|
find_package("${ARGS_PREFIX}Gui" "${META_QT5_VERSION}" REQUIRED)
|
||||||
|
set(PLUGIN_CONFIG "${${ARGS_PREFIX}Gui_DIR}/${ARGS_PREFIX}Q${PLUGIN}PluginConfig.cmake")
|
||||||
|
if (EXISTS "${PLUGIN_CONFIG}")
|
||||||
|
include("${PLUGIN_CONFIG}")
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
if (NOT TARGET "${PLUGIN_TARGET}")
|
||||||
message(FATAL_ERROR "The ${ARGS_PREFIX}${ARGS_MODULE} package does not provide the target ${ARGS_PREFIX}::Q${PLUGIN}Plugin.")
|
message(FATAL_ERROR "The ${ARGS_PREFIX}${ARGS_MODULE} package does not provide the target ${ARGS_PREFIX}::Q${PLUGIN}Plugin.")
|
||||||
endif ()
|
endif ()
|
||||||
if ("${ARGS_PREFIX}::Q${PLUGIN}Plugin" IN_LIST "${ARGS_LIBRARIES_VARIABLE}")
|
if ("${PLUGIN_TARGET}" IN_LIST "${ARGS_LIBRARIES_VARIABLE}")
|
||||||
continue()
|
continue()
|
||||||
endif ()
|
endif ()
|
||||||
set("${ARGS_LIBRARIES_VARIABLE}" "${${ARGS_LIBRARIES_VARIABLE}};${ARGS_PREFIX}::Q${PLUGIN}Plugin")
|
set("${ARGS_LIBRARIES_VARIABLE}" "${${ARGS_LIBRARIES_VARIABLE}};${ARGS_PREFIX}::Q${PLUGIN}Plugin")
|
||||||
|
|
Loading…
Reference in New Issue