summaryrefslogtreecommitdiffstats
path: root/cmake/QtPlugins.cmake.in
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/QtPlugins.cmake.in')
-rw-r--r--cmake/QtPlugins.cmake.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmake/QtPlugins.cmake.in b/cmake/QtPlugins.cmake.in
index 3a7b8ab30d..a96588cc5e 100644
--- a/cmake/QtPlugins.cmake.in
+++ b/cmake/QtPlugins.cmake.in
@@ -14,7 +14,10 @@ function(__qt_internal_add_static_plugins_once)
set(_module_target ${_aliased_target})
endif()
- # Include all PluginConfig.cmake files and update the QT_PLUGINS property of the module.
+ # Include all PluginConfig.cmake files and update the _qt_plugins and QT_PLUGINS property of
+ # the module. The underscored version is the one we will use going forward to have compatibility
+ # with INTERFACE libraries. QT_PLUGINS is now deprecated and only kept so that we don't break
+ # existing projects using it (like CMake itself).
file(GLOB _qt_plugin_config_files "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@*PluginConfig.cmake")
foreach(_config_file ${_qt_plugin_config_files})
string(REGEX REPLACE "^.*/@INSTALL_CMAKE_NAMESPACE@(.*Plugin)Config.cmake$" "\\1" _qt_plugin "${_config_file}")
@@ -23,6 +26,9 @@ function(__qt_internal_add_static_plugins_once)
list(APPEND _qt_plugins ${_qt_plugin})
endif()
endforeach()
+ set_property(TARGET ${_module_target} PROPERTY _qt_plugins ${_qt_plugins})
+
+ # TODO: Deprecated. Remove in Qt 7.
set_property(TARGET ${_module_target} PROPERTY QT_PLUGINS ${_qt_plugins})
get_target_property(_have_added_plugins_already ${_module_target} __qt_internal_plugins_added)