1# Copyright (c) 2019 jan.van_winkel@dxplore.eu 2# Copyright (c) 2020 Teslabs Engineering S.L. 3# Copyright (c) 2023 Fabian Blatz <fabianblatz@gmail.com> 4# 5# SPDX-License-Identifier: Apache-2.0 6 7if(CONFIG_LVGL) 8 9set(ZEPHYR_CURRENT_LIBRARY lvgl) 10set(LVGL_DIR ${ZEPHYR_LVGL_MODULE_DIR}) 11 12zephyr_interface_library_named(LVGL) 13zephyr_library() 14 15zephyr_include_directories(${LVGL_DIR}/src/) 16zephyr_include_directories(include) 17 18zephyr_compile_definitions(LV_CONF_INCLUDE_SIMPLE=1) 19zephyr_compile_definitions(LV_CONF_PATH="${CMAKE_CURRENT_SOURCE_DIR}/include/lv_conf.h") 20 21zephyr_library_sources( 22 23 ${LVGL_DIR}/src/core/lv_group.c 24 ${LVGL_DIR}/src/core/lv_obj.c 25 ${LVGL_DIR}/src/core/lv_obj_class.c 26 ${LVGL_DIR}/src/core/lv_obj_draw.c 27 ${LVGL_DIR}/src/core/lv_obj_event.c 28 ${LVGL_DIR}/src/core/lv_obj_id_builtin.c 29 ${LVGL_DIR}/src/core/lv_obj_pos.c 30 ${LVGL_DIR}/src/core/lv_obj_property.c 31 ${LVGL_DIR}/src/core/lv_obj_scroll.c 32 ${LVGL_DIR}/src/core/lv_obj_style.c 33 ${LVGL_DIR}/src/core/lv_obj_style_gen.c 34 ${LVGL_DIR}/src/core/lv_obj_tree.c 35 ${LVGL_DIR}/src/core/lv_refr.c 36 37 ${LVGL_DIR}/src/display/lv_display.c 38 39 ${LVGL_DIR}/src/draw/dma2d/lv_draw_dma2d.c 40 ${LVGL_DIR}/src/draw/dma2d/lv_draw_dma2d_fill.c 41 ${LVGL_DIR}/src/draw/dma2d/lv_draw_dma2d_img.c 42 43 ${LVGL_DIR}/src/draw/lv_draw_arc.c 44 ${LVGL_DIR}/src/draw/lv_draw_buf.c 45 ${LVGL_DIR}/src/draw/lv_draw.c 46 ${LVGL_DIR}/src/draw/lv_draw_image.c 47 ${LVGL_DIR}/src/draw/lv_draw_label.c 48 ${LVGL_DIR}/src/draw/lv_draw_line.c 49 ${LVGL_DIR}/src/draw/lv_draw_mask.c 50 ${LVGL_DIR}/src/draw/lv_draw_rect.c 51 ${LVGL_DIR}/src/draw/lv_draw_triangle.c 52 ${LVGL_DIR}/src/draw/lv_draw_vector.c 53 ${LVGL_DIR}/src/draw/lv_image_decoder.c 54 55 ${LVGL_DIR}/src/draw/nxp/pxp/lv_draw_buf_pxp.c 56 ${LVGL_DIR}/src/draw/nxp/pxp/lv_draw_pxp.c 57 ${LVGL_DIR}/src/draw/nxp/pxp/lv_draw_pxp_fill.c 58 ${LVGL_DIR}/src/draw/nxp/pxp/lv_draw_pxp_img.c 59 ${LVGL_DIR}/src/draw/nxp/pxp/lv_draw_pxp_layer.c 60 ${LVGL_DIR}/src/draw/nxp/pxp/lv_pxp_cfg.c 61 ${LVGL_DIR}/src/draw/nxp/pxp/lv_pxp_osa.c 62 ${LVGL_DIR}/src/draw/nxp/pxp/lv_pxp_utils.c 63 ${LVGL_DIR}/src/draw/nxp/vglite/lv_draw_buf_vglite.c 64 ${LVGL_DIR}/src/draw/nxp/vglite/lv_draw_vglite_arc.c 65 ${LVGL_DIR}/src/draw/nxp/vglite/lv_draw_vglite_border.c 66 ${LVGL_DIR}/src/draw/nxp/vglite/lv_draw_vglite.c 67 ${LVGL_DIR}/src/draw/nxp/vglite/lv_draw_vglite_fill.c 68 ${LVGL_DIR}/src/draw/nxp/vglite/lv_draw_vglite_img.c 69 ${LVGL_DIR}/src/draw/nxp/vglite/lv_draw_vglite_label.c 70 ${LVGL_DIR}/src/draw/nxp/vglite/lv_draw_vglite_layer.c 71 ${LVGL_DIR}/src/draw/nxp/vglite/lv_draw_vglite_line.c 72 ${LVGL_DIR}/src/draw/nxp/vglite/lv_draw_vglite_triangle.c 73 ${LVGL_DIR}/src/draw/nxp/vglite/lv_vglite_buf.c 74 ${LVGL_DIR}/src/draw/nxp/vglite/lv_vglite_matrix.c 75 ${LVGL_DIR}/src/draw/nxp/vglite/lv_vglite_path.c 76 ${LVGL_DIR}/src/draw/nxp/vglite/lv_vglite_utils.c 77 78 ${LVGL_DIR}/src/draw/renesas/dave2d/lv_draw_dave2d_arc.c 79 ${LVGL_DIR}/src/draw/renesas/dave2d/lv_draw_dave2d_border.c 80 ${LVGL_DIR}/src/draw/renesas/dave2d/lv_draw_dave2d.c 81 ${LVGL_DIR}/src/draw/renesas/dave2d/lv_draw_dave2d_fill.c 82 ${LVGL_DIR}/src/draw/renesas/dave2d/lv_draw_dave2d_image.c 83 ${LVGL_DIR}/src/draw/renesas/dave2d/lv_draw_dave2d_label.c 84 ${LVGL_DIR}/src/draw/renesas/dave2d/lv_draw_dave2d_line.c 85 ${LVGL_DIR}/src/draw/renesas/dave2d/lv_draw_dave2d_mask_rectangle.c 86 ${LVGL_DIR}/src/draw/renesas/dave2d/lv_draw_dave2d_triangle.c 87 ${LVGL_DIR}/src/draw/renesas/dave2d/lv_draw_dave2d_utils.c 88 89 ${LVGL_DIR}/src/draw/sw/blend/lv_draw_sw_blend.c 90 ${LVGL_DIR}/src/draw/sw/blend/lv_draw_sw_blend_to_al88.c 91 ${LVGL_DIR}/src/draw/sw/blend/lv_draw_sw_blend_to_argb8888.c 92 ${LVGL_DIR}/src/draw/sw/blend/lv_draw_sw_blend_to_i1.c 93 ${LVGL_DIR}/src/draw/sw/blend/lv_draw_sw_blend_to_l8.c 94 ${LVGL_DIR}/src/draw/sw/blend/lv_draw_sw_blend_to_rgb565.c 95 ${LVGL_DIR}/src/draw/sw/blend/lv_draw_sw_blend_to_rgb888.c 96 ${LVGL_DIR}/src/draw/sw/lv_draw_sw_arc.c 97 ${LVGL_DIR}/src/draw/sw/lv_draw_sw_border.c 98 ${LVGL_DIR}/src/draw/sw/lv_draw_sw_box_shadow.c 99 ${LVGL_DIR}/src/draw/sw/lv_draw_sw.c 100 ${LVGL_DIR}/src/draw/sw/lv_draw_sw_fill.c 101 ${LVGL_DIR}/src/draw/sw/lv_draw_sw_gradient.c 102 ${LVGL_DIR}/src/draw/sw/lv_draw_sw_img.c 103 ${LVGL_DIR}/src/draw/sw/lv_draw_sw_letter.c 104 ${LVGL_DIR}/src/draw/sw/lv_draw_sw_line.c 105 ${LVGL_DIR}/src/draw/sw/lv_draw_sw_mask.c 106 ${LVGL_DIR}/src/draw/sw/lv_draw_sw_mask_rect.c 107 ${LVGL_DIR}/src/draw/sw/lv_draw_sw_transform.c 108 ${LVGL_DIR}/src/draw/sw/lv_draw_sw_triangle.c 109 ${LVGL_DIR}/src/draw/sw/lv_draw_sw_utils.c 110 ${LVGL_DIR}/src/draw/sw/lv_draw_sw_vector.c 111 112 ${LVGL_DIR}/src/draw/vg_lite/lv_draw_buf_vg_lite.c 113 ${LVGL_DIR}/src/draw/vg_lite/lv_draw_vg_lite_arc.c 114 ${LVGL_DIR}/src/draw/vg_lite/lv_draw_vg_lite_border.c 115 ${LVGL_DIR}/src/draw/vg_lite/lv_draw_vg_lite_box_shadow.c 116 ${LVGL_DIR}/src/draw/vg_lite/lv_draw_vg_lite.c 117 ${LVGL_DIR}/src/draw/vg_lite/lv_draw_vg_lite_fill.c 118 ${LVGL_DIR}/src/draw/vg_lite/lv_draw_vg_lite_img.c 119 ${LVGL_DIR}/src/draw/vg_lite/lv_draw_vg_lite_label.c 120 ${LVGL_DIR}/src/draw/vg_lite/lv_draw_vg_lite_layer.c 121 ${LVGL_DIR}/src/draw/vg_lite/lv_draw_vg_lite_line.c 122 ${LVGL_DIR}/src/draw/vg_lite/lv_draw_vg_lite_mask_rect.c 123 ${LVGL_DIR}/src/draw/vg_lite/lv_draw_vg_lite_triangle.c 124 ${LVGL_DIR}/src/draw/vg_lite/lv_draw_vg_lite_vector.c 125 ${LVGL_DIR}/src/draw/vg_lite/lv_vg_lite_decoder.c 126 ${LVGL_DIR}/src/draw/vg_lite/lv_vg_lite_grad.c 127 ${LVGL_DIR}/src/draw/vg_lite/lv_vg_lite_math.c 128 ${LVGL_DIR}/src/draw/vg_lite/lv_vg_lite_path.c 129 ${LVGL_DIR}/src/draw/vg_lite/lv_vg_lite_pending.c 130 ${LVGL_DIR}/src/draw/vg_lite/lv_vg_lite_stroke.c 131 ${LVGL_DIR}/src/draw/vg_lite/lv_vg_lite_utils.c 132 133 ${LVGL_DIR}/src/font/lv_binfont_loader.c 134 ${LVGL_DIR}/src/font/lv_font.c 135 ${LVGL_DIR}/src/font/lv_font_dejavu_16_persian_hebrew.c 136 ${LVGL_DIR}/src/font/lv_font_fmt_txt.c 137 ${LVGL_DIR}/src/font/lv_font_montserrat_10.c 138 ${LVGL_DIR}/src/font/lv_font_montserrat_12.c 139 ${LVGL_DIR}/src/font/lv_font_montserrat_14.c 140 ${LVGL_DIR}/src/font/lv_font_montserrat_16.c 141 ${LVGL_DIR}/src/font/lv_font_montserrat_18.c 142 ${LVGL_DIR}/src/font/lv_font_montserrat_20.c 143 ${LVGL_DIR}/src/font/lv_font_montserrat_22.c 144 ${LVGL_DIR}/src/font/lv_font_montserrat_24.c 145 ${LVGL_DIR}/src/font/lv_font_montserrat_26.c 146 ${LVGL_DIR}/src/font/lv_font_montserrat_28.c 147 ${LVGL_DIR}/src/font/lv_font_montserrat_28_compressed.c 148 ${LVGL_DIR}/src/font/lv_font_montserrat_30.c 149 ${LVGL_DIR}/src/font/lv_font_montserrat_32.c 150 ${LVGL_DIR}/src/font/lv_font_montserrat_34.c 151 ${LVGL_DIR}/src/font/lv_font_montserrat_36.c 152 ${LVGL_DIR}/src/font/lv_font_montserrat_38.c 153 ${LVGL_DIR}/src/font/lv_font_montserrat_40.c 154 ${LVGL_DIR}/src/font/lv_font_montserrat_42.c 155 ${LVGL_DIR}/src/font/lv_font_montserrat_44.c 156 ${LVGL_DIR}/src/font/lv_font_montserrat_46.c 157 ${LVGL_DIR}/src/font/lv_font_montserrat_48.c 158 ${LVGL_DIR}/src/font/lv_font_montserrat_8.c 159 ${LVGL_DIR}/src/font/lv_font_simsun_14_cjk.c 160 ${LVGL_DIR}/src/font/lv_font_simsun_16_cjk.c 161 ${LVGL_DIR}/src/font/lv_font_unscii_16.c 162 ${LVGL_DIR}/src/font/lv_font_unscii_8.c 163 164 ${LVGL_DIR}/src/indev/lv_indev.c 165 ${LVGL_DIR}/src/indev/lv_indev_scroll.c 166 167 ${LVGL_DIR}/src/layouts/flex/lv_flex.c 168 ${LVGL_DIR}/src/layouts/grid/lv_grid.c 169 ${LVGL_DIR}/src/layouts/lv_layout.c 170 171 ${LVGL_DIR}/src/libs/barcode/code128.c 172 ${LVGL_DIR}/src/libs/barcode/lv_barcode.c 173 ${LVGL_DIR}/src/libs/bin_decoder/lv_bin_decoder.c 174 ${LVGL_DIR}/src/libs/bmp/lv_bmp.c 175 ${LVGL_DIR}/src/libs/ffmpeg/lv_ffmpeg.c 176 ${LVGL_DIR}/src/libs/freetype/lv_freetype.c 177 ${LVGL_DIR}/src/libs/freetype/lv_freetype_glyph.c 178 ${LVGL_DIR}/src/libs/freetype/lv_freetype_image.c 179 ${LVGL_DIR}/src/libs/freetype/lv_freetype_outline.c 180 ${LVGL_DIR}/src/libs/freetype/lv_ftsystem.c 181 ${LVGL_DIR}/src/libs/fsdrv/lv_fs_cbfs.c 182 ${LVGL_DIR}/src/libs/fsdrv/lv_fs_fatfs.c 183 ${LVGL_DIR}/src/libs/fsdrv/lv_fs_littlefs.c 184 ${LVGL_DIR}/src/libs/fsdrv/lv_fs_memfs.c 185 ${LVGL_DIR}/src/libs/fsdrv/lv_fs_posix.c 186 ${LVGL_DIR}/src/libs/fsdrv/lv_fs_stdio.c 187 ${LVGL_DIR}/src/libs/fsdrv/lv_fs_win32.c 188 ${LVGL_DIR}/src/libs/gif/gifdec.c 189 ${LVGL_DIR}/src/libs/gif/lv_gif.c 190 ${LVGL_DIR}/src/libs/libjpeg_turbo/lv_libjpeg_turbo.c 191 ${LVGL_DIR}/src/libs/libpng/lv_libpng.c 192 ${LVGL_DIR}/src/libs/lodepng/lodepng.c 193 ${LVGL_DIR}/src/libs/lodepng/lv_lodepng.c 194 ${LVGL_DIR}/src/libs/lz4/lz4.c 195 ${LVGL_DIR}/src/libs/qrcode/lv_qrcode.c 196 ${LVGL_DIR}/src/libs/qrcode/qrcodegen.c 197 ${LVGL_DIR}/src/libs/rle/lv_rle.c 198 ${LVGL_DIR}/src/libs/rlottie/lv_rlottie.c 199 ${LVGL_DIR}/src/libs/tiny_ttf/lv_tiny_ttf.c 200 ${LVGL_DIR}/src/libs/tjpgd/lv_tjpgd.c 201 ${LVGL_DIR}/src/libs/tjpgd/tjpgd.c 202 203 ${LVGL_DIR}/src/lv_init.c 204 205 ${LVGL_DIR}/src/misc/cache/lv_cache.c 206 ${LVGL_DIR}/src/misc/cache/lv_cache_entry.c 207 ${LVGL_DIR}/src/misc/cache/lv_cache_lru_rb.c 208 ${LVGL_DIR}/src/misc/cache/lv_image_cache.c 209 ${LVGL_DIR}/src/misc/cache/lv_image_header_cache.c 210 ${LVGL_DIR}/src/misc/lv_anim.c 211 ${LVGL_DIR}/src/misc/lv_anim_timeline.c 212 ${LVGL_DIR}/src/misc/lv_area.c 213 ${LVGL_DIR}/src/misc/lv_array.c 214 ${LVGL_DIR}/src/misc/lv_async.c 215 ${LVGL_DIR}/src/misc/lv_bidi.c 216 ${LVGL_DIR}/src/misc/lv_color.c 217 ${LVGL_DIR}/src/misc/lv_color_op.c 218 ${LVGL_DIR}/src/misc/lv_event.c 219 ${LVGL_DIR}/src/misc/lv_fs.c 220 ${LVGL_DIR}/src/misc/lv_iter.c 221 ${LVGL_DIR}/src/misc/lv_ll.c 222 ${LVGL_DIR}/src/misc/lv_log.c 223 ${LVGL_DIR}/src/misc/lv_lru.c 224 ${LVGL_DIR}/src/misc/lv_math.c 225 ${LVGL_DIR}/src/misc/lv_matrix.c 226 ${LVGL_DIR}/src/misc/lv_palette.c 227 ${LVGL_DIR}/src/misc/lv_profiler_builtin.c 228 ${LVGL_DIR}/src/misc/lv_rb.c 229 ${LVGL_DIR}/src/misc/lv_style.c 230 ${LVGL_DIR}/src/misc/lv_style_gen.c 231 ${LVGL_DIR}/src/misc/lv_templ.c 232 ${LVGL_DIR}/src/misc/lv_text_ap.c 233 ${LVGL_DIR}/src/misc/lv_text.c 234 ${LVGL_DIR}/src/misc/lv_timer.c 235 ${LVGL_DIR}/src/misc/lv_utils.c 236 ${LVGL_DIR}/src/osal/lv_os.c 237 238 ${LVGL_DIR}/src/others/file_explorer/lv_file_explorer.c 239 ${LVGL_DIR}/src/others/fragment/lv_fragment.c 240 ${LVGL_DIR}/src/others/fragment/lv_fragment_manager.c 241 ${LVGL_DIR}/src/others/gridnav/lv_gridnav.c 242 ${LVGL_DIR}/src/others/ime/lv_ime_pinyin.c 243 ${LVGL_DIR}/src/others/imgfont/lv_imgfont.c 244 ${LVGL_DIR}/src/others/monkey/lv_monkey.c 245 ${LVGL_DIR}/src/others/observer/lv_observer.c 246 ${LVGL_DIR}/src/others/snapshot/lv_snapshot.c 247 ${LVGL_DIR}/src/others/sysmon/lv_sysmon.c 248 ${LVGL_DIR}/src/others/vg_lite_tvg/vg_lite_matrix.c 249 250 ${LVGL_DIR}/src/stdlib/builtin/lv_sprintf_builtin.c 251 ${LVGL_DIR}/src/stdlib/builtin/lv_string_builtin.c 252 ${LVGL_DIR}/src/stdlib/builtin/lv_tlsf.c 253 254 ${LVGL_DIR}/src/stdlib/clib/lv_mem_core_clib.c 255 ${LVGL_DIR}/src/stdlib/clib/lv_sprintf_clib.c 256 ${LVGL_DIR}/src/stdlib/clib/lv_string_clib.c 257 258 ${LVGL_DIR}/src/stdlib/lv_mem.c 259 260 ${LVGL_DIR}/src/themes/default/lv_theme_default.c 261 262 ${LVGL_DIR}/src/themes/lv_theme.c 263 ${LVGL_DIR}/src/themes/mono/lv_theme_mono.c 264 ${LVGL_DIR}/src/themes/simple/lv_theme_simple.c 265 266 ${LVGL_DIR}/src/tick/lv_tick.c 267 268 ${LVGL_DIR}/src/widgets/animimage/lv_animimage.c 269 ${LVGL_DIR}/src/widgets/arc/lv_arc.c 270 ${LVGL_DIR}/src/widgets/bar/lv_bar.c 271 ${LVGL_DIR}/src/widgets/button/lv_button.c 272 ${LVGL_DIR}/src/widgets/buttonmatrix/lv_buttonmatrix.c 273 ${LVGL_DIR}/src/widgets/calendar/lv_calendar.c 274 ${LVGL_DIR}/src/widgets/calendar/lv_calendar_chinese.c 275 ${LVGL_DIR}/src/widgets/calendar/lv_calendar_header_arrow.c 276 ${LVGL_DIR}/src/widgets/calendar/lv_calendar_header_dropdown.c 277 ${LVGL_DIR}/src/widgets/canvas/lv_canvas.c 278 ${LVGL_DIR}/src/widgets/chart/lv_chart.c 279 ${LVGL_DIR}/src/widgets/checkbox/lv_checkbox.c 280 ${LVGL_DIR}/src/widgets/dropdown/lv_dropdown.c 281 ${LVGL_DIR}/src/widgets/imagebutton/lv_imagebutton.c 282 ${LVGL_DIR}/src/widgets/image/lv_image.c 283 ${LVGL_DIR}/src/widgets/keyboard/lv_keyboard.c 284 ${LVGL_DIR}/src/widgets/label/lv_label.c 285 ${LVGL_DIR}/src/widgets/led/lv_led.c 286 ${LVGL_DIR}/src/widgets/line/lv_line.c 287 ${LVGL_DIR}/src/widgets/list/lv_list.c 288 ${LVGL_DIR}/src/widgets/lottie/lv_lottie.c 289 ${LVGL_DIR}/src/widgets/menu/lv_menu.c 290 ${LVGL_DIR}/src/widgets/msgbox/lv_msgbox.c 291 ${LVGL_DIR}/src/widgets/objx_templ/lv_objx_templ.c 292 ${LVGL_DIR}/src/widgets/property/lv_dropdown_properties.c 293 ${LVGL_DIR}/src/widgets/property/lv_image_properties.c 294 ${LVGL_DIR}/src/widgets/property/lv_keyboard_properties.c 295 ${LVGL_DIR}/src/widgets/property/lv_label_properties.c 296 ${LVGL_DIR}/src/widgets/property/lv_obj_properties.c 297 ${LVGL_DIR}/src/widgets/property/lv_roller_properties.c 298 ${LVGL_DIR}/src/widgets/property/lv_style_properties.c 299 ${LVGL_DIR}/src/widgets/property/lv_textarea_properties.c 300 ${LVGL_DIR}/src/widgets/roller/lv_roller.c 301 ${LVGL_DIR}/src/widgets/scale/lv_scale.c 302 ${LVGL_DIR}/src/widgets/slider/lv_slider.c 303 ${LVGL_DIR}/src/widgets/span/lv_span.c 304 ${LVGL_DIR}/src/widgets/spinbox/lv_spinbox.c 305 ${LVGL_DIR}/src/widgets/spinner/lv_spinner.c 306 ${LVGL_DIR}/src/widgets/switch/lv_switch.c 307 ${LVGL_DIR}/src/widgets/table/lv_table.c 308 ${LVGL_DIR}/src/widgets/tabview/lv_tabview.c 309 ${LVGL_DIR}/src/widgets/textarea/lv_textarea.c 310 ${LVGL_DIR}/src/widgets/tileview/lv_tileview.c 311 ${LVGL_DIR}/src/widgets/win/lv_win.c 312 313 lvgl.c 314 lvgl_display.c 315 lvgl_display_mono.c 316 lvgl_display_16bit.c 317 lvgl_display_24bit.c 318 lvgl_display_32bit.c 319 lvgl_display_mono.c 320) 321 322zephyr_library_sources_ifdef(CONFIG_LV_Z_USE_FILESYSTEM lvgl_fs.c) 323zephyr_library_sources_ifdef(CONFIG_LV_Z_MEM_POOL_SYS_HEAP lvgl_mem.c) 324zephyr_library_sources_ifdef(CONFIG_LV_Z_SHELL lvgl_shell.c) 325 326zephyr_library_sources(input/lvgl_common_input.c) 327zephyr_library_sources_ifdef(CONFIG_LV_Z_POINTER_INPUT input/lvgl_pointer_input.c) 328zephyr_library_sources_ifdef(CONFIG_LV_Z_BUTTON_INPUT input/lvgl_button_input.c) 329zephyr_library_sources_ifdef(CONFIG_LV_Z_ENCODER_INPUT input/lvgl_encoder_input.c) 330zephyr_library_sources_ifdef(CONFIG_LV_Z_KEYPAD_INPUT input/lvgl_keypad_input.c) 331 332zephyr_library_sources_ifdef(CONFIG_LV_Z_USE_OSAL lvgl_zephyr_osal.c) 333 334zephyr_library_link_libraries(LVGL) 335target_link_libraries(LVGL INTERFACE zephyr_interface) 336 337endif() 338