1file(GLOB_RECURSE SOURCES ${LVGL_ROOT_DIR}/src/*.c) 2file(GLOB_RECURSE EXAMPLE_SOURCES ${LVGL_ROOT_DIR}/examples/*.c) 3 4# With micropython, build lvgl as interface library, link chain is: 5# lvgl_interface [lvgl] → usermod_lvgl_bindings [lv_bindings] → usermod 6# [micropython] → firmware [micropython] 7add_library(lvgl_interface INTERFACE) 8# ${SOURCES} must NOT be given to add_library directly for some reason (won't be 9# built) 10target_sources(lvgl_interface INTERFACE ${SOURCES}) 11# Micropython builds with -Werror; we need to suppress some warnings, such as: 12# 13# /home/test/build/lv_micropython/ports/rp2/build-PICO/lv_mp.c:29316:16: error: 14# 'lv_style_transition_dsc_t_path_xcb_callback' defined but not used 15# [-Werror=unused-function] 29316 | STATIC int32_t 16# lv_style_transition_dsc_t_path_xcb_callback(const struct _lv_anim_t * arg0) | 17# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 18target_compile_options(lvgl_interface INTERFACE -Wno-unused-function) 19