| # Copyright (c) 2020 Project CHIP Authors |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| import("//build_overrides/chip.gni") |
| import("//build_overrides/nlio.gni") |
| import("common_flags.gni") |
| |
| declare_args() { |
| # Enable strict schema checks. |
| chip_enable_schema_check = |
| is_debug && (current_os == "linux" || current_os == "mac") |
| } |
| |
| config("app_config") { |
| include_dirs = [ |
| "util", |
| ".", |
| "${target_gen_dir}/include", |
| ] |
| if (chip_enable_schema_check) { |
| defines = [ "CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK=1" ] |
| } else { |
| defines = [ "CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK=0" ] |
| } |
| } |
| |
| static_library("app") { |
| output_name = "libCHIPDataModel" |
| |
| sources = [ |
| "Command.cpp", |
| "Command.h", |
| "CommandHandler.cpp", |
| "CommandSender.cpp", |
| "InteractionModelEngine.cpp", |
| "MessageDef/AttributeDataElement.cpp", |
| "MessageDef/AttributeDataElement.h", |
| "MessageDef/AttributeDataList.cpp", |
| "MessageDef/AttributeDataList.h", |
| "MessageDef/AttributeDataVersionList.cpp", |
| "MessageDef/AttributeDataVersionList.h", |
| "MessageDef/AttributePath.cpp", |
| "MessageDef/AttributePath.h", |
| "MessageDef/AttributePathList.cpp", |
| "MessageDef/AttributePathList.h", |
| "MessageDef/AttributeStatusElement.cpp", |
| "MessageDef/AttributeStatusElement.h", |
| "MessageDef/AttributeStatusList.cpp", |
| "MessageDef/AttributeStatusList.h", |
| "MessageDef/Builder.cpp", |
| "MessageDef/Builder.h", |
| "MessageDef/CommandDataElement.cpp", |
| "MessageDef/CommandDataElement.h", |
| "MessageDef/CommandList.cpp", |
| "MessageDef/CommandList.h", |
| "MessageDef/CommandPath.cpp", |
| "MessageDef/CommandPath.h", |
| "MessageDef/EventDataElement.cpp", |
| "MessageDef/EventDataElement.h", |
| "MessageDef/EventList.cpp", |
| "MessageDef/EventList.h", |
| "MessageDef/EventPath.cpp", |
| "MessageDef/EventPath.h", |
| "MessageDef/EventPathList.cpp", |
| "MessageDef/EventPathList.h", |
| "MessageDef/InvokeCommand.cpp", |
| "MessageDef/InvokeCommand.h", |
| "MessageDef/ListBuilder.cpp", |
| "MessageDef/ListBuilder.h", |
| "MessageDef/ListParser.cpp", |
| "MessageDef/ListParser.h", |
| "MessageDef/MessageDefHelper.h", |
| "MessageDef/Parser.cpp", |
| "MessageDef/Parser.h", |
| "MessageDef/ReadRequest.cpp", |
| "MessageDef/ReadRequest.h", |
| "MessageDef/ReportData.cpp", |
| "MessageDef/ReportData.h", |
| "MessageDef/StatusElement.cpp", |
| "MessageDef/StatusElement.h", |
| "ReadClient.cpp", |
| "ReadHandler.cpp", |
| "decoder.cpp", |
| "encoder.cpp", |
| "reporting/Engine.cpp", |
| ] |
| |
| public_deps = [ |
| ":codec_headers", |
| "${chip_root}/src/lib/support", |
| "${chip_root}/src/messaging", |
| "${chip_root}/src/system", |
| "${nlio_root}:nlio", |
| ] |
| |
| cflags = [ "-Wconversion" ] |
| |
| public_configs = [ |
| ":app_config", |
| "${chip_root}/src:includes", |
| ] |
| } |
| |
| copy("codec_headers") { |
| sources = [ "chip-zcl-zpro-codec.h" ] |
| |
| outputs = [ "${target_gen_dir}/include/app/{{source_file_part}}" ] |
| } |