From 054b66a65748c9ebfafeca88bf31669a24994237 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Tue, 14 Jul 2020 18:08:07 +0200 Subject: CMake: Provide old style CMake variables for target info This change provides the following per-module variables Qt6Widgets_LIBRARIES, Qt6Widgets_INCLUDE_DIRS, Qt6Widgets_DEFINITIONS, Qt6Widgets_COMPILE_DEFINITIONS, Qt6Widgets_PRIVATE_INCLUDE_DIRS. These are deprecated and are only intended for easier porting from Qt5 to Qt6. Qt consumers should instead rely on the Qt module targets e.g target_link_libraries(app PRIVATE Qt6::Widgets) Note that the variable contents includes transitive values for everything except the _LIBRARIES variant. So Qt6Widgets_INCLUDE_DIRS will contain values for Widgets, Gui and Core. Qt6Widgets_LIBRARIES only contains a value like Qt6::Widgets, and when that is used in target_link_libraries(), CMake will take care of the transitivity. Change-Id: I625e25aab7ba5eaf14de1dc76ba2a1a0c85e6226 Reviewed-by: Joerg Bornemann --- cmake/QtModuleDependencies.cmake.in | 1 + 1 file changed, 1 insertion(+) (limited to 'cmake/QtModuleDependencies.cmake.in') diff --git a/cmake/QtModuleDependencies.cmake.in b/cmake/QtModuleDependencies.cmake.in index 4fdeb33c46..2396539109 100644 --- a/cmake/QtModuleDependencies.cmake.in +++ b/cmake/QtModuleDependencies.cmake.in @@ -88,4 +88,5 @@ foreach(_target_dep ${_target_deps}) endif() endforeach() +set(_@QT_CMAKE_EXPORT_NAMESPACE@@target@_MODULE_DEPENDENCIES "@qt_module_dependencies@") -- cgit v1.2.3