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