• 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
8if (skia_enable_skottie) {
9  config("public_config") {
10    defines = [ "SK_ENABLE_SKOTTIE" ]
11    include_dirs = [ "include" ]
12  }
13
14  skia_component("skottie") {
15    check_includes = false
16    import("skottie.gni")
17    public_configs = [ ":public_config" ]
18    public = skia_skottie_public
19    sources = skia_skottie_sources
20    configs = [ "../../:skia_private" ]
21    deps = [
22      "../..:skia",
23      "../skresources",
24      "../sksg",
25      "../skshaper",
26      "../skunicode",
27    ]
28  }
29
30  if (defined(is_skia_standalone)) {
31    config("utils_config") {
32      include_dirs = [ "utils" ]
33    }
34    skia_source_set("utils") {
35      check_includes = false
36      testonly = true
37
38      public_configs = [ ":utils_config" ]
39      configs = [ "../../:skia_private" ]
40
41      sources = [ "utils/SkottieUtils.cpp" ]
42      deps = [
43        ":skottie",
44        "../..:skia",
45      ]
46    }
47
48    if (skia_enable_tools) {
49      skia_source_set("tests") {
50        testonly = true
51
52        configs = [
53          "../..:skia_private",
54          "../..:tests_config",
55        ]
56        sources = [
57          "src/SkottieTest.cpp",
58          "tests/AudioLayer.cpp",
59          "tests/Expression.cpp",
60          "tests/Image.cpp",
61          "tests/Keyframe.cpp",
62          "tests/Shaper.cpp",
63          "tests/Text.cpp",
64        ]
65
66        deps = [
67          ":skottie",
68          "../..:skia",
69          "../..:test",
70          "../skshaper",
71        ]
72      }
73
74      skia_source_set("fuzz") {
75        check_includes = false
76        testonly = true
77
78        configs = [ "../..:skia_private" ]
79        include_dirs = [
80          "../../tools",
81          "../../tools/flags",
82          "../../tools/fonts",
83        ]
84        sources = [
85          "../../tools/Resources.cpp",
86          "../../tools/fonts/TestFontMgr.cpp",
87          "../../tools/fonts/TestSVGTypeface.cpp",
88          "../../tools/fonts/TestTypeface.cpp",
89          "fuzz/FuzzSkottieJSON.cpp",
90        ]
91
92        deps = [
93          "../..:skia",
94          "../svg",
95        ]
96
97        public_deps = [ ":skottie" ]
98      }
99
100      skia_source_set("tool") {
101        check_includes = false
102        testonly = true
103
104        configs = [ "../..:skia_private" ]
105        sources = [ "src/SkottieTool.cpp" ]
106
107        deps = [
108          "../..:flags",
109          "../..:gpu_tool_utils",
110          "../..:skia",
111          "../../experimental/ffmpeg:video_encoder",
112        ]
113
114        public_deps = [
115          ":skottie",
116          ":utils",
117        ]
118      }
119
120      # A couple of backend specific targets, to facilitate binary size experiments.
121      skia_source_set("tool_cpu") {
122        check_includes = false
123        testonly = true
124
125        configs = [ "../..:skia_private" ]
126        sources = [ "src/SkottieTool.cpp" ]
127        defines = [ "CPU_ONLY" ]
128
129        deps = [
130          "../..:flags",
131          "../..:gpu_tool_utils",
132          "../..:skia",
133          "../../experimental/ffmpeg:video_encoder",
134        ]
135
136        public_deps = [
137          ":skottie",
138          ":utils",
139        ]
140      }
141
142      skia_source_set("tool_gpu") {
143        check_includes = false
144        testonly = true
145
146        configs = [ "../..:skia_private" ]
147        sources = [ "src/SkottieTool.cpp" ]
148        defines = [ "GPU_ONLY" ]
149
150        deps = [
151          "../..:flags",
152          "../..:gpu_tool_utils",
153          "../..:skia",
154          "../../experimental/ffmpeg:video_encoder",
155        ]
156
157        public_deps = [
158          ":skottie",
159          ":utils",
160        ]
161      }
162
163      skia_source_set("gm") {
164        check_includes = false
165        testonly = true
166
167        # would be nice to have a gm_config
168        include_dirs = [ "../../gm" ]
169
170        configs = [ "../..:skia_private" ]
171        sources = [
172          "gm/ExternalProperties.cpp",
173          "gm/SkottieGM.cpp",
174        ]
175
176        deps = [
177          ":skottie",
178          ":utils",
179          "../..:gpu_tool_utils",
180          "../..:skia",
181          "../..:tool_utils",
182        ]
183      }
184    }
185  }
186} else {
187  group("skottie") {
188  }
189  group("fuzz") {
190  }
191  group("gm") {
192  }
193  group("tests") {
194  }
195  group("utils") {
196  }
197}
198