Skip to content

Commit

Permalink
[esp32] add configurable external platform include directory (#18203)
Browse files Browse the repository at this point in the history
This allow the external platform to be included in other components
without modifying the include directories.
  • Loading branch information
gjc13 authored and pull[bot] committed Jul 14, 2023
1 parent 024aa42 commit 2617689
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ endif()

if (CONFIG_CHIP_ENABLE_EXTERNAL_PLATFORM)
chip_gn_arg_append("chip_device_platform" "\"external\"")
chip_gn_arg_append("chip_platform_target" "\"${CONFIG_CHIP_EXTERNAL_PLATFORM_TARGET}\"")
chip_gn_arg_append("chip_platform_target" "\"//${CONFIG_CHIP_EXTERNAL_PLATFORM_DIR}\"")
endif()

if (CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER)
Expand Down Expand Up @@ -226,6 +226,8 @@ target_include_directories(${COMPONENT_LIB} INTERFACE
"${CMAKE_CURRENT_BINARY_DIR}/src/include"
"${CMAKE_CURRENT_BINARY_DIR}/include"
"${CMAKE_CURRENT_BINARY_DIR}/gen/include"
"${CHIP_ROOT}/config/esp32/${CONFIG_CHIP_EXTERNAL_PLATFORM_DIR}"
"${CHIP_ROOT}/config/esp32/${CONFIG_CHIP_EXTERNAL_PLATFORM_DIR}/../../"
)

idf_component_get_property(esp32_mbedtls_lib esp32_mbedtls COMPONENT_LIB)
Expand Down
7 changes: 4 additions & 3 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -793,11 +793,12 @@ menu "CHIP Device Layer"
help
Use external platform layer to override the default ESP32 platform in Matter SDK.

config CHIP_EXTERNAL_PLATFORM_TARGET
string "The external platform target"
config CHIP_EXTERNAL_PLATFORM_DIR
string "The external platform directory"
depends on CHIP_ENABLE_EXTERNAL_PLATFORM
help
The gn target of the external platform.
The directory of the external platform.

endmenu

menu "Matter Manufacturing Options"
Expand Down

0 comments on commit 2617689

Please sign in to comment.