blob: 5fb45bcabfe0b54ae6e54761f2cac60e0a6f1cb3 [file] [log] [blame]
Florin Malita3b526b02018-05-25 12:43:51 -04001# 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
6declare_args() {
7 skia_enable_sksg = true
8}
9
10config("public_config") {
11 if (skia_enable_sksg) {
12 defines = [ "SK_HAS_SKSG" ]
13 include_dirs = [ "include" ]
14 }
15}
16
17source_set("sksg") {
18 if (skia_enable_sksg) {
19 public_configs = [ ":public_config" ]
20 sources = [
21 "src/SkSGClipEffect.cpp",
22 "src/SkSGColor.cpp",
23 "src/SkSGDraw.cpp",
24 "src/SkSGEffectNode.cpp",
25 "src/SkSGGeometryNode.cpp",
26 "src/SkSGGeometryTransform.cpp",
27 "src/SkSGGradient.cpp",
28 "src/SkSGGroup.cpp",
29 "src/SkSGImage.cpp",
30 "src/SkSGInvalidationController.cpp",
31 "src/SkSGMaskEffect.cpp",
32 "src/SkSGMerge.cpp",
33 "src/SkSGNode.cpp",
34 "src/SkSGOpacityEffect.cpp",
35 "src/SkSGPaintNode.cpp",
36 "src/SkSGPath.cpp",
37 "src/SkSGPlane.cpp",
38 "src/SkSGRect.cpp",
39 "src/SkSGRenderNode.cpp",
40 "src/SkSGRoundEffect.cpp",
41 "src/SkSGScene.cpp",
42 "src/SkSGText.cpp",
43 "src/SkSGTransform.cpp",
44 "src/SkSGTrimEffect.cpp",
45 ]
46 configs += [ "../../:skia_private" ]
47 deps = [
48 "../..:skia",
49 ]
50 }
51}
52
Brian Osmanccb87522018-06-01 19:20:00 +000053source_set("tests") {
Florin Malita3b526b02018-05-25 12:43:51 -040054 if (skia_enable_sksg) {
55 testonly = true
56
57 configs += [
58 "../..:skia_private",
59 "../..:tests_config", # TODO: refactor to make this nicer
60 ]
61 sources = [
62 "tests/SGTest.cpp",
63 ]
64 deps = [
65 ":sksg",
66 "../..:gpu_tool_utils", # TODO: refactor to make this nicer
67 "../..:skia",
68 ]
69 }
70}
71
Brian Osmanccb87522018-06-01 19:20:00 +000072source_set("samples") {
Florin Malita50d9c942018-05-25 13:42:45 -040073 if (skia_enable_sksg && target_cpu != "wasm") { # TODO: clean up wasm test
Florin Malita3b526b02018-05-25 12:43:51 -040074 testonly = true
75
76 configs += [
77 "../..:skia_private",
78 "../..:samples_config", # TODO: refactor to make this nicer
79 ]
80 sources = [
81 "samples/SampleSVGPong.cpp",
82 ]
83 deps = [
84 ":sksg",
85 "../..:gm", # TODO: refactor to make this nicer
86 "../..:skia",
87 "../..:views", # TODO: refactor to make this nicer
88 ]
89 }
90}