@@ -186,27 +186,29 @@ set(ARDUINO_LIBRARY_BLE_SRCS
186
186
libraries/BLE/src/GeneralUtils.cpp
187
187
)
188
188
189
-
190
- set (includedirs variants/${IDF_TARGET} / cores/esp32/)
191
- set (srcs ${CORE_SRCS} )
192
- set (priv_includes cores/esp32/libb64)
193
- set (requires spi_flash mbedtls mdns esp_adc_cal)
194
- set (priv_requires fatfs nvs_flash app_update spiffs bootloader_support openssl bt main)
195
-
189
+ set (ARDUINO_LIBRARIES_SRCS)
190
+ set (ARDUINO_LIBRARIES_REQUIRES)
191
+ set (ARDUINO_LIBRARIES_INCLUDEDIRS)
196
192
foreach (libname IN LISTS ARDUINO_ALL_LIBRARIES)
197
193
if (NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_${libname} )
198
194
if (ARDUINO_LIBRARY_${libname} _SRCS)
199
- list (APPEND srcs ${ARDUINO_LIBRARY_${libname} _SRCS})
195
+ list (APPEND ARDUINO_LIBRARIES_SRCS ${ARDUINO_LIBRARY_${libname} _SRCS})
200
196
endif ()
201
197
if (ARDUINO_LIBRARY_${libname} _REQUIRES)
202
- list (APPEND priv_requires ${ARDUINO_LIBRARY_${libname} _REQUIRES})
198
+ list (APPEND ARDUINO_LIBRARIES_REQUIRES ${ARDUINO_LIBRARY_${libname} _REQUIRES})
203
199
endif ()
204
200
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR} /libraries/${libname} /src)
205
- list (APPEND includedirs libraries/${libname} /src)
201
+ list (APPEND ARDUINO_LIBRARIES_INCLUDEDIRS libraries/${libname} /src)
206
202
endif ()
207
203
endif ()
208
204
endforeach ()
209
205
206
+ set (includedirs variants/${IDF_TARGET} / cores/esp32/ ${ARDUINO_LIBRARIES_INCLUDEDIRS} )
207
+ set (srcs ${CORE_SRCS} ${ARDUINO_LIBRARIES_SRCS} )
208
+ set (priv_includes cores/esp32/libb64)
209
+ set (requires spi_flash mbedtls mdns esp_adc_cal)
210
+ set (priv_requires fatfs nvs_flash app_update spiffs bootloader_support openssl bt main ${ARDUINO_LIBRARIES_REQUIRES} )
211
+
210
212
idf_component_register(INCLUDE_DIRS ${includedirs} PRIV_INCLUDE_DIRS ${priv_includes} SRCS ${srcs} REQUIRES ${requires} PRIV_REQUIRES ${priv_requires} )
211
213
212
214
if (IDF_TARGET STREQUAL "esp32" )
0 commit comments