summaryrefslogtreecommitdiffstats
path: root/remoting/proto/chromotocol.gyp
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-18 21:52:15 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-18 21:52:15 +0000
commit6fa9e6f0c0fd3a66789de9df381cc16c36ca6da1 (patch)
tree6d8c997b1d030068d380184b381ea8bb6c552a02 /remoting/proto/chromotocol.gyp
parentf8cc62e64f6c43deb5973cadecf74e63d7162410 (diff)
downloadchromium_src-6fa9e6f0c0fd3a66789de9df381cc16c36ca6da1.zip
chromium_src-6fa9e6f0c0fd3a66789de9df381cc16c36ca6da1.tar.gz
chromium_src-6fa9e6f0c0fd3a66789de9df381cc16c36ca6da1.tar.bz2
Unify gyp rules for running protoc.
- Add a protoc.gypi that can be gyp-included into any gyp file that wants to build .proto files. - Convert two remoting gyp files to use this new protoc.gypi. (Also fixes a bug in one of those remoting gyp files; a mistaken path was causing it to always rebuild under Xcode.) Review URL: http://codereview.chromium.org/7621073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97366 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/proto/chromotocol.gyp')
-rw-r--r--remoting/proto/chromotocol.gyp67
1 files changed, 5 insertions, 62 deletions
diff --git a/remoting/proto/chromotocol.gyp b/remoting/proto/chromotocol.gyp
index 0b45a7d..a1beb06 100644
--- a/remoting/proto/chromotocol.gyp
+++ b/remoting/proto/chromotocol.gyp
@@ -5,13 +5,11 @@
{
'variables': {
'chromium_code': 1,
- 'out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out/remoting/proto',
},
'targets': [
{
- # Protobuf compiler / generate rule for chromoting.proto.
- 'target_name': 'chromotocol_proto',
- 'type': 'none',
+ 'target_name': 'chromotocol_proto_lib',
+ 'type': 'static_library',
'sources': [
'auth.proto',
'control.proto',
@@ -19,65 +17,10 @@
'internal.proto',
'video.proto',
],
- 'rules': [
- {
- 'rule_name': 'genproto',
- 'extension': 'proto',
- 'inputs': [
- '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)',
- ],
- 'outputs': [
- '<(out_dir)/<(RULE_INPUT_ROOT).pb.cc',
- '<(out_dir)/<(RULE_INPUT_ROOT).pb.h',
- ],
- 'action': [
- '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)',
- '--proto_path=.',
- './<(RULE_INPUT_ROOT)<(RULE_INPUT_EXT)',
- '--cpp_out=<(out_dir)',
- ],
- 'message': 'Generating C++ and Python code from <(RULE_INPUT_PATH)',
- },
- ],
- 'dependencies': [
- '<(DEPTH)/third_party/protobuf/protobuf.gyp:protoc#host',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)/protoc_out',
- ],
+ 'variables': {
+ 'proto_out_dir': 'remoting/proto',
},
- # This target exports a hard dependency because it generates header
- # files.
- 'hard_dependency': 1,
- },
-
- {
- 'target_name': 'chromotocol_proto_lib',
- 'type': 'static_library',
- 'export_dependent_settings': [
- '<(DEPTH)/third_party/protobuf/protobuf.gyp:protobuf_lite',
- 'chromotocol_proto',
- ],
- 'dependencies': [
- '<(DEPTH)/third_party/protobuf/protobuf.gyp:protobuf_lite',
- 'chromotocol_proto',
- ],
- # This target exports a hard dependency because depedents require
- # chromotocol_proto to compile.
- 'hard_dependency': 1,
- 'sources': [
- '<(out_dir)/auth.pb.cc',
- '<(out_dir)/auth.pb.h',
- '<(out_dir)/control.pb.cc',
- '<(out_dir)/control.pb.h',
- '<(out_dir)/event.pb.cc',
- '<(out_dir)/event.pb.h',
- '<(out_dir)/internal.pb.cc',
- '<(out_dir)/internal.pb.h',
- '<(out_dir)/video.pb.cc',
- '<(out_dir)/video.pb.h',
- ],
+ 'includes': ['../../build/protoc.gypi'],
},
],
}