• 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  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    ]
27  }
28
29  if (defined(is_skia_standalone)) {
30    config("utils_config") {
31      include_dirs = [ "utils" ]
32    }
33    source_set("utils") {
34      check_includes = false
35      testonly = true
36
37      public_configs = [ ":utils_config" ]
38      configs += [ "../../:skia_private" ]
39
40      sources = [
41        "utils/SkottieUtils.cpp",
42      ]
43      deps = [
44        ":skottie",
45        "../..:skia",
46      ]
47    }
48
49    if (skia_enable_tools) {
50      source_set("tests") {
51        testonly = true
52
53        configs += [
54          "../..:skia_private",
55          "../..:tests_config",
56        ]
57        sources = [
58          "src/SkottieTest.cpp",
59          "tests/Keyframe.cpp",
60        ]
61
62        deps = [
63          ":skottie",
64          "../..:gpu_tool_utils",
65          "../..:skia",
66          "../skshaper",
67        ]
68      }
69
70      source_set("fuzz") {
71        check_includes = false
72        testonly = true
73
74        configs += [ "../..:skia_private" ]
75        include_dirs = [
76          "../../tools",
77          "../../tools/flags",
78          "../../tools/fonts",
79        ]
80        sources = [
81          "../../tools/Resources.cpp",
82          "../../tools/fonts/TestFontMgr.cpp",
83          "../../tools/fonts/TestSVGTypeface.cpp",
84          "../../tools/fonts/TestTypeface.cpp",
85          "fuzz/FuzzSkottieJSON.cpp",
86        ]
87
88        deps = [
89          "../..:experimental_svg_model",
90          "../..:skia",
91        ]
92
93        public_deps = [
94          ":skottie",
95        ]
96      }
97
98      source_set("tool") {
99        check_includes = false
100        testonly = true
101
102        configs += [ "../..:skia_private" ]
103        sources = [
104          "src/SkottieTool.cpp",
105        ]
106
107        deps = [
108          "../..:flags",
109          "../..:skia",
110        ]
111        if (skia_use_ffmpeg) {
112          defines = [ "HAVE_VIDEO_ENCODER" ]
113          deps += [ "../..:video_decoder" ]
114        }
115
116        public_deps = [
117          ":skottie",
118          ":utils",
119        ]
120      }
121
122      source_set("gm") {
123        check_includes = false
124        testonly = true
125
126        # would be nice to have a gm_config
127        include_dirs = [ "../../gm" ]
128
129        configs += [ "../..:skia_private" ]
130        sources = [
131          "gm/ExternalProperties.cpp",
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} else {
146  group("skottie") {
147  }
148  group("fuzz") {
149  }
150  group("gm") {
151  }
152  group("tests") {
153  }
154  group("utils") {
155  }
156}
157