diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index 4cdbac8c7850f8..ff42f7c1b195ee 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -134,6 +134,7 @@ template("chip_data_model") { "*", [ "zap_pregenerated_dir", + "zap_clusters_with_custom_implementation", "zap_file", "is_server", ]) @@ -188,8 +189,22 @@ template("chip_data_model") { [ invoker.zap_file ]) } + _custom_impl_clusters = [] + if (defined(invoker.zap_clusters_with_custom_implementation)) { + _custom_impl_clusters = invoker.zap_clusters_with_custom_implementation + } + foreach(cluster, _cluster_sources) { - if (cluster == "door-lock-server") { + _custom_impl = false + foreach(ci, _custom_impl_clusters) { + if (cluster == ci) { + _custom_impl = true + } + } + + if (_custom_impl) { + # do not include any sources, we have a custom implementation for this cluster + } else if (cluster == "door-lock-server") { sources += [ "${_app_root}/clusters/${cluster}/door-lock-server-callback.cpp", "${_app_root}/clusters/${cluster}/door-lock-server.cpp",