File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55#
66
7+ string (CONFIGURE "${CONFIG_NCS_SAMPLE_MATTER_ZAP_FILE_PATH} " zap_file_path)
8+ cmake_path (GET zap_file_path PARENT_PATH zap_parent_dir )
9+
10+ # If we have a new app zap dir assigned we need to include zap parent dir to app target as well.
11+ if (CONFIG_CHIP_APP_ZAP_DIR)
12+ string (CONFIGURE "${CONFIG_CHIP_APP_ZAP_DIR} " app_zap_dir)
13+
14+ # Override zap-generated directory.
15+ get_filename_component (CHIP_APP_ZAP_DIR ${app_zap_dir} REALPATH CACHE )
16+ else ()
17+ string (CONFIGURE "${zap_parent_dir} /zap-generated" app_zap_dir)
18+ endif ()
19+
720include (${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR} /src/app/chip_data_model.cmake )
821
922function (ncs_configure_data_model )
10- string (CONFIGURE "${CONFIG_NCS_SAMPLE_MATTER_ZAP_FILE_PATH} " zap_file_path)
11- cmake_path (GET zap_file_path PARENT_PATH zap_parent_dir )
12-
1323 cmake_parse_arguments (ARG "" "" "EXTERNAL_CLUSTERS" ${ARGN} )
1424
1525 target_include_directories (matter-data-model
@@ -19,7 +29,7 @@ function(ncs_configure_data_model)
1929
2030 chip_configure_data_model (matter-data-model
2131 BYPASS_IDL
22- GEN_DIR ${zap_parent_dir} /zap-generated
32+ GEN_DIR ${app_zap_dir}
2333 ZAP_FILE ${zap_file_path}
2434 EXTERNAL_CLUSTERS ${ARG_EXTERNAL_CLUSTERS}
2535 )
Original file line number Diff line number Diff line change @@ -13,9 +13,6 @@ project(matter-manufacturer_specific)
1313include (${ZEPHYR_NRF_MODULE_DIR} /samples/matter/common/cmake/zap_helpers.cmake )
1414ncs_get_zap_parent_dir (ZAP_PARENT_DIR )
1515
16- # Override zap-generated directory.
17- get_filename_component (CHIP_APP_ZAP_DIR ${ZAP_PARENT_DIR} /zap-generated REALPATH CACHE )
18-
1916# Enable GNU STD support.
2017include (${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR} /config/nrfconnect/app/enable-gnu-std.cmake )
2118
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ CONFIG_CHIP_DEVICE_PRODUCT_NAME="Matter Manufacturer Specific"
1515
1616# Configure ZAP file name
1717CONFIG_NCS_SAMPLE_MATTER_ZAP_FILE_PATH="${APPLICATION_CONFIG_DIR}/src/default_zap/manufacturer_specific.zap"
18+ CONFIG_CHIP_APP_ZAP_DIR="${APPLICATION_CONFIG_DIR}/src/default_zap/zap-generated"
1819
1920# 32768 == 0x8000 (example Product ID added temporaly,
2021# but it must be changed with proper PID from the list:
You can’t perform that action at this time.
0 commit comments