From 861517ecb09ba53be1fe8cb892a846264c52fc05 Mon Sep 17 00:00:00 2001 From: Leonardo Bispo <34199302+ldab@users.noreply.github.com> Date: Sun, 19 Feb 2023 13:16:15 +0100 Subject: [PATCH 1/2] component path relative to IDF Change the component path to relative to the IDF as the build will fail if the example is moved from its folder. (cherry picked from commit 4011f5ce595d114c69c46298088440a230eed937) Signed-off-by: Rahul Tank --- examples/bluetooth/nimble/ble_periodic_adv/CMakeLists.txt | 2 +- examples/bluetooth/nimble/ble_periodic_sync/CMakeLists.txt | 2 +- examples/bluetooth/nimble/blecent/CMakeLists.txt | 2 +- examples/bluetooth/nimble/bleprph/CMakeLists.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/bluetooth/nimble/ble_periodic_adv/CMakeLists.txt b/examples/bluetooth/nimble/ble_periodic_adv/CMakeLists.txt index a143c9dd24..a11db0a8cb 100644 --- a/examples/bluetooth/nimble/ble_periodic_adv/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_periodic_adv/CMakeLists.txt @@ -1,7 +1,7 @@ # The following lines of boilerplate have to be in your project's # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -set(EXTRA_COMPONENT_DIRS ${CMAKE_CURRENT_LIST_DIR}/../common/nimble_peripheral_utils) +set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/bluetooth/nimble/common/nimble_peripheral_utils) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(ble_periodic_adv) diff --git a/examples/bluetooth/nimble/ble_periodic_sync/CMakeLists.txt b/examples/bluetooth/nimble/ble_periodic_sync/CMakeLists.txt index 12971ca736..0cfa53d6f5 100644 --- a/examples/bluetooth/nimble/ble_periodic_sync/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_periodic_sync/CMakeLists.txt @@ -1,6 +1,6 @@ # The following lines of boilerplate have to be in your project's # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -set(EXTRA_COMPONENT_DIRS ${CMAKE_CURRENT_LIST_DIR}/../common/nimble_central_utils) +set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/bluetooth/nimble/common/nimble_central_utils) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(ble_periodic_sync) diff --git a/examples/bluetooth/nimble/blecent/CMakeLists.txt b/examples/bluetooth/nimble/blecent/CMakeLists.txt index 6b337e7c82..06382888f1 100644 --- a/examples/bluetooth/nimble/blecent/CMakeLists.txt +++ b/examples/bluetooth/nimble/blecent/CMakeLists.txt @@ -2,7 +2,7 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -set(EXTRA_COMPONENT_DIRS ${CMAKE_CURRENT_LIST_DIR}/../common/nimble_central_utils) +set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/bluetooth/nimble/common/nimble_central_utils) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(blecent) diff --git a/examples/bluetooth/nimble/bleprph/CMakeLists.txt b/examples/bluetooth/nimble/bleprph/CMakeLists.txt index 1156a75370..59f9534623 100644 --- a/examples/bluetooth/nimble/bleprph/CMakeLists.txt +++ b/examples/bluetooth/nimble/bleprph/CMakeLists.txt @@ -2,7 +2,7 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -set(EXTRA_COMPONENT_DIRS ${CMAKE_CURRENT_LIST_DIR}/../common/nimble_peripheral_utils) +set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/bluetooth/nimble/common/nimble_peripheral_utils) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(bleprph) From 28aa12ed01ed41f117623e9cb5518d0934566333 Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Mon, 20 Feb 2023 10:15:50 +0530 Subject: [PATCH 2/2] Nimble:Change component path to relative path for remaining examples --- .../bluetooth/nimble/ble_l2cap_coc/coc_blecent/CMakeLists.txt | 2 +- .../bluetooth/nimble/ble_l2cap_coc/coc_bleprph/CMakeLists.txt | 2 +- examples/bluetooth/nimble/ble_phy/phy_cent/CMakeLists.txt | 2 +- examples/bluetooth/nimble/ble_phy/phy_prph/CMakeLists.txt | 2 +- examples/bluetooth/nimble/ble_spp/spp_client/CMakeLists.txt | 2 +- examples/bluetooth/nimble/ble_spp/spp_server/CMakeLists.txt | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/bluetooth/nimble/ble_l2cap_coc/coc_blecent/CMakeLists.txt b/examples/bluetooth/nimble/ble_l2cap_coc/coc_blecent/CMakeLists.txt index 905d2f8b8d..2bd3526463 100644 --- a/examples/bluetooth/nimble/ble_l2cap_coc/coc_blecent/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_l2cap_coc/coc_blecent/CMakeLists.txt @@ -2,7 +2,7 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.5) -set(EXTRA_COMPONENT_DIRS ${CMAKE_CURRENT_LIST_DIR}/../../common/nimble_central_utils) +set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/bluetooth/nimble/common/nimble_central_utils) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(coc_blecent) diff --git a/examples/bluetooth/nimble/ble_l2cap_coc/coc_bleprph/CMakeLists.txt b/examples/bluetooth/nimble/ble_l2cap_coc/coc_bleprph/CMakeLists.txt index 1979f5db49..54e3754054 100644 --- a/examples/bluetooth/nimble/ble_l2cap_coc/coc_bleprph/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_l2cap_coc/coc_bleprph/CMakeLists.txt @@ -2,7 +2,7 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.5) -set(EXTRA_COMPONENT_DIRS ${CMAKE_CURRENT_LIST_DIR}/../../common/nimble_peripheral_utils) +set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/bluetooth/nimble/common/nimble_peripheral_utils) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(coc_bleprph) diff --git a/examples/bluetooth/nimble/ble_phy/phy_cent/CMakeLists.txt b/examples/bluetooth/nimble/ble_phy/phy_cent/CMakeLists.txt index 06b2dba673..a880cbac4f 100644 --- a/examples/bluetooth/nimble/ble_phy/phy_cent/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_phy/phy_cent/CMakeLists.txt @@ -2,7 +2,7 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -set(EXTRA_COMPONENT_DIRS $ {CMAKE_CURRENT_LIST_DIR} / .. / .. / common / nimble_central_utils) +set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/bluetooth/nimble/common/nimble_central_utils) include($ENV{IDF_PATH} / tools / cmake / project.cmake) project(phy_cent) diff --git a/examples/bluetooth/nimble/ble_phy/phy_prph/CMakeLists.txt b/examples/bluetooth/nimble/ble_phy/phy_prph/CMakeLists.txt index 550d0a0827..a1cd792ea6 100644 --- a/examples/bluetooth/nimble/ble_phy/phy_prph/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_phy/phy_prph/CMakeLists.txt @@ -2,7 +2,7 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -set(EXTRA_COMPONENT_DIRS $ {CMAKE_CURRENT_LIST_DIR} / .. / .. / common / nimble_peripheral_utils) +set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/bluetooth/nimble/common/nimble_peripheral_utils) include($ENV{IDF_PATH} / tools / cmake / project.cmake) project(phy_prph) diff --git a/examples/bluetooth/nimble/ble_spp/spp_client/CMakeLists.txt b/examples/bluetooth/nimble/ble_spp/spp_client/CMakeLists.txt index b0bdddddf7..487f50656f 100644 --- a/examples/bluetooth/nimble/ble_spp/spp_client/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_spp/spp_client/CMakeLists.txt @@ -2,7 +2,7 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -set(EXTRA_COMPONENT_DIRS ${CMAKE_CURRENT_LIST_DIR}/../../common/nimble_central_utils) +set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/bluetooth/nimble/common/nimble_central_utils) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(spp_client) diff --git a/examples/bluetooth/nimble/ble_spp/spp_server/CMakeLists.txt b/examples/bluetooth/nimble/ble_spp/spp_server/CMakeLists.txt index 87c71ac07d..32da2da9a7 100644 --- a/examples/bluetooth/nimble/ble_spp/spp_server/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_spp/spp_server/CMakeLists.txt @@ -2,7 +2,7 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -set(EXTRA_COMPONENT_DIRS ${CMAKE_CURRENT_LIST_DIR}/../../common/nimble_peripheral_utils) +set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/bluetooth/nimble/common/nimble_peripheral_utils) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(spp_server)