Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / src / app / BUILD.gn
1 # Copyright (c) 2020 Project CHIP Authors
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 import("//build_overrides/chip.gni")
16 import("//build_overrides/nlio.gni")
17 import("common_flags.gni")
18
19 config("app_config") {
20   include_dirs = [
21     "util",
22     ".",
23     "${target_gen_dir}/include",
24   ]
25 }
26
27 static_library("app") {
28   output_name = "libCHIPDataModel"
29
30   sources = [
31     "Command.cpp",
32     "Command.h",
33     "CommandHandler.cpp",
34     "CommandSender.cpp",
35     "InteractionModelEngine.cpp",
36     "MessageDef/AttributeDataElement.cpp",
37     "MessageDef/AttributeDataElement.h",
38     "MessageDef/AttributeDataList.cpp",
39     "MessageDef/AttributeDataList.h",
40     "MessageDef/AttributeDataVersionList.cpp",
41     "MessageDef/AttributeDataVersionList.h",
42     "MessageDef/AttributePath.cpp",
43     "MessageDef/AttributePath.h",
44     "MessageDef/AttributePathList.cpp",
45     "MessageDef/AttributePathList.h",
46     "MessageDef/AttributeStatusElement.cpp",
47     "MessageDef/AttributeStatusElement.h",
48     "MessageDef/AttributeStatusList.cpp",
49     "MessageDef/AttributeStatusList.h",
50     "MessageDef/Builder.cpp",
51     "MessageDef/Builder.h",
52     "MessageDef/CommandDataElement.cpp",
53     "MessageDef/CommandDataElement.h",
54     "MessageDef/CommandList.cpp",
55     "MessageDef/CommandList.h",
56     "MessageDef/CommandPath.cpp",
57     "MessageDef/CommandPath.h",
58     "MessageDef/EventDataElement.cpp",
59     "MessageDef/EventDataElement.h",
60     "MessageDef/EventList.cpp",
61     "MessageDef/EventList.h",
62     "MessageDef/EventPath.cpp",
63     "MessageDef/EventPath.h",
64     "MessageDef/EventPathList.cpp",
65     "MessageDef/EventPathList.h",
66     "MessageDef/InvokeCommand.cpp",
67     "MessageDef/InvokeCommand.h",
68     "MessageDef/ListBuilder.cpp",
69     "MessageDef/ListBuilder.h",
70     "MessageDef/ListParser.cpp",
71     "MessageDef/ListParser.h",
72     "MessageDef/MessageDefHelper.h",
73     "MessageDef/Parser.cpp",
74     "MessageDef/Parser.h",
75     "MessageDef/ReadRequest.cpp",
76     "MessageDef/ReadRequest.h",
77     "MessageDef/ReportData.cpp",
78     "MessageDef/ReportData.h",
79     "MessageDef/StatusElement.cpp",
80     "MessageDef/StatusElement.h",
81     "ReadClient.cpp",
82     "ReadHandler.cpp",
83     "decoder.cpp",
84     "encoder.cpp",
85   ]
86
87   public_deps = [
88     ":codec_headers",
89     "${chip_root}/src/lib/support",
90     "${chip_root}/src/messaging",
91     "${chip_root}/src/system",
92     "${nlio_root}:nlio",
93   ]
94
95   cflags = [ "-Wconversion" ]
96
97   public_configs = [
98     ":app_config",
99     "${chip_root}/src:includes",
100   ]
101 }
102
103 copy("codec_headers") {
104   sources = [ "chip-zcl-zpro-codec.h" ]
105
106   outputs = [ "${target_gen_dir}/include/app/{{source_file_part}}" ]
107 }