Context
I'd like to run a Qt application on an IM6 based system with a Yocto built image. I already have the meta-qt5
layer in my project. I started with a simple Qt5 application that only neededs the following modules:
QT += core gui widgets
All I have to do is make sure my bitbake recipe has DEPENDS += qtbase
and is based on the qmake class with: inherit qmake5
. And it builds and runs on the target! No problem
Problem
Now I'd like to add another Qt5 application, this time with the following modules and one plugin:
QT += core gui widgets quick qml svg xml network charts
QTPLUGIN += qsvg
Unfortunately, I'm not able to simple add these to my DEPENDS
variable and get it to work. But googling around for how to add support reveals what seems to be a sprawling assortment of solutions. I'll enumerate what I've found here:
- I need to add
inherit populate_sdk_qt5
to instruct bitbake to build the recipe against the SDK that contains the libraries for the modules (see here) - I need to add
IMAGE_FEATURES += dev-pkgs
to the recipe (see here) - I need to modify
local.conf
for the system, and add lines like:PACKAGECONFIG_append_pn_qttools = "..."
and alsoPACKAGECONFIG_append_pn-qtbase = "..."
- I need to modify
layer.conf
in my layer and add things likeIMAGE_INSTALL_append = "qtbase qtquick ..."
(slide 53 here) - I need to manually patch the Qt5 toolchain for charts? (see here)
- I need to compile my image using
bitbake <target> -c populate_sdk
? (see here again)
At this point, I'm really unsure what exactly is going on. It seems we're modifying the recipe, the layer configuration file, the distribution configuration file, and even meta-Qt layer files. I know that I fundamentally need to do a few things:
- Compile the application against the Qt5 SDK
- Compile the needed plugins + modules for the target architecture
- Make sure the appropriate binaries (images) are copied to the target.
But it has become a bit unclear about what does what. I know that IMAGE_INSTALL_append
adds images to the target, but I am lost with what is the proper way to add the modules. I don't want to go about randomly adding lines, so I'm hoping someone can clear up a bit what exactly I need to be looking at in order to add support for a Qt5 module for an application.