adding lib to component trouble
Posted: Wed Jul 09, 2025 3:35 am
Hi! I have component folder in my project It contains espressif__libpng, joltwallet__littlefs, lvgl__lvgl folders. I need to make libpng and littlefs to be visible for lvgl because cmake error: to cmakelists.txt of lvgl folder I receive the next error:
When I addCompilation failed because lv_libpng.c (in "lvgl__lvgl" component) includes png.h, provided by espressif__libpng component(s).
However, espressif__libpng component(s) is not in the requirements list of "lvgl__lvgl".
To fix this, add espressif__libpng to PRIV_REQUIRES list of idf_component_register call in D:\project\ESP32S3\MFM_01\components\lvgl__lvgl\CMakeLists.txt.
Code: Select all
idf_component_register(
PRIV_REQUIRES
libpng )please help me how to fix this?CMake Error at C:/Users/malkov/esp/v5.3.1/esp-idf/tools/cmake/component.cmake:488 (add_library):
add_library cannot create target "__idf_lvgl__lvgl" because another target
with the same name already exists. The existing target is a static library
created in source directory
"D:/project/ESP32S3/MFM_01/components/lvgl__lvgl". See documentation for
policy CMP0002 for more details.
Call Stack (most recent call first):
components/lvgl__lvgl/CMakeLists.txt:42 (idf_component_register)