Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / examples / lighting-app / lighting-common / 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("${chip_root}/examples/lighting-app/lighting-common/lighting.gni")
17 import("${chip_root}/src/app/common_flags.gni")
18 import("${chip_root}/src/lib/core/core.gni")
19
20 if (enable_pw_rpc) {
21   import("//build_overrides/pigweed.gni")
22   import("$dir_pw_protobuf_compiler/proto.gni")
23 }
24
25 config("includes") {
26   include_dirs = [
27     ".",
28     "include",
29   ]
30 }
31
32 if (enable_pw_rpc) {
33   pw_proto_library("lighting_service") {
34     sources = [ "lighting_service/pigweed_lighting.proto" ]
35     inputs = [ "lighting_service/pigweed_lighting.options" ]
36   }
37 }
38
39 source_set("lighting-common") {
40   sources = [
41     "${chip_root}/src/app/clusters/bindings/bindings.cpp",
42     "${chip_root}/src/app/clusters/level-control/level-control.cpp",
43     "${chip_root}/src/app/clusters/network-commissioning/network-commissioning-ember.cpp",
44     "${chip_root}/src/app/clusters/network-commissioning/network-commissioning.cpp",
45     "${chip_root}/src/app/clusters/on-off-server/on-off.cpp",
46     "${chip_root}/src/app/reporting/reporting-default-configuration.cpp",
47     "${chip_root}/src/app/reporting/reporting.cpp",
48     "${chip_root}/src/app/server/DataModelHandler.cpp",
49     "${chip_root}/src/app/util/af-event.cpp",
50     "${chip_root}/src/app/util/af-main-common.cpp",
51     "${chip_root}/src/app/util/attribute-size.cpp",
52     "${chip_root}/src/app/util/attribute-storage.cpp",
53     "${chip_root}/src/app/util/attribute-table.cpp",
54     "${chip_root}/src/app/util/binding-table.cpp",
55     "${chip_root}/src/app/util/chip-message-send.cpp",
56     "${chip_root}/src/app/util/client-api.cpp",
57     "${chip_root}/src/app/util/ember-print.cpp",
58     "${chip_root}/src/app/util/message.cpp",
59     "${chip_root}/src/app/util/process-cluster-message.cpp",
60     "${chip_root}/src/app/util/process-global-message.cpp",
61     "${chip_root}/src/app/util/util.cpp",
62     "gen/call-command-handler.cpp",
63     "gen/callback-stub.cpp",
64   ]
65
66   if (chip_enable_interaction_model) {
67     sources += [
68       "${chip_root}/src/app/util/ember-compatibility-functions.cpp",
69       "gen/IMClusterCommandHandler.cpp",
70     ]
71   }
72
73   deps = [ "${chip_root}/src/lib" ]
74
75   public_configs = [ ":includes" ]
76 }