-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.gn
90 lines (80 loc) · 1.95 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
# Copyright 2023 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 = [
":install_headers",
":libsar",
":libsar_pkg_config",
]
if (use.test) {
deps += [
":libsar_test_support",
":libsar_test_support_pkg_config",
":libsar_testrunner",
]
}
}
pkg_config("target_defaults_pkg_deps") {
pkg_deps = [
"libbrillo",
"libchrome",
"libcros_config",
]
}
shared_library("libsar") {
sources = [
"sar_config_reader.cc",
"sar_config_reader_delegate_impl.cc",
]
configs += [ ":target_defaults_pkg_deps" ]
install_path = "lib"
}
generate_pkg_config("libsar_pkg_config") {
name = "libsar"
description = "Library to support SAR sensor like Semtech SX93xx components for ChromiumOS"
version = "0.1"
libs = [ "-lsar" ]
install = true
}
install_config("install_headers") {
sources = [
"sar_config_reader.h",
"sar_config_reader_delegate_impl.h",
"test_fakes.h",
]
install_path = "/usr/include/chromeos/sar_config_reader"
}
if (use.test) {
shared_library("libsar_test_support") {
sources = [ "test_fakes.cc" ]
configs += [ ":target_defaults_pkg_deps" ]
install_path = "lib"
deps = [ ":libsar" ]
}
generate_pkg_config("libsar_test_support_pkg_config") {
name = "libsar_test_support"
description = "Test helper library to support SAR sensor for ChromiumOS"
version = "0.1"
libs = [ "-lsar_test_support" ]
install = true
}
pkg_config("libsar_testrunner_pkg_deps") {
pkg_deps = [ "libbrillo-test" ]
}
executable("libsar_testrunner") {
sources = [ "sar_config_reader_test.cc" ]
configs += [
"//common-mk:test",
":libsar_testrunner_pkg_deps",
":target_defaults_pkg_deps",
]
run_test = true
deps = [
":libsar",
":libsar_test_support",
"//common-mk/testrunner",
]
}
}