summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-07-19 18:12:18 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2022-07-25 19:52:45 +0200
commitdffcc2370e43722afb25d7aec7cd9d6a36f61e03 (patch)
treea452f54acc7ec41c1ff2b8ee4ebddeb530f51872 /src/CMakeLists.txt
parentd48e596b3ca07ed785a1bf7496fcc350590f6a54 (diff)
downloadqtbase-dffcc2370e43722afb25d7aec7cd9d6a36f61e03.tar.gz
CMake: Record the precise package name where Private modules live
Previously if a target depended on CorePrivate, we would write a _qt_internal_find_qt_dependencies(... Qt6CorePrivate) call into a FooDependencies.cmake file. That find_qt_deps call would remove the 'Private' suffix and would run find_dependency with NAMES set to both the altered and non-altered names. This would find the relevant package but it would set the wrong _FOUND variable name, e.g it would set Qt6CorePrivate_FOUND instead of Qt6Core_FOUND. This in turn could cause multiple lookups of the Qt6Core package during dependency handling because the correct _FOUND var would not be set. Instead of always looking for the Qt6CorePrivate package, make sure we look for an appropriately named package for all Privates modules, because we have the necessary info to determine the correct name. Note that INTERNAL modules will still be looked up via a Private suffixed package name because that's how the package name is chosen for them. Remove the code that accounted for Private modules in qt_internal_remove_qt_dependency_duplicates because it's not needed anymore. Warn when a package name can't be queried from a target's property because the target might not exist yet. Add a TODO comment for the code that searches with two NAMES. We can't remove it right now, because it might break user projects that use stale Dependencies.cmake files. The dbus subdirectory is added before the tools subdirectory to ensure that the new package name extraction does not error out, due to trying to access a target that does not yet exist. Amends 425ff34aa10a02524f2d52f544dc00b539ef9a26 Pick-to: 6.4 Task-number: QTBUG-104998 Change-Id: Ib34ae5ed92f68b4265518c2b8802daeb1a3a04d6 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1c36da6022..0e10078bf4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -58,11 +58,13 @@ endif()
if (QT_FEATURE_xml)
add_subdirectory(xml)
endif()
-add_subdirectory(tools)
if (QT_FEATURE_dbus)
add_subdirectory(dbus)
endif()
+
+add_subdirectory(tools)
+
if(QT_FEATURE_gui)
add_subdirectory(gui)