Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Yocto & pro, How to compile



  • I 've put meta-qt5 into my Yocto project , and gotten img already.
    Then How to integrate a QT app ,which have only src and .pro, into a yocto project?



  • Create a meta layer using bitbake-layers create-layer , then create the recipes-qt / name_you_project/name_you_project_git.bb directories within your layer.

    Example name_you_project_git.bb

    SUMMARY = "Qt Application Demo"
    DESCRIPTION = "Description your project"
    LICENSE = "MIT"
    LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
    
    DEPENDS += "qtbase"
    
    SRC_URI = "git://github.com/<user_repo>/<name_you_repo_project>"
    SRCREV = "COMMIT_HERE"
    
    S = "${WORKDIR}/git"
    
    do_install_append() {
        install -d ${D}/opt/app/
        install -m 0755 your_program ${D}/opt/app/your_program
    }
    
    FILES_${PN} += "/opt/app/your_program"
    
    inherit qmake5
    

    After execute: bitbake name_you_project

    We work with Qt5 consultancy with Yocto Project if you need to.


    Cleiton Bueno

    Blog | Linkedin | B2Open




Log in to reply