Debian Codegraph @

experimental/sktext/BUILD.gn

raw
1 # Copyright 2021 Google LLC.
2
3 import("../../gn/skia.gni")
4 import("../../modules/skshaper/skshaper.gni")
5
6 declare_args() {
7 skia_enable_sktext = true
8 text_gms_enabled = true
9 text_tests_enabled = true
10 text_bench_enabled = false
11 }
12
13 if ((skia_use_icu || skia_use_libgrapheme || skia_use_icu4x) &&
14 skia_enable_sktext && skia_enable_skshaper && skia_use_harfbuzz) {
15 config("public_config") {
16 include_dirs = [ "include" ]
17 }
18
19 skia_component("sktext") {
20 import("sktext.gni")
21 public_configs = [ ":public_config" ]
22 public = sktext_public
23 sources = sktext_sources
24 deps = [
25 "../..:skia",
26 "../../modules/skshaper",
27 "../../modules/skunicode",
28 ]
29 }
30
31 if (defined(is_skia_standalone) && skia_enable_tools) {
32 source_set("gm") {
33 if (text_gms_enabled) {
34 testonly = true
35 sources = []
36 deps = [
37 ":sktext",
38 "../..:gpu_tool_utils",
39 "../..:skia",
40 "../../modules/skshaper",
41 ]
42 } else {
43 sources = []
44 }
45 }
46
47 source_set("tests") {
48 if (text_tests_enabled) {
49 testonly = true
50 sources = [
51 "tests/FontResolvedText.cpp",
52 "tests/SelectableText.cpp",
53 "tests/ShapedText.cpp",
54 "tests/UnicodeText.cpp",
55 "tests/WrappedText.cpp",
56 ]
57 deps = [
58 ":sktext",
59 "../..:gpu_tool_utils",
60 "../..:skia",
61 "../../modules/skshaper",
62 ]
63 } else {
64 sources = []
65 }
66 }
67
68 source_set("bench") {
69 if (text_bench_enabled) {
70 testonly = true
71 sources = []
72 deps = [
73 ":sktext",
74 "../..:skia",
75 "../../modules/skshaper",
76 ]
77 } else {
78 sources = []
79 }
80 }
81
82 source_set("slides") {
83 testonly = true
84 sources = [
85 "editor/Cursor.cpp",
86 "editor/Editor.cpp",
87 "editor/Mouse.cpp",
88 "editor/Selection.cpp",
89 "editor/Texts.cpp",
90 "slides/Text.cpp",
91 ]
92 deps = [
93 ":sktext",
94 "../..:skia",
95 "../../modules/skshaper",
96 ]
97 }
98
99 skia_source_set("text_editor") {
100 testonly = true
101 sources = [
102 "editor/App.cpp",
103 "editor/Cursor.cpp",
104 "editor/Editor.cpp",
105 "editor/Mouse.cpp",
106 "editor/Selection.cpp",
107 "editor/Texts.cpp",
108 ]
109 public_deps = [ "../..:sk_app" ]
110 deps = [ ":sktext" ]
111 }
112 }
113 } else {
114 group("sktext") {
115 }
116 group("gm") {
117 }
118 group("tests") {
119 }
120 group("bench") {
121 }
122 group("slides") {
123 }
124 group("text_editor") {
125 }
126 }