Problem Cross-Compile Qt 6
Hello. I am trying to Cross Compile qt for my linux based device using this tutorial: https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi. One of the steps is to compile the qt for the host system(Building Qt 6 for Host Machine). In my case the host system is Ubuntu 22.04.5 LTS. At this stage, when i launch cmake
Code:
cmake ../qt5/ -GNinja -DCMAKE_BUILD_TYPE=Release -DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=$HOME/test1/qt-host
the following error occurs.
Code:
CMake Error at qtbase/cmake/QtPublicTargetHelpers.cmake:257 (set_property):
Attempt to promote imported target "Threads::Threads" to global scope (by
setting IMPORTED_GLOBAL) which is not built in this directory.
Call Stack ([link text](link url)most recent call first):
qtbase/cmake/QtFindPackageHelpers.cmake:180 (__qt_internal_promote_target_to_global)
qtbase/src/corelib/CMakeLists.txt:4 (qt_find_package)
full command output in a text document available at the link: https://disk.yandex.ru/d/HDnovG2rucgFwA
I followed all the steps according to the tutorial. Please advise how to solve the problem.
Re: Problem Cross-Compile Qt 6
Quote:
cmake ../qt5/ -GNinja -DCMAKE_BUILD_TYPE=Release -DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=$HOME/test1/qt-host
Are you trying to cross-compile Qt5 or Qt6? This says "../qt5/".
Re: Problem Cross-Compile Qt 6
I did everything according to the instruction: https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi
git clone "https://codereview.qt-project.org/qt/qt5" - creates a folder qt5 , but as I understand git repo contains later versions of qt
git checkout 6.4.0 - switch to qt6.4.0