summaryrefslogtreecommitdiff
path: root/lib/lvgl/env_support/cmake/esp.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lvgl/env_support/cmake/esp.cmake')
m---------lib/lvgl0
-rw-r--r--lib/lvgl/env_support/cmake/esp.cmake33
2 files changed, 33 insertions, 0 deletions
diff --git a/lib/lvgl b/lib/lvgl
deleted file mode 160000
-Subproject 0732400e7b564dd0e7dc4a924619d8e19c5b23a
diff --git a/lib/lvgl/env_support/cmake/esp.cmake b/lib/lvgl/env_support/cmake/esp.cmake
new file mode 100644
index 00000000..a8671da2
--- /dev/null
+++ b/lib/lvgl/env_support/cmake/esp.cmake
@@ -0,0 +1,33 @@
+file(GLOB_RECURSE SOURCES ${LVGL_ROOT_DIR}/src/*.c)
+
+idf_build_get_property(LV_MICROPYTHON LV_MICROPYTHON)
+
+if(LV_MICROPYTHON)
+ idf_component_register(
+ SRCS
+ ${SOURCES}
+ INCLUDE_DIRS
+ ${LVGL_ROOT_DIR}
+ ${LVGL_ROOT_DIR}/src
+ ${LVGL_ROOT_DIR}/../
+ REQUIRES
+ main)
+
+ target_compile_definitions(${COMPONENT_LIB}
+ INTERFACE "-DLV_CONF_INCLUDE_SIMPLE")
+
+ if(CONFIG_LV_ATTRIBUTE_FAST_MEM_USE_IRAM)
+ target_compile_definitions(${COMPONENT_LIB}
+ INTERFACE "-DLV_ATTRIBUTE_FAST_MEM=IRAM_ATTR")
+ endif()
+else()
+ idf_component_register(SRCS ${SOURCES} INCLUDE_DIRS ${LVGL_ROOT_DIR}
+ ${LVGL_ROOT_DIR}/src ${LVGL_ROOT_DIR}/../)
+
+ target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DLV_CONF_INCLUDE_SIMPLE")
+
+ if(CONFIG_LV_ATTRIBUTE_FAST_MEM_USE_IRAM)
+ target_compile_definitions(${COMPONENT_LIB}
+ PUBLIC "-DLV_ATTRIBUTE_FAST_MEM=IRAM_ATTR")
+ endif()
+endif()