Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.7.0 Beta3, 6.8.0 Beta1
-
None
-
4f9da08b0 (dev), 633751f18 (6.8), ef789eeea (6.7), e75c43d0c (tqtc/lts-6.5)
Description
Trying to configure
../qtbase/bin/qt-cmake ../../../worktrees/dev/qtbase/tests/auto/gui/image/qicon/
with a cross-compiled Qt, like Qt for Android, iOS, WASM, embedded linux, fails with:
CMake Error at /Users/alex/Dev/qt/worktrees/dev/qtbase/cmake/QtBuildHelpers.cmake:341 (message): You need to set QT_HOST_PATH to cross compile Qt. Call Stack (most recent call first): /Users/alex/Dev/qt/worktrees/dev/qtbase/cmake/QtBuildHelpers.cmake:444 (qt_internal_check_host_path_set_for_cross_compiling) /Users/alex/Dev/qt/worktrees/dev/qtbase/cmake/QtBuild.cmake:4 (qt_internal_setup_build_and_global_variables) /Users/alex/Dev/qt/worktrees/dev/qtbase/cmake/QtSetup.cmake:6 (include) /Users/alex/Dev/qt/worktrees/dev/qtbase/cmake/QtBuildRepoHelpers.cmake:21 (include) /Users/alex/Dev/qt/builds/dev-android-sim-64-deb/qtbase/lib/cmake/Qt6BuildInternals/QtStandaloneTestTemplateProject/Main.cmake:7 (qt_build_internals_set_up_private_api) /Users/alex/Dev/qt/worktrees/dev/qtbase/cmake/QtBuildRepoHelpers.cmake:1036 (include) /Users/alex/Dev/qt/worktrees/dev/qtbase/cmake/QtBuildRepoHelpers.cmake:1053 (qt_internal_setup_standalone_test_when_called_as_a_find_package_component) /Users/alex/Dev/qt/builds/dev-android-sim-64-deb/qtbase/lib/cmake/Qt6BuildInternals/Qt6BuildInternalsConfig.cmake:68 (qt_internal_setup_build_internals) CMakeLists.txt:11 (find_package)
That's because the QT_HOST_PATH is set by the Qt6 package, but the check for QT_HOST_PATH happens before it is loaded.
Attachments
For Gerrit Dashboard: QTBUG-127668 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
580440,2 | CMake: Fix configuring standalone tests with a cross-compiled Qt | dev | qt/qtbase | Status: MERGED | +2 | 0 |
580682,2 | CMake: Fix configuring standalone tests with a cross-compiled Qt | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
580794,2 | CMake: Fix configuring standalone tests with a cross-compiled Qt | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |
580813,2 | CMake: Fix configuring standalone tests with a cross-compiled Qt | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |