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