• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2021 Google LLC.
2
3import("../../gn/skia.gni")
4import("../../modules/skshaper/skshaper.gni")
5
6declare_args() {
7  skia_enable_sktext = true
8  text_gms_enabled = true
9  text_tests_enabled = true
10  text_bench_enabled = false
11}
12
13if (skia_enable_sktext && skia_enable_skshaper && skia_use_icu &&
14    skia_use_harfbuzz) {
15  config("public_config") {
16    include_dirs = [ "include" ]
17  }
18
19  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    ]
28  }
29
30  if (defined(is_skia_standalone) && skia_enable_tools) {
31    source_set("gm") {
32      if (text_gms_enabled) {
33        testonly = true
34        sources = []
35        deps = [
36          ":sktext",
37          "../..:gpu_tool_utils",
38          "../..:skia",
39          "../../modules/skshaper",
40        ]
41      } else {
42        sources = []
43      }
44    }
45
46    source_set("tests") {
47      if (text_tests_enabled) {
48        testonly = true
49        sources = []
50        deps = [
51          ":sktext",
52          "../..:gpu_tool_utils",
53          "../..:skia",
54          "../../modules/skshaper",
55        ]
56      } else {
57        sources = []
58      }
59    }
60
61    source_set("bench") {
62      if (text_bench_enabled) {
63        testonly = true
64        sources = []
65        deps = [
66          ":sktext",
67          "../..:skia",
68          "../../modules/skshaper",
69        ]
70      } else {
71        sources = []
72      }
73    }
74
75    source_set("samples") {
76      testonly = true
77      sources = [ "samples/Text.cpp" ]
78      deps = [
79        ":sktext",
80        "../..:skia",
81        "../../modules/skshaper",
82      ]
83    }
84  }
85} else {
86  group("sktext") {
87  }
88  group("gm") {
89  }
90  group("tests") {
91  }
92  group("bench") {
93  }
94  group("samples") {
95  }
96}
97