forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.gn
128 lines (104 loc) · 3.55 KB
/
BUILD.gn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# 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/build.gni")
import("//build_overrides/chip.gni")
import("${build_root}/config/compiler/compiler.gni")
import("${chip_root}/src/lib/lib.gni")
import("${chip_root}/src/platform/device.gni")
source_set("chip-all-clusters-common") {
sources = [
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp",
"AllClustersCommandDelegate.cpp",
"AppOptions.cpp",
"WindowCoveringManager.cpp",
"include/tv-callbacks.cpp",
"include/tv-callbacks.h",
"main-common.cpp",
]
deps = [
"${chip_root}/examples/all-clusters-app/all-clusters-common",
"${chip_root}/examples/platform/linux:app-main",
"${chip_root}/src/app/tests/suites/credentials:dac_provider",
"${chip_root}/src/lib",
"${chip_root}/third_party/jsoncpp",
]
include_dirs =
[ "${chip_root}/examples/all-clusters-app/all-clusters-common/include" ]
cflags = [ "-Wconversion" ]
if (chip_build_libshell) {
defines = [ "ENABLE_CHIP_SHELL" ]
}
}
source_set("chip-lock-app-common") {
sources = [
"${chip_root}/examples/lock-app/linux/src/LockEndpoint.cpp",
"${chip_root}/examples/lock-app/linux/src/LockManager.cpp",
"${chip_root}/examples/lock-app/linux/src/ZCLDoorLockCallbacks.cpp",
]
deps = [ "${chip_root}/examples/all-clusters-app/all-clusters-common" ]
include_dirs = [ "${chip_root}/examples/lock-app/linux/include" ]
cflags = [ "-Wconversion" ]
}
if (is_libfuzzer) {
executable("chip-all-clusters-app-fuzzing") {
sources = [ "fuzzing-main.cpp" ]
deps = [
":chip-all-clusters-common",
":chip-lock-app-common",
"${chip_root}/examples/platform/linux:app-main",
]
cflags = [ "-Wconversion" ]
output_dir = root_out_dir
}
} else {
executable("chip-all-clusters-app") {
sources = [ "main.cpp" ]
deps = [
":chip-all-clusters-common",
":chip-lock-app-common",
"${chip_root}/examples/platform/linux:app-main",
]
cflags = [ "-Wconversion" ]
include_dirs =
[ "${chip_root}/examples/all-clusters-app/all-clusters-common/include" ]
output_dir = root_out_dir
}
if (chip_device_platform == "darwin") {
action("codesign") {
script = "entitlements/codesign.py"
public_deps = [ ":chip-all-clusters-app" ]
args = [
"--target_path",
rebase_path("${root_build_dir}/chip-all-clusters-app", root_build_dir),
"--log_path",
rebase_path("${root_build_dir}/codesign_log.txt", root_build_dir),
]
output_name = "codesign_log.txt"
outputs = [ "${root_build_dir}/${output_name}" ]
}
}
}
group("linux") {
deps = []
if (is_libfuzzer) {
deps += [ ":chip-all-clusters-app-fuzzing" ]
} else {
deps += [ ":chip-all-clusters-app" ]
}
}
group("default") {
deps = [ ":linux" ]
}