diff options
author | Christophe Chapuis <chris.chapuis@gmail.com> | 2024-03-18 19:25:50 +0100 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-03-18 15:42:50 -0700 |
commit | c9c51b1bfadd22c0ea5f06ebed842296d97156a3 (patch) | |
tree | 752db2d42b541fce61109364fe800849aa849fbc /meta-oe | |
parent | 4e9df16acb5236720556b4752931a69f73d31896 (diff) | |
download | meta-openembedded-c9c51b1bfadd22c0ea5f06ebed842296d97156a3.tar.gz |
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 <chris.chapuis@gmail.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r-- | meta-oe/recipes-graphics/lvgl/lv-conf.inc | 3 | ||||
-rw-r--r-- | meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_9.0.0.bb | 2 | ||||
-rw-r--r-- | meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/meta-oe/recipes-graphics/lvgl/lv-conf.inc b/meta-oe/recipes-graphics/lvgl/lv-conf.inc index 2b5d4a14a..542e90ae5 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" | |||
2 | PACKAGECONFIG[fbdev] = ",," | 2 | PACKAGECONFIG[fbdev] = ",," |
3 | PACKAGECONFIG[sdl] = ",,virtual/libsdl2 libsdl2-image" | 3 | PACKAGECONFIG[sdl] = ",,virtual/libsdl2 libsdl2-image" |
4 | 4 | ||
5 | # Add libdrm include if drm is selected in PACKAGECONFIG | ||
6 | TARGET_CFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'drm', '-I${STAGING_INCDIR}/libdrm', '', d)}" | ||
7 | |||
5 | LVGL_CONFIG_USE_DRM = "${@bb.utils.contains('PACKAGECONFIG', 'drm', '1', '0', d)}" | 8 | LVGL_CONFIG_USE_DRM = "${@bb.utils.contains('PACKAGECONFIG', 'drm', '1', '0', d)}" |
6 | 9 | ||
7 | LVGL_CONFIG_USE_EVDEV = "${@bb.utils.contains_any('PACKAGECONFIG', 'drm fbdev', '1', '0', d)}" | 10 | 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 6d3ae1ec3..5ae930f5c 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 | |||
30 | 30 | ||
31 | S = "${WORKDIR}/git" | 31 | S = "${WORKDIR}/git" |
32 | 32 | ||
33 | TARGET_CFLAGS += "-I${STAGING_INCDIR}/libdrm" | ||
34 | |||
35 | do_configure:prepend() { | 33 | do_configure:prepend() { |
36 | if [ "${LVGL_CONFIG_USE_SDL}" -eq 1 ] ; then | 34 | if [ "${LVGL_CONFIG_USE_SDL}" -eq 1 ] ; then |
37 | # Add libsdl build dependency, SDL2_image has no cmake file | 35 | # 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 fddaef4b4..0fb3ddecf 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 | |||
22 | EXTRA_OECMAKE = "-DLIB_INSTALL_DIR=${baselib} -DBUILD_SHARED_LIBS=ON" | 22 | EXTRA_OECMAKE = "-DLIB_INSTALL_DIR=${baselib} -DBUILD_SHARED_LIBS=ON" |
23 | S = "${WORKDIR}/git" | 23 | S = "${WORKDIR}/git" |
24 | 24 | ||
25 | TARGET_CFLAGS += "-I${STAGING_INCDIR}/libdrm" | ||
26 | |||
27 | ALLOW_EMPTY:${PN} = "1" | 25 | ALLOW_EMPTY:${PN} = "1" |
28 | 26 | ||
29 | PACKAGECONFIG ??= "drm" | 27 | PACKAGECONFIG ??= "drm" |