Skip to content

Commit 1276d0c

Browse files
committed
trying something
1 parent 427377f commit 1276d0c

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

micropython.cmake

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,30 @@ list(APPEND SOURCES ${LVGL_ADDONS_SRC})
4747

4848
add_library(lvgl_interface INTERFACE)
4949

50-
target_sources(lvgl_interface INTERFACE ${SOURCES})
51-
target_compile_options(lvgl_interface INTERFACE ${LV_CFLAGS})
52-
5350
set(LVGL_MPY_INCLUDES
5451
${CMAKE_CURRENT_LIST_DIR}/lib/micropython
5552
${CMAKE_CURRENT_LIST_DIR}
5653
${CMAKE_CURRENT_LIST_DIR}/include
5754
)
5855

56+
if(ESP_PLATFORM)
57+
# gets esp_lcd include paths
58+
idf_component_get_property(freertos_includes freertos INCLUDE_DIRS)
59+
idf_component_get_property(freertos_dir freertos COMPONENT_DIR)
60+
61+
# sets the include paths into INCLUDES variable
62+
if(freertos_includes)
63+
list(TRANSFORM freertos_includes PREPEND ${freertos_dir}/)
64+
list(APPEND LVGL_MPY_INCLUDES ${esp_lcd_includes})
65+
endif()
66+
67+
endif(ESP_PLATFORM)
68+
69+
70+
target_sources(lvgl_interface INTERFACE ${SOURCES})
71+
target_compile_options(lvgl_interface INTERFACE ${LV_CFLAGS})
72+
target_include_directories(lvgl_interface INTERFACE ${LVGL_MPY_INCLUDES})
73+
5974
add_library(usermod_lvgl INTERFACE)
6075
target_sources(usermod_lvgl INTERFACE ${CMAKE_BINARY_DIR}/lv_mp.c)
6176
target_include_directories(usermod_lvgl INTERFACE ${LVGL_MPY_INCLUDES})

0 commit comments

Comments
 (0)