aboutsummaryrefslogtreecommitdiffhomepage
path: root/gyp
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2016-02-03 11:53:18 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-03 11:53:19 -0800
commit7a76f9c8f4de11e51b3495eec0d76be88a12adfa (patch)
tree83c20c951d1268988cf4f2c9ba37dde0e29771be /gyp
parent84de5c86f9189bef758118dc12e1d6e62d06cd38 (diff)
SkMojo: test linking Skia against the Mojo SDK
TODO: build on systems other than Linux. Add mojo_skd to the DEPS. Add a DM::Via called `mojo-`. everything is hidden behind the gyp variable `skia_mojo`. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1644043003 Review URL: https://codereview.chromium.org/1644043003
Diffstat (limited to 'gyp')
-rw-r--r--gyp/common_variables.gypi2
-rw-r--r--gyp/dm.gypi1
-rw-r--r--gyp/skmojo.gyp59
3 files changed, 62 insertions, 0 deletions
diff --git a/gyp/common_variables.gypi b/gyp/common_variables.gypi
index 7cf9660c16..ba4d203a59 100644
--- a/gyp/common_variables.gypi
+++ b/gyp/common_variables.gypi
@@ -38,6 +38,8 @@
'variables': { # level 1
'angle_path%': '../',
+ 'skia_mojo%': '0',
+
'variables': { # level 2
# Variables needed by conditions list within the level-2 variables dict.
diff --git a/gyp/dm.gypi b/gyp/dm.gypi
index bb21923c33..2fda486d89 100644
--- a/gyp/dm.gypi
+++ b/gyp/dm.gypi
@@ -51,5 +51,6 @@
[ 'skia_gpu == 1', {
'dependencies': [ 'gputest.gyp:skgputest' ],
}],
+ [ 'skia_mojo', { 'dependencies': [ 'skmojo.gyp:skmojo' ], } ],
],
}
diff --git a/gyp/skmojo.gyp b/gyp/skmojo.gyp
new file mode 100644
index 0000000000..63385cd2fa
--- /dev/null
+++ b/gyp/skmojo.gyp
@@ -0,0 +1,59 @@
+# Copyright 2016 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+{
+ 'targets': [
+ {
+ 'target_name': 'mojo',
+ 'type': 'static_library',
+ 'variables': { 'mojo_parent_dir': '../third_party/externals' },
+ 'include_dirs': [ '<(mojo_parent_dir)' ],
+ 'all_dependent_settings': { 'include_dirs': [ '<(mojo_parent_dir)' ] },
+ 'sources': [
+ '<!@(python find.py <(mojo_parent_dir)/mojo/public/cpp "*.cc")',
+ '<(mojo_parent_dir)/mojo/public/platform/native/system_thunks.c',
+ ],
+ 'sources!': [
+ '<!@(python find.py <(mojo_parent_dir)/mojo/public/cpp "*_unittest.cc")',
+ '<!@(python find.py <(mojo_parent_dir)/mojo/public/cpp "*_perftest.cc")',
+ '<!@(python find.py <(mojo_parent_dir)/mojo/public/cpp "*_apptest.cc")',
+ '<!@(python find.py <(mojo_parent_dir)/mojo/public/cpp "*_test_*.cc")',
+ '<!@(python find.py <(mojo_parent_dir)/mojo/public/cpp "*_win.cc")',
+ ],
+ },
+ {
+ 'target_name': 'skmojo',
+ 'type': 'static_library',
+ 'variables': {
+ 'mojo_dir': '../third_party/externals/mojo/public'
+ },
+ 'dependencies': [ 'mojo' ],
+ 'defines': [ 'SK_MOJO' ],
+ 'sources': [ '../experimental/mojo/SkMojo.mojom.cc', ],
+ 'include_dirs': [ '../experimental/mojo', ],
+ 'all_dependent_settings': {
+ 'include_dirs': [ '../experimental/mojo' ],
+ 'defines': [ 'SK_MOJO' ],
+ },
+ 'actions':[
+ {
+ 'action_name': 'generate_from_mojoms',
+ 'inputs': [
+ '../experimental/mojo/generate.py',
+ '../experimental/mojo/SkMojo.mojom',
+ '<(mojo_dir)/tools/bindings/mojom_parser/bin/linux64/mojom_parser.sha1',
+ '<(mojo_dir)/tools/bindings/mojom_bindings_generator.py',
+ '<(mojo_dir)/interfaces/bindings/interface_control_messages.mojom',
+ '<(mojo_dir)/interfaces/application/service_provider.mojom',
+ '<(mojo_dir)/interfaces/bindings/tests/ping_service.mojom',
+ '<(mojo_dir)/interfaces/application/application.mojom',
+ ],
+ 'outputs': ['../experimental/mojo/SkMojo.mojom.h',
+ '../experimental/mojo/SkMojo.mojom.cc'],
+ 'action': ['python', '../experimental/mojo/generate.py']
+ },
+ ],
+ },
+ ],
+}