qt5: set default QT_QPA_PLATFORM values for mp1 platforms

Otherwise, launching a Qt5 app will result in errors and the QPA platform will
need to be set manually to get it to work.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This commit is contained in:
Gabriel Valcazar 2023-11-22 14:36:11 +01:00
parent 6a7fc990b0
commit 54c9de6a74
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,7 @@
#!/bin/sh
export QT_QPA_PLATFORM="wayland"
[ -f "/etc/profile.d/weston_profile.sh" ] && return
# Use EGLFS platform plugin for images without Wayland
export QT_QPA_PLATFORM="eglfs" QT_QPA_EGLFS_INTEGRATION="eglfs_viv"

View File

@ -4,3 +4,12 @@ PACKAGECONFIG_GL = " ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2',
PACKAGECONFIG:append = " eglfs examples accessibility " PACKAGECONFIG:append = " eglfs examples accessibility "
QT_CONFIG_FLAGS += " -no-sse2 -no-opengles3" QT_CONFIG_FLAGS += " -no-sse2 -no-opengles3"
SRC_URI:append = " \
file://qt5.sh \
"
do_install:append () {
install -d ${D}${sysconfdir}/profile.d/
install -m 0755 ${WORKDIR}/qt5.sh ${D}${sysconfdir}/profile.d/qt5.sh
}
FILES:${PN} += "${sysconfdir}/profile.d/qt5.sh"