feat(examples): add local components via idf_component.yml

Specifying all the dependencies (managed and local) in the manifest
makes it easier for users to see every component the example
depends on.
This commit is contained in:
Ivan Grokhotkov
2023-08-04 15:00:15 +02:00
parent ae80ad7ac7
commit 6d87100a70
199 changed files with 400 additions and 272 deletions
@@ -3,12 +3,7 @@
cmake_minimum_required(VERSION 3.16)
if("${IDF_TARGET}" STREQUAL "linux")
# This example uses an extra component with common functionality for lwip's port on linux target
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_tapif_io)
set(COMPONENTS main esp_netif lwip protocol_examples_tapif_io startup esp_hw_support esp_system nvs_flash)
else()
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection on ESP target
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
endif()
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
@@ -0,0 +1,9 @@
dependencies:
protocol_examples_tapif_io:
path: ${IDF_PATH}/examples/common_components/protocol_examples_tapif_io
rules:
- if: "target in [linux]"
protocol_examples_common:
path: ${IDF_PATH}/examples/common_components/protocol_examples_common
rules:
- if: "target not in [linux]"