micropython.cmake 962 B

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