I am using SquareLine studio together with an eclipse project with esp-idf, the problem is that every time I export the ui files I have to change the last line of the CMakeLists.txt file to be able to compile the project correctly.
This is the change I make:
Remove: add_library(ui ${SOURCES})
Add: idf_component_register(SRCS "${SOURCES}")
Do you see alternative options and workaround to achieve it?
ESP-IDF (and Espressif-IDE or Eclipse with Espressif plugin) relies on CMake and CMakeLists.txt files. So if for example you have your exported UI sources in the āmain/uiā folder inside the project folder, as is usually with ESP-IDF projects, you can recursively register the UI source files by these lines in a CMakeLists.txt file: file(GLOB_RECURSE_SRC_UI ${CMAKE_SOURCE_DIR} "ui/*.c") idf_component_register( SRCS "main.c" ${LV_UI_SOURCES} INCLUDE_DIRS "." "ui" )
(At least this is the way it is done by Espressif board-templates when you create a new Espressif project. The IDF-specific config is not written into the UI files, keeping the export platform-independent.)
I hope this information is useful for you but I donāt know much about your particular CMake configuration or error message to give more sophisticated tips.
Hi Hermit, thanks . Iām now using the generated file āfilelist.txtā to include all the source files and I dont need to change the CMakeLists.txt manually anymore.