If I understand correctly.
All I need to do is add the following to my distro config: DISTRO_FEATURES_append = " opengl wayland".
And then add this to my image: inherit totalcross-app.
Basically I would be able to remove all this:
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', \
'weston weston-init weston-examples ${APP_LAUNCH_WAYLAND}', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', \
'weston-xwayland xterm', \
bb.utils.contains('DISTRO_FEATURES', 'x11', '${APP_LAUNCH_X11}', '', d), d)} \
\
APP_LAUNCH_WAYLAND ?= "wayland-qtdemo-launch-cinematicexperience"
APP_LAUNCH_WAYLAND_colibri-imx6ull ?= "wayland-qtdemo-launch-analogclock"
APP_LAUNCH_WAYLAND_colibri-imx7 ?= "wayland-qtdemo-launch-analogclock"
APP_LAUNCH_WAYLAND_colibri-imx7-emmc ?= "wayland-qtdemo-launch-analogclock"
APP_LAUNCH_WAYLAND_apalis-tk1 ?= "wayland-qtdemo-launch-qtsmarthome"
APP_LAUNCH_X11 ?= "x-window-qtcinematicexperience"
APP_LAUNCH_X11_colibri-imx6ull ?= "x-window-analogclock"
APP_LAUNCH_X11_colibri-imx7 ?= "x-window-analogclock"
APP_LAUNCH_X11_colibri-imx7-emmc ?= "x-window-analogclock"
APP_LAUNCH_X11_apalis-tk1 ?= "x-window-qtsmarthome"
Correct ?