You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/05/07 06:53:32 UTC
(nuttx-apps) branch master updated: connectedhomeip: supports specifying CHIP_ROOT from the cmake parameter.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new c6051e4c4 connectedhomeip: supports specifying CHIP_ROOT from the cmake parameter.
c6051e4c4 is described below
commit c6051e4c410f79b4cecc8a307430f7cdd0ba227d
Author: zhanghongyu <zh...@xiaomi.com>
AuthorDate: Mon May 6 12:58:25 2024 +0800
connectedhomeip: supports specifying CHIP_ROOT from the cmake parameter.
support CI compilation for the matter community
https://github.com/project-chip/connectedhomeip/pull/31236
Signed-off-by: zhanghongyu <zh...@xiaomi.com>
---
netutils/connectedhomeip/CMakeLists.txt | 146 +++++++++++++++++---------------
1 file changed, 76 insertions(+), 70 deletions(-)
diff --git a/netutils/connectedhomeip/CMakeLists.txt b/netutils/connectedhomeip/CMakeLists.txt
index aea6c64c2..3db205e46 100644
--- a/netutils/connectedhomeip/CMakeLists.txt
+++ b/netutils/connectedhomeip/CMakeLists.txt
@@ -65,8 +65,11 @@ if(CONFIG_MATTER)
endfunction()
get_filename_component(
- CHIP_ROOT ${NUTTX_APPS_DIR}/netutils/connectedhomeip/connectedhomeip
+ LOCAL_CHIP_ROOT ${NUTTX_APPS_DIR}/netutils/connectedhomeip/connectedhomeip
REALPATH)
+ if(NOT CHIP_ROOT)
+ set(CHIP_ROOT ${LOCAL_CHIP_ROOT})
+ endif()
chip_download_and_patch(
NAME
@@ -74,7 +77,7 @@ if(CONFIG_MATTER)
URL
https://github.com/project-chip/connectedhomeip/archive/refs/tags/v1.2.0.1.zip
SOURCE_DIR
- ${CMAKE_CURRENT_LIST_DIR}/connectedhomeip
+ ${CHIP_ROOT}
BINARY_DIR
${CMAKE_BINARY_DIR}/apps/netutils/connectedhomeip
TIMEOUT
@@ -166,16 +169,16 @@ if(CONFIG_MATTER)
inipp
nlio/include
nlassert/include
- connectedhomeip/src
- connectedhomeip/src/include
- connectedhomeip/src/lib/dnssd
- connectedhomeip/src/app/util/mock/include
- connectedhomeip/zzz_generated
- connectedhomeip/zzz_generated/lighting-app
- connectedhomeip/zzz_generated/app-common
- connectedhomeip/src/platform/Linux
- connectedhomeip/examples/platform/linux
- connectedhomeip/examples/lighting-app/lighting-common/include)
+ ${CHIP_ROOT}/src
+ ${CHIP_ROOT}/src/include
+ ${CHIP_ROOT}/src/lib/dnssd
+ ${CHIP_ROOT}/src/app/util/mock/include
+ ${CHIP_ROOT}/zzz_generated
+ ${CHIP_ROOT}/zzz_generated/lighting-app
+ ${CHIP_ROOT}/zzz_generated/app-common
+ ${CHIP_ROOT}/src/platform/Linux
+ ${CHIP_ROOT}/examples/platform/linux
+ ${CHIP_ROOT}/examples/lighting-app/lighting-common/include)
set(MATTER_FLAGS
-DCHIP_HAVE_CONFIG_H
@@ -259,64 +262,67 @@ if(CONFIG_MATTER)
GN_DEPENDENCIES
mbedtls)
- add_custom_command(
- OUTPUT connectedhomeip/third_party/pigweed/repo
- COMMAND rm ${CHIP_ROOT}/third_party/pigweed/repo -rf
- COMMAND ln -s ${NUTTX_APPS_DIR}/netutils/connectedhomeip/pigweed
- ${CHIP_ROOT}/third_party/pigweed/repo)
-
- add_custom_target(chippigweed ALL
- DEPENDS connectedhomeip/third_party/pigweed/repo)
- ExternalProject_Add_StepDependencies(chip-gn configure chippigweed)
-
- add_custom_command(
- OUTPUT ${CHIP_ROOT}/build_overrides/pigweed_environment.gni
- COMMAND touch ${CHIP_ROOT}/build_overrides/pigweed_environment.gni)
-
- add_custom_target(
- chipnpigweedenv ALL
- DEPENDS ${CHIP_ROOT}/build_overrides/pigweed_environment.gni)
- ExternalProject_Add_StepDependencies(chip-gn configure chipnpigweedenv)
- add_dependencies(chippigweed chipnpigweedenv)
-
- add_custom_command(
- OUTPUT connectedhomeip/third_party/nlassert/repo
- COMMAND rm ${CHIP_ROOT}/third_party/nlassert/repo -rf
- COMMAND ln -s ${NUTTX_APPS_DIR}/netutils/connectedhomeip/nlassert
- ${CHIP_ROOT}/third_party/nlassert/repo)
-
- add_custom_target(chipnlassert ALL
- DEPENDS connectedhomeip/third_party/nlassert/repo)
- ExternalProject_Add_StepDependencies(chip-gn configure chipnlassert)
-
- add_custom_command(
- OUTPUT connectedhomeip/third_party/nlio/repo
- COMMAND rm ${CHIP_ROOT}/third_party/nlio/repo -rf
- COMMAND ln -s ${NUTTX_APPS_DIR}/netutils/connectedhomeip/nlio
- ${CHIP_ROOT}/third_party/nlio/repo)
-
- add_custom_target(chipnlio ALL DEPENDS connectedhomeip/third_party/nlio/repo)
- ExternalProject_Add_StepDependencies(chip-gn configure chipnlio)
-
- add_custom_command(
- OUTPUT connectedhomeip/third_party/nlunit-test/repo
- COMMAND rm ${CHIP_ROOT}/third_party/nlunit-test/repo -rf
- COMMAND ln -s ${NUTTX_APPS_DIR}/netutils/connectedhomeip/nlunit-test
- ${CHIP_ROOT}/third_party/nlunit-test/repo)
-
- add_custom_target(chipnlunit-test ALL
- DEPENDS connectedhomeip/third_party/nlunit-test/repo)
- ExternalProject_Add_StepDependencies(chip-gn configure chipnlunit-test)
-
- add_custom_command(
- OUTPUT connectedhomeip/third_party/jsoncpp/repo
- COMMAND rm -rf ${CHIP_ROOT}/third_party/jsoncpp/repo
- COMMAND ln -s ${NUTTX_APPS_DIR}/netutils/jsoncpp/jsoncpp
- ${CHIP_ROOT}/third_party/jsoncpp/repo)
-
- add_custom_target(chipjsoncpp ALL
- DEPENDS connectedhomeip/third_party/jsoncpp/repo)
- ExternalProject_Add_StepDependencies(chip-gn configure chipjsoncpp)
+ if(${CHIP_ROOT} STREQUAL ${LOCAL_CHIP_ROOT})
+ add_custom_command(
+ OUTPUT connectedhomeip/third_party/pigweed/repo
+ COMMAND rm ${CHIP_ROOT}/third_party/pigweed/repo -rf
+ COMMAND ln -s ${NUTTX_APPS_DIR}/netutils/connectedhomeip/pigweed
+ ${CHIP_ROOT}/third_party/pigweed/repo)
+
+ add_custom_target(chippigweed ALL
+ DEPENDS connectedhomeip/third_party/pigweed/repo)
+ ExternalProject_Add_StepDependencies(chip-gn configure chippigweed)
+
+ add_custom_command(
+ OUTPUT ${CHIP_ROOT}/build_overrides/pigweed_environment.gni
+ COMMAND touch ${CHIP_ROOT}/build_overrides/pigweed_environment.gni)
+
+ add_custom_target(
+ chipnpigweedenv ALL
+ DEPENDS ${CHIP_ROOT}/build_overrides/pigweed_environment.gni)
+ ExternalProject_Add_StepDependencies(chip-gn configure chipnpigweedenv)
+ add_dependencies(chippigweed chipnpigweedenv)
+
+ add_custom_command(
+ OUTPUT connectedhomeip/third_party/nlassert/repo
+ COMMAND rm ${CHIP_ROOT}/third_party/nlassert/repo -rf
+ COMMAND ln -s ${NUTTX_APPS_DIR}/netutils/connectedhomeip/nlassert
+ ${CHIP_ROOT}/third_party/nlassert/repo)
+
+ add_custom_target(chipnlassert ALL
+ DEPENDS connectedhomeip/third_party/nlassert/repo)
+ ExternalProject_Add_StepDependencies(chip-gn configure chipnlassert)
+
+ add_custom_command(
+ OUTPUT connectedhomeip/third_party/nlio/repo
+ COMMAND rm ${CHIP_ROOT}/third_party/nlio/repo -rf
+ COMMAND ln -s ${NUTTX_APPS_DIR}/netutils/connectedhomeip/nlio
+ ${CHIP_ROOT}/third_party/nlio/repo)
+
+ add_custom_target(chipnlio ALL
+ DEPENDS connectedhomeip/third_party/nlio/repo)
+ ExternalProject_Add_StepDependencies(chip-gn configure chipnlio)
+
+ add_custom_command(
+ OUTPUT connectedhomeip/third_party/nlunit-test/repo
+ COMMAND rm ${CHIP_ROOT}/third_party/nlunit-test/repo -rf
+ COMMAND ln -s ${NUTTX_APPS_DIR}/netutils/connectedhomeip/nlunit-test
+ ${CHIP_ROOT}/third_party/nlunit-test/repo)
+
+ add_custom_target(chipnlunit-test ALL
+ DEPENDS connectedhomeip/third_party/nlunit-test/repo)
+ ExternalProject_Add_StepDependencies(chip-gn configure chipnlunit-test)
+
+ add_custom_command(
+ OUTPUT connectedhomeip/third_party/jsoncpp/repo
+ COMMAND rm -rf ${CHIP_ROOT}/third_party/jsoncpp/repo
+ COMMAND ln -s ${NUTTX_APPS_DIR}/netutils/jsoncpp/jsoncpp
+ ${CHIP_ROOT}/third_party/jsoncpp/repo)
+
+ add_custom_target(chipjsoncpp ALL
+ DEPENDS connectedhomeip/third_party/jsoncpp/repo)
+ ExternalProject_Add_StepDependencies(chip-gn configure chipjsoncpp)
+ endif()
set(DEMOSRC
${CHIP_ROOT}/examples/lighting-app/linux/main.cpp