Skip to content

Commit cc2d44d

Browse files
committed
rp2: Fix build scripts
Related: lvgl/lv_micropython#44 (comment)
1 parent af504f4 commit cc2d44d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

bindings.cmake

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@
22

33
include(${CMAKE_CURRENT_LIST_DIR}/mkrules.cmake)
44

5-
# create targets for generated files
6-
all_lv_bindings()
5+
# lvgl bindings depend on lvgl itself, pull it in
6+
include(${LVGL_DIR}/CMakeLists.txt)
77

88
# lvgl bindings target (the mpy module)
99
add_library(usermod_lv_bindings INTERFACE)
1010
target_sources(usermod_lv_bindings INTERFACE ${LV_SRC})
1111
target_include_directories(usermod_lv_bindings INTERFACE ${LV_INCLUDE})
1212

13-
# lvgl bindings depend on lvgl itself, pull it in
14-
include(${LVGL_DIR}/CMakeLists.txt)
1513
target_link_libraries(usermod_lv_bindings INTERFACE lvgl_interface)
1614

1715
# make usermod (target declared by Micropython for all user compiled modules) link to bindings
1816
# this way the bindings (and transitively lvgl_interface) get proper compilation flags
1917
target_link_libraries(usermod INTERFACE usermod_lv_bindings)
18+
19+
# create targets for generated files
20+
all_lv_bindings()

mkrules.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function(lv_bindings)
3838
if(ESP_PLATFORM)
3939
target_compile_options(${COMPONENT_LIB} PRIVATE ${LV_COMPILE_OPTIONS})
4040
else()
41-
target_compile_options(lvgl_interface INTERFACE ${LV_COMPILE_OPTIONS})
41+
target_compile_options(usermod_lv_bindings INTERFACE ${LV_COMPILE_OPTIONS})
4242
endif()
4343

4444
if (DEFINED LV_FILTER)

0 commit comments

Comments
 (0)