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