summaryrefslogtreecommitdiffstats
path: root/cmake/QtPluginConfig.cmake.in
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-08-10 16:44:13 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-08-12 14:20:40 +0200
commit81ea5f1906c74527b74c2b7a92396a520ed47f9f (patch)
tree9ae439fd7348f707f49056cb18792717e61b7a8e /cmake/QtPluginConfig.cmake.in
parent3e3fdbe831f24365780383b3c45a3d53f23ba435 (diff)
CMake: Prepare ground work for static Qml plugins importing
For qt_import_qml_plugins to work, it needs to have access to the Qml plugin targets by the time find_package(Qt6Qml) is called. To do that, we modify the generation of Qml plugin Config, Targets and Dependencies files to go into a special 'QmlPlugins' subfolder of the Qml package. The Qml package will then GLOB include all the Config files in that folder, to make them available whenever find_package(Qt6Qml) is called. This is similar to how the Qt plugins were glob included in the CMake integration of Qt 5.15. In fact that glob including is missing in Qt 6 for regular Qt plugins, and should be implemented in a following change. Currently the Qt Plugins config files that are included are hardcoded to the list of known plugins at Qt configuration time. As a drive-by to make this all work, the naming of the various Config and Dependencies files has been normalized to include the Qt6 prefix. This is done for both regular Qt plugins and Qml plugins. Task-number: QTBUG-85961 Change-Id: Id20da72337ca2945fa330ea6fb43535e44a83292 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake/QtPluginConfig.cmake.in')
-rw-r--r--cmake/QtPluginConfig.cmake.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/QtPluginConfig.cmake.in b/cmake/QtPluginConfig.cmake.in
index 5fde0bc511..7b9eacc766 100644
--- a/cmake/QtPluginConfig.cmake.in
+++ b/cmake/QtPluginConfig.cmake.in
@@ -9,8 +9,8 @@ get_filename_component(_import_prefix "${_import_prefix}" REALPATH)
if (NOT QT_NO_CREATE_TARGETS)
# Find required dependencies, if any.
- if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@target@Dependencies.cmake")
- include("${CMAKE_CURRENT_LIST_DIR}/@target@Dependencies.cmake")
+ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Dependencies.cmake")
+ include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Dependencies.cmake")
endif()
include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Targets.cmake")