| Index: third_party/protobuf/protobuf.gyp
|
| diff --git a/third_party/protobuf/protobuf.gyp b/third_party/protobuf/protobuf.gyp
|
| index 6b060f2d5c6efad576562b588fbc8b5e2580159d..5aa2b4f6b278ee41ea34c014670e49c10ff6c58e 100644
|
| --- a/third_party/protobuf/protobuf.gyp
|
| +++ b/third_party/protobuf/protobuf.gyp
|
| @@ -24,7 +24,47 @@
|
| 'WIN32_LEAN_AND_MEAN', # Protobuf defines this itself.
|
| ],
|
| },
|
| - }]
|
| + }],
|
| + ['OS=="ios"', {
|
| + 'variables': {
|
| + 'ninja_output_dir': 'ninja-protoc',
|
| + 'ninja_product_dir':
|
| + '<(DEPTH)/xcodebuild/<(ninja_output_dir)/<(CONFIGURATION_NAME)',
|
| + # Gyp to rerun
|
| + 're_run_targets': [
|
| + 'third_party/protobuf/protobuf.gyp',
|
| + ],
|
| + },
|
| + 'targets': [
|
| + {
|
| + # On iOS, generating protoc is done via two actions: (1) compiling
|
| + # the executable with ninja, and (2) copying the executable into a
|
| + # location that is shared with other projects. These actions are
|
| + # separated into two targets in order to be able to specify that the
|
| + # second action should not run until the first action finishes (since
|
| + # the ordering of multiple actions in one target is defined only by
|
| + # inputs and outputs, and it's impossible to set correct inputs for
|
| + # the ninja build, so setting all the inputs and outputs isn't an
|
| + # option). The first target is given here; the second target is the
|
| + # normal protoc target under the condition that "OS==iOS".
|
| + 'target_name': 'compile_protoc',
|
| + 'type': 'none',
|
| + 'includes': ['../../build/ios/mac_build.gypi'],
|
| + 'actions': [
|
| + {
|
| + 'action_name': 'compile protoc',
|
| + 'inputs': [],
|
| + 'outputs': [],
|
| + 'action': [
|
| + '<@(ninja_cmd)',
|
| + 'protoc',
|
| + ],
|
| + 'message': 'Generating the C++ protocol buffers compiler',
|
| + },
|
| + ],
|
| + },
|
| + ],
|
| + }],
|
| ],
|
| 'targets': [
|
| # The "lite" lib is about 1/7th the size of the heavy lib,
|
| @@ -236,26 +276,11 @@
|
| ],
|
| }, { # else, OS=="ios"
|
| 'type': 'none',
|
| - 'variables': {
|
| - 'ninja_output_dir': 'ninja-protoc',
|
| - # Gyp to rerun
|
| - 're_run_targets': [
|
| - 'third_party/protobuf/protobuf.gyp',
|
| - ],
|
| - },
|
| - 'includes': ['../../build/ios/mac_build.gypi'],
|
| + 'dependencies': [
|
| + 'compile_protoc',
|
| + ],
|
| 'actions': [
|
| {
|
| - 'action_name': 'compile protoc',
|
| - 'inputs': [],
|
| - 'outputs': [],
|
| - 'action': [
|
| - '<@(ninja_cmd)',
|
| - 'protoc',
|
| - ],
|
| - 'message': 'Generating the C++ protocol buffers compiler',
|
| - },
|
| - {
|
| 'action_name': 'copy protoc',
|
| 'inputs': [
|
| '<(ninja_product_dir)/protoc',
|
|
|