Update cmakelists.txt (#213)

This commit is contained in:
h2zero 2024-11-02 17:58:51 -06:00 committed by GitHub
parent a7ff1beacd
commit 877a29a8b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,30 +2,28 @@
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
idf_build_get_property(__hack_component_targets __COMPONENT_TARGETS)
if("esp-nimble-component" IN_LIST BUILD_COMPONENTS OR "__esp-nimble-component" IN_LIST __hack_component_targets)
if(__COMPONENT_TARGETS MATCHES "___idf_esp-nimble-component")
list(APPEND ESP_NIMBLE_PRIV_REQUIRES
esp-nimble-component
)
elseif("nimble" IN_LIST BUILD_COMPONENTS OR "__nimble" IN_LIST __hack_component_targets)
elseif(__COMPONENT_TARGETS MATCHES "__idf_nimble")
list(APPEND ESP_NIMBLE_PRIV_REQUIRES
nimble
)
endif()
# Arduino install using IDF component manager
if("espressif__arduino-esp32" IN_LIST BUILD_COMPONENTS OR "___idf_espressif__arduino-esp32" IN_LIST __hack_component_targets)
if(__COMPONENT_TARGETS MATCHES "___idf_espressif__arduino-esp32")
list(APPEND ESP_NIMBLE_PRIV_REQUIRES
arduino-esp32
)
# Manual installation of Arduino framework
elseif("arduino" IN_LIST BUILD_COMPONENTS OR "__idf_arduino" IN_LIST __hack_component_targets)
elseif(__COMPONENT_TARGETS MATCHES "__idf_arduino")
list(APPEND ESP_NIMBLE_PRIV_REQUIRES
arduino
)
# PlatformIO
elseif("framework-arduinoespressif32" IN_LIST BUILD_COMPONENTS OR "___idf_framework-arduinoespressif32" IN_LIST __hack_component_targets)
elseif(__COMPONENT_TARGETS MATCHES "___idf_framework-arduinoespressif32")
list(APPEND ESP_NIMBLE_PRIV_REQUIRES
framework-arduinoespressif32
)