From 877a29a8b1d0022c5e8f67ba8b879316e67b6c3d Mon Sep 17 00:00:00 2001 From: h2zero <32826625+h2zero@users.noreply.github.com> Date: Sat, 2 Nov 2024 17:58:51 -0600 Subject: [PATCH] Update cmakelists.txt (#213) --- CMakeLists.txt | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a537e2c..23c2ff7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 )