Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Yocto compilation issue - CMake Error
Forum Updated to NodeBB v4.3 + New Features

Yocto compilation issue - CMake Error

Scheduled Pinned Locked Moved Unsolved 3rd Party Software
1 Posts 1 Posters 982 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    leo738
    wrote on last edited by
    #1

    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
    
    
    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved