qtbase/tests/manual/xembed/gtk-container
Alexandru Croitor 5e40506043 Reland: CMake: Annotate some qt_find_package calls with MODULE
A qt_find_package call first tries to find a Config package
with the CONFIG mode option, and if not found, falls back to an
arg-less mode which searches both Config and Find modules.

For some packages, we know we want to find the Find module because
there can't be a Config package, e.g our FindWrap modules or any of
the other Find modules we carry in our cmake directory.
So we should annotate these calls with MODULE.

Aside from slightly faster configuration, there is another reason to
do so.
Future versions of CMake will automatically log find_package
calls that have a state change (e.g. Not Found -> Found) into
CMakeConfigureLog.yaml.
Due to the Config-first logic in qt_find_package, we always unset the
Foo_DIR variable if the Config package is not found.
This means that there will be a constant build up of not-found
messages in the log.

Explicitly annotating the calls with MODULE will prevent this. Do
that.

This commit relands f1a59e974f
This reverts commit 0ce82b78a3.

Pick-to: 6.10
Change-Id: I5d37579d2f4957215ce1475b5c0ec8509d77c83d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2025-06-24 15:29:50 +02:00
..
CMakeLists.txt Reland: CMake: Annotate some qt_find_package calls with MODULE 2025-06-24 15:29:50 +02:00
gtk-container.cpp Change license for tests files 2024-02-04 09:56:42 +01:00
gtk-container.pro