• 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
8declare_args() {
9  skia_enable_skottie = true
10}
11
12config("public_config") {
13  if (skia_enable_skottie) {
14    defines = [ "SK_ENABLE_SKOTTIE" ]
15    include_dirs = [ "include" ]
16  }
17}
18
19component("skottie") {
20  if (skia_enable_skottie) {
21    import("skottie.gni")
22    public_configs = [ ":public_config" ]
23    public = skia_skottie_public
24    sources = skia_skottie_sources
25    configs += [ "../../:skia_private" ]
26    deps = [
27      "../..:skia",
28      "../sksg",
29      "../skshaper",
30    ]
31  }
32}
33
34if (defined(is_skia_standalone)) {
35  config("utils_config") {
36    include_dirs = [ "utils" ]
37  }
38  source_set("utils") {
39    if (skia_enable_skottie) {
40      testonly = true
41
42      public_configs = [ ":utils_config" ]
43      configs += [ "../../:skia_private" ]
44      sources = [
45        "utils/SkottieUtils.cpp",
46      ]
47      deps = [
48        ":skottie",
49        "../..:skia",
50      ]
51    }
52  }
53
54  if (skia_enable_tools) {
55    source_set("tests") {
56      if (skia_enable_skottie) {
57        testonly = true
58
59        configs += [
60          "../..:skia_private",
61          "../..:tests_config",
62        ]
63        sources = [
64          "src/SkottieTest.cpp",
65        ]
66
67        deps = [
68          ":skottie",
69          "../..:gpu_tool_utils",
70          "../..:skia",
71        ]
72      }
73    }
74
75    source_set("fuzz") {
76      if (skia_enable_skottie) {
77        testonly = true
78
79        configs += [ "../..:skia_private" ]
80        include_dirs = [
81          "../../tools",
82          "../../tools/flags",
83          "../../tools/fonts",
84        ]
85        sources = [
86          "../../tools/Resources.cpp",
87          "../../tools/fonts/SkTestFontMgr.cpp",
88          "../../tools/fonts/SkTestSVGTypeface.cpp",
89          "../../tools/fonts/SkTestTypeface.cpp",
90          "fuzz/FuzzSkottieJSON.cpp",
91        ]
92
93        deps = [
94          "../..:experimental_svg_model",
95          "../..:skia",
96        ]
97
98        public_deps = [
99          ":skottie",
100        ]
101      }
102    }
103
104    source_set("tool") {
105      testonly = true
106
107      configs += [ "../..:skia_private" ]
108      sources = [
109        "src/SkottieTool.cpp",
110      ]
111
112      deps = [
113        "../..:flags",
114        "../..:skia",
115      ]
116
117      public_deps = [
118        ":skottie",
119        ":utils",
120      ]
121    }
122
123    source_set("gm") {
124      if (skia_enable_skottie) {
125        testonly = true
126
127        # would be nice to have a gm_config
128        include_dirs = [ "../../gm" ]
129
130        configs += [ "../..:skia_private" ]
131        sources = [
132          "gm/SkottieGM.cpp",
133        ]
134
135        deps = [
136          ":skottie",
137          ":utils",
138          "../..:gpu_tool_utils",
139          "../..:skia",
140          "../..:tool_utils",
141        ]
142      }
143    }
144  }
145}
146