-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.gn
55 lines (48 loc) · 1.05 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
# Copyright 2020 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//common-mk/pkg_config.gni")
group("all") {
deps = [ ":syslog-cat" ]
if (use.test) {
deps += [ ":syslogcat_testrunner" ]
}
}
pkg_config("target_defaults") {
pkg_deps = [
"libbrillo",
"libchrome",
]
}
static_library("syslogcat_lib") {
sources = [
"syslogcat.cc",
"syslogcat.h",
]
configs += [ ":target_defaults" ]
}
executable("syslog-cat") {
sources = [ "main.cc" ]
install_path = "sbin"
configs += [ ":target_defaults" ]
deps = [ ":syslogcat_lib" ]
}
if (use.test) {
pkg_config("syslogcat_testrunner_config") {
pkg_deps = [ "libchrome-test" ]
}
executable("syslogcat_testrunner") {
sources = [ "syslogcat_test.cc" ]
configs += [
"//common-mk:test",
":syslogcat_testrunner_config",
":target_defaults",
]
run_test = true
defines = [ "UNIT_TEST" ]
deps = [
":syslogcat_lib",
"//common-mk/testrunner",
]
}
}