8000 Fix binding user module cmake file (#370) · diskman88/lv_binding_micropython@bda80a2 · GitHub
[go: up one dir, main page]

Skip to content

Commit bda80a2

Browse files
authored
Fix binding user module cmake file (lvgl#370)
1 parent c3c7e62 commit bda80a2

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

micropython.cmake

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22
# This file is to be given as "make USER_C_MODULES=..." when building Micropython port
33

44
# 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)
95
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)
146

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 8AC2 _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)
1621

1722
# DEBUG LV_CONF_PATH
1823
message(STATUS "LV_CONF_PATH=${LV_CONF_PATH}")
1924

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-
2525
include(${CMAKE_CURRENT_LIST_DIR}/mkrules_usermod.cmake)
2626

2727
# Add lv_bindings rules

0 commit comments

Comments
 (0)
0