• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2020 Google Inc.
2#
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6import("../../gn/skia.gni")
7
8if (skia_enable_skrive) {
9  config("public_config") {
10    defines = [ "SK_ENABLE_SKRIVE" ]
11    include_dirs = [ "include" ]
12  }
13
14  component("skrive") {
15    check_includes = false
16    import("skrive.gni")
17    public_configs = [ ":public_config" ]
18    public = skia_skrive_public
19    sources = skia_skrive_sources
20    configs += [ "../../:skia_private" ]
21    deps = [ "../..:skia" ]
22    if (is_ohos) {
23      external_deps = [ "hitrace:hitrace_meter" ]
24    }
25    if (use_oh_skia) {
26      deps -= [ "../..:skia" ]
27      deps += [ "../..:skia_canvaskit" ]
28    }
29  }
30
31  if (defined(is_skia_standalone)) {
32    if (skia_enable_tools) {
33      source_set("tests") {
34        testonly = true
35
36        configs += [
37          "../..:skia_private",
38          "../..:tests_config",
39        ]
40        sources = [
41          "tests/BinaryReader.cpp",
42          "tests/DomTypes.cpp",
43          "tests/JsonReader.cpp",
44        ]
45
46        if (is_ohos) {
47          external_deps = [ "hitrace:hitrace_meter" ]
48        }
49        deps = [
50          ":skrive",
51          "../..:skia",
52          "../..:test",
53        ]
54        if (use_oh_skia) {
55          deps -= [ "../..:skia" ]
56        }
57      }
58    }
59  }
60} else {
61  group("skrive") {
62  }
63  group("tests") {
64  }
65}
66