blob: c5888c34aed74b4e5cd5e94f4ef6687b8eb98f22 [file] [log] [blame]
Florin Malitab3418102020-10-15 18:10:29 -04001# Copyright 2020 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
Robert Phillips2af13c12021-09-01 16:47:01 +00008if (skia_enable_svg && skia_use_expat) {
Florin Malitab3418102020-10-15 18:10:29 -04009 config("public_config") {
10 defines = [ "SK_ENABLE_SVG" ]
11 include_dirs = [ "include" ]
12 }
13
Ben Wagner3d9ab7e2021-03-16 14:29:20 -040014 skia_component("svg") {
Florin Malitab3418102020-10-15 18:10:29 -040015 check_includes = false
16 import("svg.gni")
17 public_configs = [ ":public_config" ]
18 public = skia_svg_public
19 sources = skia_svg_sources
Ben Wagner3d9ab7e2021-03-16 14:29:20 -040020 configs = [ "../../:skia_private" ]
Florin Malita7dc984a2020-12-08 11:37:15 -050021 deps = [
22 "../..:skia",
Florin Malita24df67d2021-01-26 18:45:34 -050023 "../skresources",
Florin Malita7dc984a2020-12-08 11:37:15 -050024 "../skshaper",
25 ]
Florin Malitab3418102020-10-15 18:10:29 -040026 }
27
Florin Malitadec78022020-12-17 16:36:54 -050028 if (skia_enable_tools) {
29 if (defined(is_skia_standalone)) {
Ben Wagner3d9ab7e2021-03-16 14:29:20 -040030 skia_source_set("tool") {
Florin Malitadec78022020-12-17 16:36:54 -050031 check_includes = false
32 testonly = true
33
Ben Wagner3d9ab7e2021-03-16 14:29:20 -040034 configs = [ "../..:skia_private" ]
Florin Malitadec78022020-12-17 16:36:54 -050035 sources = [ "utils/SvgTool.cpp" ]
36
37 deps = [
38 "../..:flags",
39 "../..:skia",
40 ]
41
42 public_deps = [ ":svg" ]
43 }
44 }
45
Ben Wagner3d9ab7e2021-03-16 14:29:20 -040046 skia_source_set("tests") {
Florin Malitab3418102020-10-15 18:10:29 -040047 testonly = true
48
Ben Wagner3d9ab7e2021-03-16 14:29:20 -040049 configs = [ "../..:skia_private" ]
Tyler Denniston080001c2021-05-05 09:51:12 -040050 sources = [
51 "tests/Filters.cpp",
52 "tests/Text.cpp",
53 ]
Florin Malitab3418102020-10-15 18:10:29 -040054
55 deps = [
Florin Malitadec78022020-12-17 16:36:54 -050056 ":svg",
Derek Sollenbergere2f62452020-12-17 19:21:28 +000057 "../..:skia",
Ben Wagnerbded42a2021-02-17 22:14:34 -050058 "../..:test",
Florin Malitab3418102020-10-15 18:10:29 -040059 ]
Florin Malitab3418102020-10-15 18:10:29 -040060 }
61 }
62} else {
63 group("svg") {
64 }
Florin Malitadec78022020-12-17 16:36:54 -050065 group("tests") {
66 }
Florin Malitab3418102020-10-15 18:10:29 -040067}