|
2 | 2 | # This file is to be given as "make USER_C_MODULES=..." when building Micropython port |
3 | 3 |
|
4 | 4 | # Include LVGL component, ignore KCONFIG |
5 | | - |
6 | | -idf_build_set_property(LV_MICROPYTHON 1) |
7 | | -idf_build_component(${CMAKE_CURRENT_LIST_DIR}/lvgl) |
8 | | -idf_build_set_property(COMPILE_DEFINITIONS "-DLV_KCONFIG_IGNORE" APPEND) |
9 | 5 | separate_arguments(LV_CFLAGS_ENV UNIX_COMMAND $ENV{LV_CFLAGS}) |
10 | | -idf_build_set_property(COMPILE_DEFINITIONS "${LV_CFLAGS}" APPEND) |
11 | | -idf_build_set_property(COMPILE_OPTIONS "-Wno-unused-function" APPEND) |
12 | | -idf_build_set_property(SRCS "${LV_SRC}" APPEND) |
13 | | -idf_build_set_property(INCLUDE_DIRS "${LV_INCLUDE}" APPEND) |
14 | 6 |
|
15 | | -# idf_build_set_property(INCLUDE_DIRS "${LV_INCLUDE}" APPEND) |
| 7 | +if(ESP_PLATFORM) |
| 8 | + idf_build_set_property(LV_MICROPYTHON 1) |
| 9 | + idf_build_component(${CMAKE_CURRENT_LIST_DIR}/lvgl) |
| 10 | + idf_build_set_property(COMPILE_DEFINITIONS "-DLV_KCONFIG_IGNORE" APPEND) |
| 11 | + idf_build_set_property(COMPILE_DEFINITIONS "${LV_CFLAGS}" APPEND) |
| 12 | + idf_build_set_property(COMPILE_OPTIONS "-Wno-unused-function" APPEND) |
| 13 | + idf_build_set_property(SRCS "${LV_SRC}" APPEND) |
| 14 | + idf_build_set_property(INCLUDE_DIRS "${LV_INCLUDE}" APPEND) |
| 15 | + |
| 16 | + # Fix for idf 5.2.x |
| 17 | + idf_build_get_property(component_targets __COMPONENT_TARGETS) |
| 18 | + string(REPLACE "___idf_lvgl" "" component_targets "${component_targets}") |
| 19 | + idf_build_set_property(__COMPONENT_TARGETS "${component_targets}") |
| 20 | +endif(ESP_PLATFORM) |
16 | 21 |
|
17 | 22 | # DEBUG LV_CONF_PATH |
18 | 23 | message(STATUS "LV_CONF_PATH=${LV_CONF_PATH}") |
19 | 24 |
|
20 | | -# Fix for idf 5.2.x |
21 | | -idf_build_get_property(component_targets __COMPONENT_TARGETS) |
22 | | -string(REPLACE "___idf_lvgl" "" component_targets "${component_targets}") |
23 | | -idf_build_set_property(__COMPONENT_TARGETS "${component_targets}") |
24 | | - |
25 | 25 | include(${CMAKE_CURRENT_LIST_DIR}/mkrules_usermod.cmake) |
26 | 26 |
|
27 | 27 | # Add lv_bindings rules |
|
0 commit comments