@@ -9,15 +9,17 @@ cmake_minimum_required(VERSION 3.20.0)
99find_package (Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE} )
1010project (matter-lock)
1111
12- # Enable GNU STD support and initialize the Matter Data Model .
12+ # Enable GNU STD support.
1313include (${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR} /config/nrfconnect/app/enable-gnu-std.cmake)
14- include (${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR} /src/app/chip_data_model.cmake)
1514
1615# NORDIC SDK APP START
1716
1817# Include all source files that are located in the Matter common directory.
1918include (${ZEPHYR_NRF_MODULE_DIR} /samples/matter/common/cmake/source_common.cmake)
2019
20+ # Include Data Model utils
21+ include (${ZEPHYR_NRF_MODULE_DIR} /samples/matter/common/cmake/data_model.cmake)
22+
2123target_include_directories (app PRIVATE
2224 src
2325 ${CONFIG_NCS_SAMPLE_MATTER_ZAP_FILES_PATH}
@@ -48,15 +50,13 @@ if(CONFIG_THREAD_WIFI_SWITCHING)
4850 )
4951endif ()
5052
51- # Do not treat warnings as errors while the variable may be uninitialized for this sample.
53+ # Do not treat warnings as errors while the variable may be uninitialized for this sample data model .
5254# In the door-lock-server implementation, there is a warning that the C++ "optional"
5355# variable may be uninitialized, but actually, it is wrongly interpreted by the Zephyr toolchain.
54- target_compile_options (app PRIVATE -Wno-error=maybe-uninitialized)
56+ target_compile_options (matter-data-model PRIVATE -Wno-error=maybe-uninitialized)
5557
56- chip_configure_data_model(app
57- INCLUDE_SERVER
58- BYPASS_IDL
59- GEN_DIR ${CONFIG_NCS_SAMPLE_MATTER_ZAP_FILES_PATH} /zap-generated
58+ ncs_configure_data_model(
6059 ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR} /${CONFIG_NCS_SAMPLE_MATTER_ZAP_FILES_PATH} /lock.zap
6160)
61+
6262# NORDIC SDK APP END
0 commit comments