0e2b385c5b
So far we always recommended that developers set CMAKE_PREFIX_PATH to point to the location of the Qt installation so that Qt packages are found by CMake. In Qt5 one could also set the Qt5_DIR variable to $qt/lib/cmake/Qt5 to allow the following signature to work: find_package(Qt5 COMPONENTS Core) This was not sufficient in Qt6 because the CoreTools dependency would not be found. Fix this by also looking into the parent folder of CMAKE_CURRENT_LIST_DIR as well as _qt_cmake_dir, like we already do for regular non-Tools packages in _qt_internal_find_dependencies. Note that setting Qt6_DIR is not sufficient for cross-compilation if the qt.toolchain.cmake file is not used. Aside from platform specific options that would have to be passed manually to CMake (like -DCMAKE_SYSTEM_NAME=iOS for iOS) and passing a QT_HOST_PATH value, the code would also need to be adapted to do the necessary CMAKE_FIND_ROOT_PATH manipulations to ensure that dependent packages are found. Pick-to: 6.4 Task-number: QTBUG-97615 Change-Id: I10c419632d43bb929e184bab3b9d3d27a35ea87a Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> |
||
---|---|---|
.github/workflows | ||
bin | ||
cmake | ||
coin | ||
config.tests | ||
dist | ||
doc | ||
examples | ||
lib | ||
libexec | ||
LICENSES | ||
mkspecs | ||
qmake | ||
src | ||
tests | ||
util | ||
.cmake.conf | ||
.gitattributes | ||
.gitignore | ||
.lgtm.yml | ||
.tag | ||
CMakeLists.txt | ||
conanfile.py | ||
config_help.txt | ||
configure | ||
configure.bat | ||
configure.cmake | ||
dependencies.yaml | ||
qt_cmdline.cmake | ||
sync.profile |