aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkjellander <kjellander@webrtc.org>2016-01-13 05:46:58 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-13 13:47:07 +0000
commit292e192f17b5cf46a485cd497e92b6b11f492f7b (patch)
treee7305a6b9753ab706b30c24cdb876058b792e13c
parenta276e731683c673388cf3aeaa1888a5bcc3e1dc0 (diff)
downloadwebrtc-292e192f17b5cf46a485cd497e92b6b11f492f7b.tar.gz
Add build_protobuf variable.
This makes it possible to use protobuffers with an external protobuf library instead of the one that comes with the WebRTC code. NOTRY=True Review URL: https://codereview.webrtc.org/1589433002 Cr-Commit-Position: refs/heads/master@{#11236}
-rw-r--r--webrtc/build/common.gypi1
-rw-r--r--webrtc/build/protoc.gypi22
2 files changed, 14 insertions, 9 deletions
diff --git a/webrtc/build/common.gypi b/webrtc/build/common.gypi
index 9fa3ce3193..8d8583f9a4 100644
--- a/webrtc/build/common.gypi
+++ b/webrtc/build/common.gypi
@@ -91,6 +91,7 @@
'build_libyuv%': 1,
'build_openmax_dl%': 1,
'build_opus%': 1,
+ 'build_protobuf%': 1,
'build_ssl%': 1,
# Disable by default
diff --git a/webrtc/build/protoc.gypi b/webrtc/build/protoc.gypi
index 5e486f16c2..682bc22cc5 100644
--- a/webrtc/build/protoc.gypi
+++ b/webrtc/build/protoc.gypi
@@ -109,10 +109,6 @@
'process_outputs_as_sources': 1,
},
],
- 'dependencies': [
- '<(DEPTH)/third_party/protobuf/protobuf.gyp:protoc#host',
- '<(DEPTH)/third_party/protobuf/protobuf.gyp:protobuf_lite',
- ],
'include_dirs': [
'<(SHARED_INTERMEDIATE_DIR)/protoc_out',
'<(DEPTH)',
@@ -123,12 +119,20 @@
'<(DEPTH)',
]
},
- 'export_dependent_settings': [
- # The generated headers reference headers within protobuf_lite,
- # so dependencies must be able to find those headers too.
- '<(DEPTH)/third_party/protobuf/protobuf.gyp:protobuf_lite',
- ],
# This target exports a hard dependency because it generates header
# files.
'hard_dependency': 1,
+ 'conditions': [
+ ['build_protobuf==1', {
+ 'dependencies': [
+ '<(DEPTH)/third_party/protobuf/protobuf.gyp:protoc#host',
+ '<(DEPTH)/third_party/protobuf/protobuf.gyp:protobuf_lite',
+ ],
+ 'export_dependent_settings': [
+ # The generated headers reference headers within protobuf_lite,
+ # so dependencies must be able to find those headers too.
+ '<(DEPTH)/third_party/protobuf/protobuf.gyp:protobuf_lite',
+ ],
+ }],
+ ],
}