only build non-prod skottie/sksg code in our tree
This this is enough to get Fuchsia going?
Change-Id: Id6577ee6b4e3c2cbae5ec8c42f3e004712ea477c
Reviewed-on: https://skia-review.googlesource.com/c/163442
Reviewed-by: Sanjay Chouksey <sanjayc@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@google.com>
diff --git a/modules/skottie/BUILD.gn b/modules/skottie/BUILD.gn
index b9db721..a572751 100644
--- a/modules/skottie/BUILD.gn
+++ b/modules/skottie/BUILD.gn
@@ -28,36 +28,56 @@
}
}
-source_set("tests") {
- if (skia_enable_skottie) {
- testonly = true
+if (defined(is_skia_standalone)) {
+ source_set("tests") {
+ if (skia_enable_skottie) {
+ testonly = true
- configs += [
- "../..:skia_private",
- "../..:tests_config",
- ]
- sources = [
- "src/SkottieTest.cpp",
- ]
+ configs += [
+ "../..:skia_private",
+ "../..:tests_config",
+ ]
+ sources = [
+ "src/SkottieTest.cpp",
+ ]
- deps = [
- ":skottie",
- "../..:gpu_tool_utils",
- "../..:skia",
- ]
+ deps = [
+ ":skottie",
+ "../..:gpu_tool_utils",
+ "../..:skia",
+ ]
+ }
}
-}
-source_set("fuzz") {
- if (skia_enable_skottie) {
+ source_set("fuzz") {
+ if (skia_enable_skottie) {
+ testonly = true
+
+ configs += [ "../..:skia_private" ]
+ sources = [
+ "fuzz/FuzzSkottieJSON.cpp",
+ ]
+
+ deps = [
+ "../..:skia",
+ ]
+
+ public_deps = [
+ ":skottie",
+ ]
+ }
+ }
+
+ source_set("tool") {
testonly = true
configs += [ "../..:skia_private" ]
sources = [
- "fuzz/FuzzSkottieJSON.cpp",
+ "src/SkottieTool.cpp",
]
deps = [
+ "../..:flags",
"../..:skia",
]
@@ -65,43 +85,25 @@
":skottie",
]
}
-}
-source_set("tool") {
- testonly = true
+ source_set("gm") {
+ if (skia_enable_skottie) {
+ testonly = true
- configs += [ "../..:skia_private" ]
- sources = [
- "src/SkottieTool.cpp",
- ]
+ # would be nice to have a gm_config
+ include_dirs = [ "../../gm" ]
- deps = [
- "../..:flags",
- "../..:skia",
- ]
+ configs += [ "../..:skia_private" ]
+ sources = [
+ "gm/SkottieGM.cpp",
+ ]
- public_deps = [
- ":skottie",
- ]
-}
-
-source_set("gm") {
- if (skia_enable_skottie) {
- testonly = true
-
- # would be nice to have a gm_config
- include_dirs = [ "../../gm" ]
-
- configs += [ "../..:skia_private" ]
- sources = [
- "gm/SkottieGM.cpp",
- ]
-
- deps = [
- ":skottie",
- "../..:gpu_tool_utils",
- "../..:skia",
- "../..:tool_utils",
- ]
+ deps = [
+ ":skottie",
+ "../..:gpu_tool_utils",
+ "../..:skia",
+ "../..:tool_utils",
+ ]
+ }
}
}
diff --git a/modules/sksg/BUILD.gn b/modules/sksg/BUILD.gn
index 85ce81c..48e380c 100644
--- a/modules/sksg/BUILD.gn
+++ b/modules/sksg/BUILD.gn
@@ -17,38 +17,40 @@
]
}
-source_set("tests") {
- testonly = true
-
- configs += [
- "../..:skia_private",
- "../..:tests_config", # TODO: refactor to make this nicer
- ]
- sources = [
- "tests/SGTest.cpp",
- ]
- deps = [
- ":sksg",
- "../..:gpu_tool_utils", # TODO: refactor to make this nicer
- "../..:skia",
- ]
-}
-
-source_set("samples") {
- if (target_cpu != "wasm") { # TODO: clean up wasm test
+if (defined(is_skia_standalone)) {
+ source_set("tests") {
testonly = true
configs += [
"../..:skia_private",
- "../..:samples_config", # TODO: refactor to make this nicer
+ "../..:tests_config", # TODO: refactor to make this nicer
]
sources = [
- "samples/SampleSVGPong.cpp",
+ "tests/SGTest.cpp",
]
deps = [
":sksg",
+ "../..:gpu_tool_utils", # TODO: refactor to make this nicer
"../..:skia",
- "../..:samples",
]
}
+
+ source_set("samples") {
+ if (target_cpu != "wasm") { # TODO: clean up wasm test
+ testonly = true
+
+ configs += [
+ "../..:skia_private",
+ "../..:samples_config", # TODO: refactor to make this nicer
+ ]
+ sources = [
+ "samples/SampleSVGPong.cpp",
+ ]
+ deps = [
+ ":sksg",
+ "../..:samples",
+ "../..:skia",
+ ]
+ }
+ }
}