Florin Malita | 3b526b0 | 2018-05-25 12:43:51 -0400 | [diff] [blame] | 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 | |
| 6 | declare_args() { |
| 7 | skia_enable_sksg = true |
| 8 | } |
| 9 | |
| 10 | config("public_config") { |
| 11 | if (skia_enable_sksg) { |
| 12 | defines = [ "SK_HAS_SKSG" ] |
| 13 | include_dirs = [ "include" ] |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | source_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 Osman | ccb8752 | 2018-06-01 19:20:00 +0000 | [diff] [blame] | 53 | source_set("tests") { |
Florin Malita | 3b526b0 | 2018-05-25 12:43:51 -0400 | [diff] [blame] | 54 | 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 Osman | ccb8752 | 2018-06-01 19:20:00 +0000 | [diff] [blame] | 72 | source_set("samples") { |
Florin Malita | 50d9c94 | 2018-05-25 13:42:45 -0400 | [diff] [blame] | 73 | if (skia_enable_sksg && target_cpu != "wasm") { # TODO: clean up wasm test |
Florin Malita | 3b526b0 | 2018-05-25 12:43:51 -0400 | [diff] [blame] | 74 | 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 | } |