Skip to content

Commit 4aef418

Browse files
committed
Reodered selective process to match CI script
1 parent a90050c commit 4aef418

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

CMakeLists.txt

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -186,27 +186,29 @@ set(ARDUINO_LIBRARY_BLE_SRCS
186186
libraries/BLE/src/GeneralUtils.cpp
187187
)
188188

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)
196192
foreach(libname IN LISTS ARDUINO_ALL_LIBRARIES)
197193
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_${libname})
198194
if(ARDUINO_LIBRARY_${libname}_SRCS)
199-
list(APPEND srcs ${ARDUINO_LIBRARY_${libname}_SRCS})
195+
list(APPEND ARDUINO_LIBRARIES_SRCS ${ARDUINO_LIBRARY_${libname}_SRCS})
200196
endif()
201197
if(ARDUINO_LIBRARY_${libname}_REQUIRES)
202-
list(APPEND priv_requires ${ARDUINO_LIBRARY_${libname}_REQUIRES})
198+
list(APPEND ARDUINO_LIBRARIES_REQUIRES ${ARDUINO_LIBRARY_${libname}_REQUIRES})
203199
endif()
204200
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)
206202
endif()
207203
endif()
208204
endforeach()
209205

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+
210212
idf_component_register(INCLUDE_DIRS ${includedirs} PRIV_INCLUDE_DIRS ${priv_includes} SRCS ${srcs} REQUIRES ${requires} PRIV_REQUIRES ${priv_requires})
211213

212214
if(IDF_TARGET STREQUAL "esp32")

0 commit comments

Comments
 (0)