Skip to content

Commit

Permalink
build: refine the cmake and idf_component files
Browse files Browse the repository at this point in the history
  • Loading branch information
chshu committed Sep 19, 2024
1 parent 2fe4e26 commit 1318595
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 19 deletions.
10 changes: 4 additions & 6 deletions components/esp_ot_cli_extension/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,16 @@ if(CONFIG_OPENTHREAD_RCP_COMMAND)
endif()

set(include "include")
if(CONFIG_OPENTHREAD_CLI_WIFI)
list(APPEND include $ENV{IDF_PATH}/examples/common_components/protocol_examples_common/include)
endif()

idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "${include}"
PRIV_REQUIRES lwip openthread iperf esp_netif esp_wifi http_parser esp_http_client esp_coex heap mbedtls nvs_flash esp_eth)

if (CONFIG_OPENTHREAD_CLI_OTA)
idf_component_optional_requires(PUBLIC esp_br_http_ota)
if(CONFIG_OPENTHREAD_CLI_OTA)
idf_component_optional_requires(PRIVATE esp_br_http_ota)
endif()

if (CONFIG_OPENTHREAD_RCP_COMMAND)
if(CONFIG_OPENTHREAD_RCP_COMMAND)
idf_component_optional_requires(PRIVATE esp_rcp_update)
endif()

Expand Down
2 changes: 1 addition & 1 deletion components/esp_ot_cli_extension/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "1.2.4"
version: "1.2.5"
description: Espressif OpenThread CLI Extension
url: https://github.com/espressif/esp-thread-br/tree/main/components/esp_ot_cli_extension
dependencies:
Expand Down
8 changes: 0 additions & 8 deletions examples/basic_thread_border_router/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,5 @@
# in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)

# (Not part of the boilerplate)
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
set(EXTRA_COMPONENT_DIRS
${CMAKE_CURRENT_SOURCE_DIR}/../common
${CMAKE_CURRENT_SOURCE_DIR}/../../components/esp_br_http_ota
${CMAKE_CURRENT_SOURCE_DIR}/../../components/esp_ot_br_server
)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(esp_ot_br)
15 changes: 11 additions & 4 deletions examples/basic_thread_border_router/main/idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@ dependencies:
espressif/esp_rcp_update:
version: "~1.3.0"
override_path: '../../../components/esp_rcp_update'

esp_br_http_ota:
path: ../../../components/esp_br_http_ota
esp_ot_br_server:
path: ../../../components/esp_ot_br_server
thread_border_router:
path: ../../common/thread_border_router
protocol_examples_common:
path: ${IDF_PATH}/examples/common_components/protocol_examples_common

## Required IDF version
idf:
version: ">=4.1.0"
# # Put list of dependencies here
protocol_examples_common:
path: ${IDF_PATH}/examples/common_components/protocol_examples_common
version: ">=5.1.0"

0 comments on commit 1318595

Please sign in to comment.