• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2018 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
8config("public_config") {
9  include_dirs = [ "include" ]
10}
11
12skia_component("sksg") {
13  check_includes = false
14  import("sksg.gni")
15  public_configs = [ ":public_config" ]
16  sources = skia_sksg_sources
17  configs = [ "../../:skia_private" ]
18  deps = [ "../..:skia" ]
19}
20
21if (defined(is_skia_standalone) && skia_enable_tools) {
22  skia_source_set("tests") {
23    testonly = true
24
25    configs = [ "../..:skia_private" ]
26    sources = [ "tests/SGTest.cpp" ]
27    deps = [
28      ":sksg",
29      "../..:skia",
30      "../..:test",
31    ]
32    if (is_ohos) {
33      external_deps = [ "hitrace:hitrace_meter" ]
34      if (!build_ohos_sdk && !is_arkui_x) {
35        external_deps += [ "init:libbegetutil" ]
36        if (defined(defines)) {
37          defines += [ "NOT_BUILD_FOR_OHOS_SDK" ]
38        } else {
39          defines = [ "NOT_BUILD_FOR_OHOS_SDK" ]
40        }
41      }
42    }
43
44    if (is_arkui_x) {
45        deps += [ "//third_party/bounds_checking_function:libsec_static" ]
46    } else if (is_ohos) {
47      if (is_component_build) {
48        external_deps += [ "bounds_checking_function:libsec_shared" ]
49      } else {
50        external_deps += [ "bounds_checking_function:libsec_static" ]
51      }
52    }
53  }
54
55  skia_source_set("slides") {
56    if (target_cpu != "wasm") {  # TODO: clean up wasm test
57      testonly = true
58
59      configs = [ "../..:skia_private" ]
60      sources = [ "slides/SVGPongSlide.cpp" ]
61      deps = [
62        ":sksg",
63        "../..:skia",
64      ]
65    }
66  }
67}
68