From 6838e3ce7117aee80df733367e87655a58b1a46b Mon Sep 17 00:00:00 2001 From: "grt@chromium.org" Date: Fri, 11 Oct 2013 20:16:22 +0000 Subject: Mojo C++ bindings This CL includes code for a static library that supports C++ bindings to the Mojo message format. A sample interface with "generated" bindings is included in the sample/ folder along with sample_test.cc that shows how the generated code may be used. This is a WIP but seems worth snapshotting as is. See the TODO file for a list of near term improvements, most notably testing. Originally reviewed at https://codereview.chromium.org/23913008/ Then subsequently at https://codereview.chromium.org/27034003/ TBR=grt@chromium.org Review URL: https://codereview.chromium.org/27064002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228240 0039d316-1c4b-4281-b951-d872f2087c98 --- mojo/mojo.gyp | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) (limited to 'mojo/mojo.gyp') diff --git a/mojo/mojo.gyp b/mojo/mojo.gyp index ae6d37f..74d7f8b 100644 --- a/mojo/mojo.gyp +++ b/mojo/mojo.gyp @@ -72,7 +72,6 @@ 'MOJO_SYSTEM_IMPLEMENTATION', ], 'sources': [ - 'public/system/core.h', 'system/core.cc', 'system/core_impl.cc', 'system/core_impl.h', @@ -141,6 +140,14 @@ 'shell/switches.cc', 'shell/switches.h', ], + 'conditions': [ + ['OS == "win"', { + # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. + 'msvs_disabled_warnings': [ + 4267, + ], + }], + ], }, { 'target_name': 'sample_app', @@ -153,5 +160,41 @@ 'shell/sample_app.cc', ], }, + { + 'target_name': 'mojo_bindings', + 'type': 'static_library', + 'include_dirs': [ + '..' + ], + 'sources': [ + 'public/bindings/lib/bindings.h', + 'public/bindings/lib/bindings_internal.h', + 'public/bindings/lib/bindings_serialization.cc', + 'public/bindings/lib/bindings_serialization.h', + 'public/bindings/lib/buffer.cc', + 'public/bindings/lib/buffer.h', + 'public/bindings/lib/message.cc', + 'public/bindings/lib/message.h', + 'public/bindings/lib/message_builder.cc', + 'public/bindings/lib/message_builder.h', + ], + }, + { + 'target_name': 'mojo_bindings_test', + 'type': 'executable', + 'include_dirs': [ + '..' + ], + 'dependencies': [ + 'mojo_bindings', + ], + 'sources': [ + 'public/bindings/sample/generated/sample_service.h', + 'public/bindings/sample/generated/sample_service_proxy.cc', + 'public/bindings/sample/generated/sample_service_serialization.h', + 'public/bindings/sample/generated/sample_service_stub.cc', + 'public/bindings/sample/sample_test.cc', + ], + }, ], } -- cgit v1.1