|
| 1 | +# |
| 2 | +# Copyright (c) 2022 Project CHIP Authors |
| 3 | +# All rights reserved. |
| 4 | +# |
| 5 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | +# you may not use this file except in compliance with the License. |
| 7 | +# You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | +# |
| 17 | + |
| 18 | +# (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.) |
| 19 | +idf_component_register(PRIV_INCLUDE_DIRS |
| 20 | + "${CMAKE_CURRENT_LIST_DIR}/include" |
| 21 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" |
| 22 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" |
| 23 | + SRC_DIRS |
| 24 | + "${CMAKE_CURRENT_LIST_DIR}" |
| 25 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" |
| 26 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated" |
| 27 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" |
| 28 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/ota" |
| 29 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" |
| 30 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension" |
| 31 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" |
| 32 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" |
| 33 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" |
| 34 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/icd/server" |
| 35 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/access-control-server" |
| 36 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server" |
| 37 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/basic-information" |
| 38 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/bindings" |
| 39 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/descriptor" |
| 40 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server" |
| 41 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server" |
| 42 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/fixed-label-server" |
| 43 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-commissioning-server" |
| 44 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-diagnostics-server" |
| 45 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/identify-server" |
| 46 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server" |
| 47 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/time-format-localization-server" |
| 48 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning" |
| 49 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/operational-credentials-server" |
| 50 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ota-requestor" |
| 51 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/power-source-configuration-server" |
| 52 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/software-diagnostics-server" |
| 53 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread-network-diagnostics-server" |
| 54 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread-border-router-management-server" |
| 55 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/user-label-server" |
| 56 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/wifi-network-diagnostics-server" |
| 57 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ota-requestor" |
| 58 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/groups-server" |
| 59 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/group-key-mgmt-server" |
| 60 | + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/time-synchronization-server") |
| 61 | + |
| 62 | +get_filename_component(CHIP_ROOT ${CMAKE_SOURCE_DIR}/third_party/connectedhomeip REALPATH) |
| 63 | + |
| 64 | +include("${CHIP_ROOT}/build/chip/esp32/esp32_codegen.cmake") |
| 65 | + |
| 66 | +chip_app_component_codegen("${CHIP_ROOT}/examples/thread-br-app/thread-br-common/thread-br-app.matter") |
| 67 | +chip_app_component_zapgen("${CHIP_ROOT}/examples/thread-br-app/thread-br-common/thread-br-app.zap") |
| 68 | + |
| 69 | +set_property(TARGET ${COMPONENT_LIB} PROPERTY CXX_STANDARD 17) |
| 70 | +target_compile_options(${COMPONENT_LIB} PRIVATE "-DCHIP_HAVE_CONFIG_H") |
| 71 | +target_compile_options(${COMPONENT_LIB} PUBLIC |
| 72 | + "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=<lib/address_resolve/AddressResolve_DefaultImpl.h>" |
| 73 | +) |
0 commit comments