OLD | NEW |
1 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
6 'variables': { | 6 'variables': { |
7 'chromium_code': 1, | 7 'chromium_code': 1, |
8 'out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out/remoting/proto', | |
9 }, | 8 }, |
10 'targets': [ | 9 'targets': [ |
11 { | 10 { |
12 # Protobuf compiler / generate rule for trace.proto. | 11 'target_name': 'trace_proto_lib', |
13 'target_name': 'trace_proto', | 12 'type': 'static_library', |
14 'type': 'none', | |
15 'sources': [ | 13 'sources': [ |
16 'trace.proto', | 14 'trace.proto', |
17 ], | 15 ], |
18 'rules': [ | 16 'variables': { |
19 { | 17 'proto_out_dir': 'remoting/proto', |
20 'rule_name': 'genproto', | |
21 'extension': 'proto', | |
22 'inputs': [ | |
23 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', | |
24 ], | |
25 'outputs': [ | |
26 '<(PRODUCT_DIR)/pyproto/<(RULE_INPUT_ROOT)_pb/' | |
27 '<(RULE_INPUT_ROOT)_pb2.py', | |
28 '<(out_dir)/<(RULE_INPUT_ROOT).pb.cc', | |
29 '<(out_dir)/<(RULE_INPUT_ROOT).pb.h', | |
30 ], | |
31 'action': [ | |
32 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', | |
33 '--proto_path=.', | |
34 './<(RULE_INPUT_ROOT)<(RULE_INPUT_EXT)', | |
35 '--cpp_out=<(out_dir)', | |
36 '--python_out=<(PRODUCT_DIR)/pyproto/<(RULE_INPUT_ROOT)_pb', | |
37 ], | |
38 'message': 'Generating C++ and Python code from <(RULE_INPUT_PATH)', | |
39 }, | |
40 ], | |
41 'dependencies': [ | |
42 '<(DEPTH)/third_party/protobuf/protobuf.gyp:protoc#host', | |
43 ], | |
44 # This target exports a hard dependency because it generates header | |
45 # files. | |
46 'hard_dependency': 1, | |
47 }, | |
48 | |
49 { | |
50 'target_name': 'trace_proto_lib', | |
51 'type': 'static_library', | |
52 'export_dependent_settings': [ | |
53 '<(DEPTH)/third_party/protobuf/protobuf.gyp:protobuf_lite', | |
54 'trace_proto', | |
55 ], | |
56 'dependencies': [ | |
57 '<(DEPTH)/third_party/protobuf/protobuf.gyp:protobuf_lite', | |
58 'trace_proto', | |
59 ], | |
60 # This target exports a hard dependency because depedents require | |
61 # chromotocol_proto to compile. | |
62 'hard_dependency': 1, | |
63 'direct_dependent_settings': { | |
64 'include_dirs': [ | |
65 '<(SHARED_INTERMEDIATE_DIR)/protoc_out', | |
66 ], | |
67 }, | 18 }, |
68 'sources': [ | 19 'includes': ['../../build/protoc.gypi'], |
69 '<(out_dir)/trace.pb.cc', | |
70 '<(out_dir)/trace.pb.h', | |
71 ], | |
72 }, | 20 }, |
73 ], | 21 ], |
74 } | 22 } |
OLD | NEW |