Yocto compilation issue - CMake Error
Unsolved
3rd Party Software
-
Hello all,
I'm using meta-qt6 (open source version), meta-raspberrypi & Yocto Kirkstone.
I'm trying to compile the most basic qml application (literally the project that is created when a new Qt Quick project is created). My recipe is:
SUMMARY = "QT QML Test Recipe" LICENSE = "CLOSED" SRC_URI = "file://CMakeLists.txt \ file://CMakeLists.txt.user \ file://main.cpp \ file://Main.qml \ " DEPENDS += " packagegroup-qt6-modules " RDEPENDS_${PN} += "qtwayland" S = "${WORKDIR}" do_install:append() { install -d ${D}${bindir} install -m 0755 qt-qml-demo ${D}${bindir} } # FILES_${PN} += "${D}${bindir}/qml-demo" inherit qt6-cmake
But I'm getting a CMake build error:
DEBUG: Python function extend_recipe_sysroot finished | DEBUG: Executing shell function do_configure | -- The CXX compiler identification is GNU 11.3.0 | -- Detecting CXX compiler ABI info | -- Detecting CXX compiler ABI info - done | -- Check for working CXX compiler: /media/owen/yocto/meritechYocto/meta-raspberrypi/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/qt-qml-demo/0.1-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ - skipped | -- Detecting CXX compile features | -- Detecting CXX compile features - done | CMake Error at CMakeLists.txt:8 (find_package): | Could not find a configuration file for package "Qt6" that is compatible | with requested version "6.2". | | The following configuration files were considered but not accepted: | | /media/owen/yocto/meritechYocto/meta-raspberrypi/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/qt-qml-demo/0.1-r0/recipe-sysroot-native/usr/lib/cmake/Qt6/Qt6Config.cmake, version: 6.2.4 (64bit)
So it looks like Bitbake is picking up my native CMake rather than CMake for the RPi.
Can someone share a CMakeLists.txt that works for Bitbake please!
My project layout is below. Thanks for looking!
Owen
├── files │ ├── CMakeLists.txt │ ├── CMakeLists.txt.user │ ├── main.cpp │ └── Main.qml └── qt-qml-demo_0.1.bb