1file(GLOB_RECURSE SOURCES ${LVGL_ROOT_DIR}/src/*.c) 2 3idf_build_get_property(LV_MICROPYTHON LV_MICROPYTHON) 4 5if(LV_MICROPYTHON) 6 idf_component_register( 7 SRCS 8 ${SOURCES} 9 INCLUDE_DIRS 10 ${LVGL_ROOT_DIR} 11 ${LVGL_ROOT_DIR}/src 12 ${LVGL_ROOT_DIR}/../ 13 REQUIRES 14 main) 15 16 target_compile_definitions(${COMPONENT_LIB} 17 INTERFACE "-DLV_CONF_INCLUDE_SIMPLE") 18 19 if(CONFIG_LV_ATTRIBUTE_FAST_MEM_USE_IRAM) 20 target_compile_definitions(${COMPONENT_LIB} 21 INTERFACE "-DLV_ATTRIBUTE_FAST_MEM=IRAM_ATTR") 22 endif() 23else() 24 idf_component_register(SRCS ${SOURCES} INCLUDE_DIRS ${LVGL_ROOT_DIR} 25 ${LVGL_ROOT_DIR}/src ${LVGL_ROOT_DIR}/../) 26 27 target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DLV_CONF_INCLUDE_SIMPLE") 28 29 if(CONFIG_LV_ATTRIBUTE_FAST_MEM_USE_IRAM) 30 target_compile_definitions(${COMPONENT_LIB} 31 PUBLIC "-DLV_ATTRIBUTE_FAST_MEM=IRAM_ATTR") 32 endif() 33endif() 34