Skip to content

Commit

Permalink
Makes it possible to prevent some third party libraries (jsoncpp and …
Browse files Browse the repository at this point in the history
…openssl) from being linked. This makes it possible to link webrtc with external implementations of those libraries in case the project depending on webrtc requires another version of those libraries.

BUG=3379
R=wu@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/17699005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6455 4adac7df-926f-26a2-2b94-8c16560cd09d
  • Loading branch information
henrike@webrtc.org committed Jun 16, 2014
1 parent 53f5793 commit 9f36c08
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 12 deletions.
70 changes: 58 additions & 12 deletions webrtc/base/base.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,22 @@
],
},
}, {
'dependencies': [
'<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
'conditions': [
['external_libraries==0', {
'dependencies': [
'<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
],
}, {
'include_dirs': [
'<(json_root)',
],
'defines': [
# When defined changes the include path for json.h to where it
# is expected to be when building json outside of the standalone
# build.
'WEBRTC_EXTERNAL',
],
}],
],
'sources!': [
'../overrides/webrtc/base/basictypes.h',
Expand All @@ -474,8 +488,16 @@
'HAVE_OPENSSL_SSL_H',
],
},
'dependencies': [
'<(DEPTH)/third_party/openssl/openssl.gyp:openssl',
'conditions': [
['external_libraries==0', {
'dependencies': [
'<(DEPTH)/third_party/openssl/openssl.gyp:openssl',
],
}, {
'include_dirs': [
'<(ssl_root)',
],
}],
],
}, {
'defines': [
Expand Down Expand Up @@ -533,8 +555,16 @@
],
},
},
'dependencies': [
'<(DEPTH)/net/third_party/nss/ssl.gyp:libssl',
'conditions': [
['external_libraries==0', {
'dependencies': [
'<(DEPTH)/net/third_party/nss/ssl.gyp:libssl',
]
}, {
'include_dirs': [
'<(ssl_root)',
],
}],
],
}],
['OS=="linux"', {
Expand Down Expand Up @@ -693,15 +723,31 @@
],
}],
['OS == "mac" or OS == "ios" or OS == "win"', {
'dependencies': [
'<(DEPTH)/net/third_party/nss/ssl.gyp:libssl',
'<(DEPTH)/third_party/nss/nss.gyp:nspr',
'<(DEPTH)/third_party/nss/nss.gyp:nss',
'conditions': [
['external_libraries==0', {
'dependencies': [
'<(DEPTH)/net/third_party/nss/ssl.gyp:libssl',
'<(DEPTH)/third_party/nss/nss.gyp:nspr',
'<(DEPTH)/third_party/nss/nss.gyp:nss',
],
}, {
'include_dirs': [
'<(ssl_root)',
],
}],
],
}],
['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
'dependencies': [
'<(DEPTH)/build/linux/system.gyp:ssl',
'conditions': [
['external_libraries==0', {
'dependencies': [
'<(DEPTH)/build/linux/system.gyp:ssl',
],
}, {
'include_dirs': [
'<(ssl_root)',
],
}],
],
}],
],
Expand Down
6 changes: 6 additions & 0 deletions webrtc/build/common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@
'webrtc_vp8_dir%': '<(webrtc_vp8_dir)',
'include_opus%': '<(include_opus)',
'rbe_components_path%': '<(rbe_components_path)',
'external_libraries%': '0',
'json_root%': '<(DEPTH)/third_party/jsoncpp/source/include/',
# openssl needs to be defined or gyp will complain. Is is only used when
# when providing external libraries so just use current directory as a
# placeholder.
'ssl_root%': '.',

# The Chromium common.gypi we use treats all gyp files without
# chromium_code==1 as third party code. This disables many of the
Expand Down

0 comments on commit 9f36c08

Please sign in to comment.