diff mbox series

[meta-oe,3/5] lvgl: lv-conf.inc: add wayland packageconfig

Message ID 20261008100626.2259941-4-t.schmelzer@phytec.de
State New
Headers show
Series lvgl: update 9.5.0 -> 9.6.0 | expand

Commit Message

Thorsten Schmelzer Oct. 8, 2026, 10:06 a.m. UTC
Add the possibility to use wayland as lvgl backend. Add a config snippet
to enable wayland and add the necessary dependencies. The lvgl cmake
needs SYSROOT to be set to RECIPE_SYSROOT to find the wayland protocols.

Signed-off-by: Thorsten Schmelzer <t.schmelzer@phytec.de>
---
 meta-oe/recipes-graphics/lvgl/files/wayland.cfg | 1 +
 meta-oe/recipes-graphics/lvgl/lv-conf.inc       | 6 ++++++
 2 files changed, 7 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/lvgl/files/wayland.cfg
diff mbox series

Patch

diff --git a/meta-oe/recipes-graphics/lvgl/files/wayland.cfg b/meta-oe/recipes-graphics/lvgl/files/wayland.cfg
new file mode 100644
index 000000000000..0d18cd9df6eb
--- /dev/null
+++ b/meta-oe/recipes-graphics/lvgl/files/wayland.cfg
@@ -0,0 +1 @@ 
+CONFIG_LV_USE_WAYLAND=y
diff --git a/meta-oe/recipes-graphics/lvgl/lv-conf.inc b/meta-oe/recipes-graphics/lvgl/lv-conf.inc
index 84115b68cc51..073da087b45a 100644
--- a/meta-oe/recipes-graphics/lvgl/lv-conf.inc
+++ b/meta-oe/recipes-graphics/lvgl/lv-conf.inc
@@ -12,6 +12,7 @@  SRC_URI += " \
     ${@bb.utils.contains('PACKAGECONFIG', 'gridnav', 'file://gridnav.cfg', '', d)} \
     ${@bb.utils.contains('PACKAGECONFIG', 'sdl', 'file://sdl.cfg', '', d)} \
     ${@bb.utils.contains('PACKAGECONFIG', 'thorvg', 'file://thorvg.cfg', '', d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'wayland', 'file://wayland.cfg', '', d)} \
 "
 
 PACKAGECONFIG ??= "drm"
@@ -22,11 +23,16 @@  PACKAGECONFIG[freetype] = ",,freetype"
 PACKAGECONFIG[gridnav] = ",,"
 PACKAGECONFIG[thorvg] = ",,"
 PACKAGECONFIG[sdl] = ",,virtual/libsdl2 libsdl2-image"
+PACKAGECONFIG[wayland] = ",,wayland wayland-protocols wayland-native libxkbcommon"
 
 inherit cml1 python3native
 
 EXTRA_OECMAKE += "-DLV_BUILD_USE_KCONFIG=ON"
 
+# needed for finding wayland protocols
+export SYSROOT
+SYSROOT = "${RECIPE_SYSROOT}"
+
 KCONFIG_CONFIG_ROOTDIR ?= "${S}"
 KCONFIG_FILE ?= "${KCONFIG_CONFIG_ROOTDIR}/Kconfig"
 export KCONFIG_CONFIG ?= "${KCONFIG_CONFIG_ROOTDIR}/.config"