[skottie/sksg] Move source files list to .gni
To facilitate Chromium integration.
Change-Id: Ie6a08e90feda4c6deace9754f0baef7176882334
Reviewed-on: https://skia-review.googlesource.com/145146
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
diff --git a/modules/skottie/BUILD.gn b/modules/skottie/BUILD.gn
index afa2769..8f8c60a 100644
--- a/modules/skottie/BUILD.gn
+++ b/modules/skottie/BUILD.gn
@@ -16,21 +16,10 @@
source_set("skottie") {
if (skia_enable_skottie) {
+ import("skottie.gni")
public_configs = [ ":public_config" ]
- public = [
- "include/Skottie.h",
- ]
- sources = [
- "src/Skottie.cpp",
- "src/SkottieAdapter.cpp",
- "src/SkottieAdapter.h",
- "src/SkottieAnimator.cpp",
- "src/SkottieAnimator.h",
- "src/SkottieJson.cpp",
- "src/SkottieJson.h",
- "src/SkottieValue.cpp",
- "src/SkottieValue.h",
- ]
+ public = skia_skottie_public
+ sources = skia_skottie_sources
configs += [ "../../:skia_private" ]
deps = [
"../..:skia",
diff --git a/modules/skottie/skottie.gni b/modules/skottie/skottie.gni
new file mode 100644
index 0000000..9205ad5
--- /dev/null
+++ b/modules/skottie/skottie.gni
@@ -0,0 +1,22 @@
+# Copyright 2018 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Things are easiest for everyone if these source paths are absolute.
+_src = get_path_info("src", "abspath")
+_include = get_path_info("include", "abspath")
+
+skia_skottie_public = [ "$_include/Skottie.h" ]
+
+skia_skottie_sources = [
+ "$_src/Skottie.cpp",
+ "$_src/SkottieAdapter.cpp",
+ "$_src/SkottieAdapter.h",
+ "$_src/SkottieAnimator.cpp",
+ "$_src/SkottieAnimator.h",
+ "$_src/SkottieJson.cpp",
+ "$_src/SkottieJson.h",
+ "$_src/SkottieValue.cpp",
+ "$_src/SkottieValue.h",
+]
diff --git a/modules/sksg/BUILD.gn b/modules/sksg/BUILD.gn
index bb0561c..d1527f4 100644
--- a/modules/sksg/BUILD.gn
+++ b/modules/sksg/BUILD.gn
@@ -8,33 +8,9 @@
}
source_set("sksg") {
+ import("sksg.gni")
public_configs = [ ":public_config" ]
- sources = [
- "src/SkSGClipEffect.cpp",
- "src/SkSGColor.cpp",
- "src/SkSGDraw.cpp",
- "src/SkSGEffectNode.cpp",
- "src/SkSGGeometryNode.cpp",
- "src/SkSGGeometryTransform.cpp",
- "src/SkSGGradient.cpp",
- "src/SkSGGroup.cpp",
- "src/SkSGImage.cpp",
- "src/SkSGInvalidationController.cpp",
- "src/SkSGMaskEffect.cpp",
- "src/SkSGMerge.cpp",
- "src/SkSGNode.cpp",
- "src/SkSGOpacityEffect.cpp",
- "src/SkSGPaintNode.cpp",
- "src/SkSGPath.cpp",
- "src/SkSGPlane.cpp",
- "src/SkSGRect.cpp",
- "src/SkSGRenderNode.cpp",
- "src/SkSGRoundEffect.cpp",
- "src/SkSGScene.cpp",
- "src/SkSGText.cpp",
- "src/SkSGTransform.cpp",
- "src/SkSGTrimEffect.cpp",
- ]
+ sources = skia_sksg_sources
configs += [ "../../:skia_private" ]
deps = [
"../..:skia",
diff --git a/modules/sksg/sksg.gni b/modules/sksg/sksg.gni
new file mode 100644
index 0000000..bb60344
--- /dev/null
+++ b/modules/sksg/sksg.gni
@@ -0,0 +1,34 @@
+# Copyright 2018 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Things are easiest for everyone if these source paths are absolute.
+_src = get_path_info("src", "abspath")
+
+skia_sksg_sources = [
+ "$_src/SkSGClipEffect.cpp",
+ "$_src/SkSGColor.cpp",
+ "$_src/SkSGDraw.cpp",
+ "$_src/SkSGEffectNode.cpp",
+ "$_src/SkSGGeometryNode.cpp",
+ "$_src/SkSGGeometryTransform.cpp",
+ "$_src/SkSGGradient.cpp",
+ "$_src/SkSGGroup.cpp",
+ "$_src/SkSGImage.cpp",
+ "$_src/SkSGInvalidationController.cpp",
+ "$_src/SkSGMaskEffect.cpp",
+ "$_src/SkSGMerge.cpp",
+ "$_src/SkSGNode.cpp",
+ "$_src/SkSGOpacityEffect.cpp",
+ "$_src/SkSGPaintNode.cpp",
+ "$_src/SkSGPath.cpp",
+ "$_src/SkSGPlane.cpp",
+ "$_src/SkSGRect.cpp",
+ "$_src/SkSGRenderNode.cpp",
+ "$_src/SkSGRoundEffect.cpp",
+ "$_src/SkSGScene.cpp",
+ "$_src/SkSGText.cpp",
+ "$_src/SkSGTransform.cpp",
+ "$_src/SkSGTrimEffect.cpp",
+]