From c9c51b1bfadd22c0ea5f06ebed842296d97156a3 Mon Sep 17 00:00:00 2001 From: Christophe Chapuis Date: Mon, 18 Mar 2024 19:25:50 +0100 Subject: lvgl: make libdrm include conditional The libdrm include is only needed when "drm" is selected in PACKAGECONFIG. In addition, move the TARGET_CFLAG addition to lv-conf.inc, where the DRM configuration is actually selected for LVGL. Signed-off-by: Christophe Chapuis Reviewed-by: Marek Vasut Signed-off-by: Khem Raj --- meta-oe/recipes-graphics/lvgl/lv-conf.inc | 3 +++ meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_9.0.0.bb | 2 -- meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-) (limited to 'meta-oe/recipes-graphics') diff --git a/meta-oe/recipes-graphics/lvgl/lv-conf.inc b/meta-oe/recipes-graphics/lvgl/lv-conf.inc index 2b5d4a14a9..542e90ae57 100644 --- a/meta-oe/recipes-graphics/lvgl/lv-conf.inc +++ b/meta-oe/recipes-graphics/lvgl/lv-conf.inc @@ -2,6 +2,9 @@ PACKAGECONFIG[drm] = ",,libdrm" PACKAGECONFIG[fbdev] = ",," PACKAGECONFIG[sdl] = ",,virtual/libsdl2 libsdl2-image" +# Add libdrm include if drm is selected in PACKAGECONFIG +TARGET_CFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'drm', '-I${STAGING_INCDIR}/libdrm', '', d)}" + LVGL_CONFIG_USE_DRM = "${@bb.utils.contains('PACKAGECONFIG', 'drm', '1', '0', d)}" LVGL_CONFIG_USE_EVDEV = "${@bb.utils.contains_any('PACKAGECONFIG', 'drm fbdev', '1', '0', d)}" diff --git a/meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_9.0.0.bb b/meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_9.0.0.bb index 6d3ae1ec37..5ae930f5cf 100644 --- a/meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_9.0.0.bb +++ b/meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_9.0.0.bb @@ -30,8 +30,6 @@ inherit cmake S = "${WORKDIR}/git" -TARGET_CFLAGS += "-I${STAGING_INCDIR}/libdrm" - do_configure:prepend() { if [ "${LVGL_CONFIG_USE_SDL}" -eq 1 ] ; then # Add libsdl build dependency, SDL2_image has no cmake file diff --git a/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb b/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb index fddaef4b4f..0fb3ddecf2 100644 --- a/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb +++ b/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb @@ -22,8 +22,6 @@ inherit cmake EXTRA_OECMAKE = "-DLIB_INSTALL_DIR=${baselib} -DBUILD_SHARED_LIBS=ON" S = "${WORKDIR}/git" -TARGET_CFLAGS += "-I${STAGING_INCDIR}/libdrm" - ALLOW_EMPTY:${PN} = "1" PACKAGECONFIG ??= "drm" -- cgit 1.2.3-korg