Add QT application files to Yocto recipe
-
wrote on 28 Feb 2022, 18:28 last edited by
Re: Yocto & pro, How to compile
I am trying to add my local qt project files in a yocto image which contains meta-qt5 layers. However I am not sure which files to refer thorugh SRC_URI in my recipe. Should the recipe contain all the files such as .pro, .cpp, and .h files in the bb file. The recipe file that I have made is given below. Kindly let me know if it is the correct approach or if there is anything that is required to be changed or added in it.
The name of my QT application is "hi" and the name of my recipe is "helloworld."
DESCRIPTION = "A friendly program that shows Hello World Window!"
PRIORITY = "optional"
SECTION = "examples"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"inherit qmake5
SRC_URI += "file://main.cpp \
file://hi.pro
file://hi.pro.user
file://mainwindow.cpp \
file://mainwindow.h
file://ui_mainwindow.h \
file://mainwindow.ui"S = "${WORKDIR}"
DEPENDS += "qtbase"
do_install_append() {
install -d ${D}/opt/app
install -m 0755 hi ${D}/opt/app/hi
}FILES_${PN} += "/opt/app/hi"
inherit qmake5
1/1