• 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("//build/ohos.gni")
7import("../../gn/skia.gni")
8
9if (skia_enable_svg && skia_use_expat) {
10  config("public_config") {
11    defines = [ "SK_ENABLE_SVG" ]
12    include_dirs = [ "include" ]
13    include_dirs += [
14      "${skia_root_dir}",
15      "${skia_modules_dir}/svg/include",
16      "${skia_modules_dir}/skresources/include",
17      "${skia_modules_dir}/skshaper/include",
18    ]
19  }
20
21  ohos_source_set("svg") {
22    check_includes = false
23    import("svg.gni")
24    public_configs = [ ":public_config" ]
25    public = skia_svg_public
26    sources = skia_svg_sources
27    configs = [ "../../:skia_private" ]
28    if (use_oh_skia) {
29      configs += [ "../../:skia_wno" ]
30    }
31  }
32
33  if (skia_enable_tools) {
34    if (defined(is_skia_standalone)) {
35      skia_source_set("tool") {
36        check_includes = false
37        testonly = true
38
39        configs = [ "../..:skia_private" ]
40        sources = [ "utils/SvgTool.cpp" ]
41
42        deps = [
43          "../..:flags",
44          "../..:skia",
45          "../..:tool_utils",
46        ]
47
48        public_deps = [ ":svg" ]
49      }
50    }
51
52    skia_source_set("tests") {
53      testonly = true
54
55      configs = [ "../..:skia_private" ]
56      sources = [
57        "tests/Filters.cpp",
58        "tests/Text.cpp",
59      ]
60
61      deps = [
62        ":svg",
63        "../..:skia",
64        "../..:test",
65        "../skshaper",
66      ]
67      if (is_ohos) {
68        external_deps = [ "hitrace:hitrace_meter" ]
69        if (!build_ohos_sdk && !is_arkui_x) {
70          external_deps += [ "init:libbegetutil" ]
71          if (defined(defines)) {
72            defines += [ "NOT_BUILD_FOR_OHOS_SDK" ]
73          } else {
74            defines = [ "NOT_BUILD_FOR_OHOS_SDK" ]
75          }
76        }
77      }
78
79      if (is_arkui_x) {
80          deps += [ "//third_party/bounds_checking_function:libsec_static" ]
81      } else if (is_ohos) {
82        if (is_component_build) {
83          external_deps += [ "bounds_checking_function:libsec_shared" ]
84        } else {
85          external_deps += [ "bounds_checking_function:libsec_static" ]
86        }
87      }
88    }
89  }
90} else {
91  group("svg") {
92  }
93  group("tests") {
94  }
95}
96