As opposed to standalone tests.
The problem is that 4 of the cmake failbuild tests use try_compile as
an indirection layer to configure /another/ project which is actually
the test.
That project needs to know the location of Qt. To do that, a
FindPackageHints.cmake file is included and the variable it sets is
passed to find_package() HINTS option. That's enough to find a
specific module, but not any dependent Tools packages.
Work around that by adding the Qt location to CMAKE_PREFIX_PATH in the
included FindPackageHints.cmake file.
The problem does not happen in standalone tests, because the
Qt location ends up being propagated via the qt toolchain file, which
does get inherited by the compile tests (albeit in a weird way, where
a reconfiguration still shows CMAKE_PREFIX_PATH to be empty).
Change-Id: I1f7ce940fd31678b46c0356edf6581e523cb885a
Fixes: QTBUG-86963
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>