-
Notifications
You must be signed in to change notification settings - Fork 1
/
BUILD.gn
82 lines (73 loc) · 1.69 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
# Copyright 2020 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//common-mk/mojom_bindings_generator.gni")
import("//common-mk/pkg_config.gni")
# The target named "all" is the root target built
# by the platform2 build system.
group("all") {
deps = [
":ocr_service",
":ocr_tool",
]
if (use.test) {
deps += [ ":ocr_service_test" ]
}
}
generate_mojom_bindings("ocr_mojo_bindings") {
mojo_root = "${platform2_root}"
sources = [ "mojo/ocr_service.mojom" ]
}
pkg_config("target_defaults") {
cflags_c = [
"-Wextra",
"-Wshadow",
]
cflags_cc = [ "-Woverloaded-virtual" ]
pkg_deps = [
"libbrillo",
"libchrome",
"libmojo",
"system_api",
"tesseract",
]
}
source_set("libocr") {
configs += [ ":target_defaults" ]
deps = [ ":ocr_mojo_bindings" ]
sources = [
"daemon.cc",
"ocr_service_impl.cc",
]
}
source_set("libocr_mojo_adapter") {
configs += [ ":target_defaults" ]
deps = [ ":ocr_mojo_bindings" ]
sources = [
"mojo_adapter/ocr_service_mojo_adapter.cc",
"mojo_adapter/ocr_service_mojo_adapter_delegate_impl.cc",
]
}
executable("ocr_service") {
configs += [ ":target_defaults" ]
deps = [ ":libocr" ]
sources = [ "main.cc" ]
}
executable("ocr_tool") {
configs += [ ":target_defaults" ]
deps = [ ":libocr_mojo_adapter" ]
sources = [ "ocr_tool/ocr_tool.cc" ]
}
if (use.test) {
executable("ocr_service_test") {
configs += [
"//common-mk:test",
":target_defaults",
]
deps = [
":libocr",
"//common-mk/testrunner:testrunner",
]
sources = [ "ocr_service_impl_test.cc" ]
}
}