qt5base-lts/cmake/QtBuildInternals
Alexandru Croitor d1c56073b4 CMake: Don't rely on CMAKE_FIND_ROOT_PATH_MODE_PACKAGE for examples
We shouldn't set CMAKE_FIND_ROOT_PATH_MODE_PACKAGE to BOTH when
cross-building examples without ExternalProjects.

Instead append the $build_tree_prefix to CMAKE_FIND_ROOT_PATH
and $build_tree_prefix/lib/cmake to QT_EXAMPLES_CMAKE_PREFIX_PATH
to circumvent the usual CMake path-rerooting issue.

This ensures that the build-tree Config files are found by the in-tree
find_package calls when cross-building examples.

Pick-to: 6.2 6.3
Task-number: QTBUG-96232
Change-Id: I4e31f0bf3dbfeb4339823fe09addda3ae83f12c3
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-03-16 15:56:17 +01:00
..
QtStandaloneTestTemplateProject CMake: Fix typo in function name 2021-07-07 17:40:45 +10:00
QtBuildInternalsConfig.cmake CMake: Don't rely on CMAKE_FIND_ROOT_PATH_MODE_PACKAGE for examples 2022-03-16 15:56:17 +01:00