blob: 2ff14fb0783297aa15464551d6ce806ed2aaee75 [file] [log] [blame]
# 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("${chip_root}/build/chip/buildconfig_header.gni")
import("common_flags.gni")
declare_args() {
# Enable strict schema checks.
chip_enable_schema_check =
is_debug && (current_os == "linux" || current_os == "mac")
}
buildconfig_header("app_buildconfig") {
header = "AppBuildConfig.h"
header_dir = "app"
defines = [ "CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK=${chip_enable_schema_check}" ]
}
static_library("app") {
output_name = "libCHIPDataModel"
sources = [
"AttributePathParams.cpp",
"Command.cpp",
"Command.h",
"CommandHandler.cpp",
"CommandSender.cpp",
"EventManagement.cpp",
"InteractionModelEngine.cpp",
"MessageDef/ArrayBuilder.cpp",
"MessageDef/ArrayParser.cpp",
"MessageDef/AttributeDataElement.cpp",
"MessageDef/AttributeDataElement.h",
"MessageDef/AttributeDataList.cpp",
"MessageDef/AttributeDataList.h",
"MessageDef/AttributeDataVersionList.cpp",
"MessageDef/AttributeDataVersionList.h",
"MessageDef/AttributePathIB.cpp",
"MessageDef/AttributePathIB.h",
"MessageDef/AttributePaths.cpp",
"MessageDef/AttributePaths.h",
"MessageDef/AttributeStatusIB.cpp",
"MessageDef/AttributeStatusIB.h",
"MessageDef/AttributeStatuses.cpp",
"MessageDef/AttributeStatuses.h",
"MessageDef/Builder.cpp",
"MessageDef/Builder.h",
"MessageDef/CommandDataIB.cpp",
"MessageDef/CommandPathIB.cpp",
"MessageDef/CommandStatusIB.cpp",
"MessageDef/EventDataIB.cpp",
"MessageDef/EventDataIB.h",
"MessageDef/EventFilterIB.cpp",
"MessageDef/EventFilters.cpp",
"MessageDef/EventPathIB.cpp",
"MessageDef/EventPathIB.h",
"MessageDef/EventPaths.cpp",
"MessageDef/EventPaths.h",
"MessageDef/EventReportIB.cpp",
"MessageDef/EventReportIB.h",
"MessageDef/EventReports.cpp",
"MessageDef/EventReports.h",
"MessageDef/EventStatusIB.cpp",
"MessageDef/EventStatusIB.h",
"MessageDef/InvokeRequestMessage.cpp",
"MessageDef/InvokeRequests.cpp",
"MessageDef/InvokeResponseIB.cpp",
"MessageDef/InvokeResponseMessage.cpp",
"MessageDef/InvokeResponses.cpp",
"MessageDef/ListBuilder.cpp",
"MessageDef/ListParser.cpp",
"MessageDef/MessageDefHelper.cpp",
"MessageDef/MessageDefHelper.h",
"MessageDef/Parser.cpp",
"MessageDef/Parser.h",
"MessageDef/ReadRequestMessage.cpp",
"MessageDef/ReadRequestMessage.h",
"MessageDef/ReportDataMessage.cpp",
"MessageDef/ReportDataMessage.h",
"MessageDef/StatusIB.cpp",
"MessageDef/StatusIB.h",
"MessageDef/StatusResponseMessage.cpp",
"MessageDef/StructBuilder.cpp",
"MessageDef/StructParser.cpp",
"MessageDef/SubscribeRequestMessage.cpp",
"MessageDef/SubscribeResponseMessage.cpp",
"MessageDef/TimedRequestMessage.cpp",
"MessageDef/WriteRequestMessage.cpp",
"MessageDef/WriteResponseMessage.cpp",
"ReadClient.cpp",
"ReadHandler.cpp",
"WriteClient.cpp",
"WriteHandler.cpp",
"decoder.cpp",
"encoder-common.cpp",
"reporting/Engine.cpp",
"reporting/Engine.h",
]
if (chip_ip_commissioning) {
defines = [
"CONFIG_USE_CLUSTERS_FOR_IP_COMMISSIONING=1",
"CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY=1",
]
}
public_deps = [
":app_buildconfig",
"${chip_root}/src/lib/support",
"${chip_root}/src/messaging",
"${chip_root}/src/protocols/secure_channel",
"${chip_root}/src/system",
"${nlio_root}:nlio",
]
cflags = [ "-Wconversion" ]
public_configs = [ "${chip_root}/src:includes" ]
}