mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
62d21734d9
* Removed LV_CONF_SKIP definition from CMake to avoid redefinition warnings; added more Kconfig options * Bumped up version and removed unnecessary default values * Added user data configuration to KConfig * Moved user data options to "Feature Usage" menu
38 lines
1.2 KiB
CMake
38 lines
1.2 KiB
CMake
if(ESP_PLATFORM)
|
|
|
|
file(GLOB_RECURSE SOURCES src/*.c)
|
|
|
|
idf_component_register(SRCS ${SOURCES}
|
|
INCLUDE_DIRS . src
|
|
REQUIRES main)
|
|
|
|
target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DLV_CONF_INCLUDE_SIMPLE")
|
|
|
|
if (CONFIG_LV_MEM_CUSTOM)
|
|
if (CONFIG_LV_MEM_CUSTOM_ALLOC)
|
|
target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DLV_MEM_CUSTOM_ALLOC=${CONFIG_LV_MEM_CUSTOM_ALLOC}")
|
|
endif()
|
|
|
|
if (CONFIG_LV_MEM_CUSTOM_FREE)
|
|
target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DLV_MEM_CUSTOM_FREE=${CONFIG_LV_MEM_CUSTOM_FREE}")
|
|
endif()
|
|
endif()
|
|
|
|
if (CONFIG_LV_TICK_CUSTOM)
|
|
if (CONFIG_LV_TICK_CUSTOM_SYS_TIME_EXPR)
|
|
target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DLV_TICK_CUSTOM_SYS_TIME_EXPR=${CONFIG_LV_TICK_CUSTOM_SYS_TIME_EXPR}")
|
|
endif()
|
|
endif()
|
|
|
|
if (CONFIG_LV_USER_DATA_FREE)
|
|
target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DLV_USER_DATA_FREE=${CONFIG_LV_USER_DATA_FREE}")
|
|
endif()
|
|
|
|
if (CONFIG_LV_ATTRIBUTE_FAST_MEM_USE_IRAM)
|
|
target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DLV_ATTRIBUTE_FAST_MEM=IRAM_ATTR")
|
|
endif()
|
|
|
|
else()
|
|
message(FATAL_ERROR "Unknown platform.")
|
|
endif()
|