summaryrefslogtreecommitdiffstats
path: root/cmake/QtModuleToolsConfig.cmake.in
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-04-29 14:36:25 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-05-02 07:30:55 +0000
commitbcfc3dca5d9f3e329fbbcf114145cf8b348c2c81 (patch)
tree9c07e6dac499c51e9b208ae90206fa3d562cb76d /cmake/QtModuleToolsConfig.cmake.in
parent9b0b464e82071338134700edfa190bf998846e4e (diff)
Make module package depend on its own tool package
Also make the tool package depend on all tool packages that correspond to the qt module dependencies. So find_package(Qt5Widgets) implicitly calls find_package(Qt5WidgetTools). And find_package(Qt5WidgetsTools) will call find_package for Qt5GuiTools, and Qt5CoreTools. This enhances the user experience, so that in modules like qtsvg, you don't have to specify both find_package(Qt5Widgets) and find_package(Qt5WidgetsTools), but only the former. Or when cross building, you only need to specify Qt5WidgetTools, to get both Core and Gui tools. Change-Id: Ib1c5173a5b97584a52e144c22e38e90a712f727a Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'cmake/QtModuleToolsConfig.cmake.in')
-rw-r--r--cmake/QtModuleToolsConfig.cmake.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/QtModuleToolsConfig.cmake.in b/cmake/QtModuleToolsConfig.cmake.in
index 4dc658a10b..afc6de5b19 100644
--- a/cmake/QtModuleToolsConfig.cmake.in
+++ b/cmake/QtModuleToolsConfig.cmake.in
@@ -1,5 +1,12 @@
@PACKAGE_INIT@
+include(CMakeFindDependencyMacro)
+
+# Find required dependencies, if any.
+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")
@extra_cmake_statements@