Revert "Only configure the SSL library in one place."
This reverts commit r7378, which broke Windows compile targets elsewhere. R=kjellander@webrtc.org TBR=henrike@webrtc.org BUG=chromium:413497 Review URL: https://webrtc-codereview.appspot.com/28679004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7384 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
6ed1cf49f0
commit
77d5a57e5c
@ -40,7 +40,7 @@ config("openssl_config") {
|
||||
]
|
||||
}
|
||||
|
||||
config("nss_config") {
|
||||
config("no_openssl_config") {
|
||||
defines = [
|
||||
"SSL_USE_NSS",
|
||||
"HAVE_NSS_SSL_H",
|
||||
@ -463,30 +463,24 @@ static_library("webrtc_base") {
|
||||
"opensslstreamadapter.h",
|
||||
]
|
||||
} else {
|
||||
public_configs += [ ":nss_config" ]
|
||||
if (rtc_build_ssl) {
|
||||
if (build_with_chromium) {
|
||||
deps += [ "//crypto:platform" ]
|
||||
} else {
|
||||
deps += [ "//net/third_party/nss/ssl:libssl" ]
|
||||
if (is_linux) {
|
||||
deps += [ ":linux_system_ssl" ]
|
||||
} else {
|
||||
deps += [
|
||||
"//third_party/nss:nspr",
|
||||
"//third_party/nss:nss",
|
||||
]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
configs += [ "external_ssl_library" ]
|
||||
}
|
||||
public_configs += [ ":no_openssl_config" ]
|
||||
sources += [
|
||||
"nssidentity.cc",
|
||||
"nssidentity.h",
|
||||
"nssstreamadapter.cc",
|
||||
"nssstreamadapter.h",
|
||||
]
|
||||
if (is_mac || is_ios || is_win) {
|
||||
if (rtc_build_ssl) {
|
||||
deps += [
|
||||
"//net/third_party/nss/ssl:libssl",
|
||||
"//third_party/nss:nspr",
|
||||
"//third_party/nss:nss",
|
||||
]
|
||||
} else {
|
||||
configs += [ "external_ssl_library" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (is_android) {
|
||||
@ -522,9 +516,13 @@ static_library("webrtc_base") {
|
||||
|
||||
if (is_linux) {
|
||||
libs += [
|
||||
"crypto",
|
||||
"dl",
|
||||
"rt",
|
||||
]
|
||||
if (rtc_build_ssl) {
|
||||
configs += [ "//third_party/nss:system_nss_no_ssl_config" ]
|
||||
}
|
||||
}
|
||||
|
||||
if (is_mac) {
|
||||
@ -595,4 +593,16 @@ static_library("webrtc_base") {
|
||||
"linux.h",
|
||||
]
|
||||
}
|
||||
|
||||
if (is_posix && !is_mac && !is_ios && !is_android) {
|
||||
if (build_with_chromium) {
|
||||
deps += [ "//crypto:platform" ]
|
||||
} else {
|
||||
if (rtc_build_ssl) {
|
||||
deps += [ ":linux_system_ssl" ]
|
||||
} else {
|
||||
configs += [ "external_ssl_library" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,25 +23,6 @@
|
||||
],
|
||||
}],
|
||||
],
|
||||
'variables': {
|
||||
'openssl_sources': [
|
||||
'openssl.h',
|
||||
'openssladapter.cc',
|
||||
'openssladapter.h',
|
||||
'openssldigest.cc',
|
||||
'openssldigest.h',
|
||||
'opensslidentity.cc',
|
||||
'opensslidentity.h',
|
||||
'opensslstreamadapter.cc',
|
||||
'opensslstreamadapter.h',
|
||||
],
|
||||
'nss_sources': [
|
||||
'nssidentity.cc',
|
||||
'nssidentity.h',
|
||||
'nssstreamadapter.cc',
|
||||
'nssstreamadapter.h',
|
||||
],
|
||||
},
|
||||
'targets': [
|
||||
{
|
||||
# Temporary target until Chromium's
|
||||
@ -501,52 +482,48 @@
|
||||
'../overrides/webrtc/base/logging.h',
|
||||
],
|
||||
}],
|
||||
['use_legacy_ssl_defaults==1', {
|
||||
# SSL backend is set via sslconfig.h. Pull in both NSS and OpenSSL
|
||||
# support code. The appropriate set is configured via preprocessor
|
||||
# defines.
|
||||
['use_openssl==1', {
|
||||
'defines': [
|
||||
'SSL_USE_OPENSSL',
|
||||
'HAVE_OPENSSL_SSL_H',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'defines': [
|
||||
'SSL_USE_OPENSSL',
|
||||
'HAVE_OPENSSL_SSL_H',
|
||||
],
|
||||
},
|
||||
'sources': [
|
||||
'<@(openssl_sources)',
|
||||
'<@(nss_sources)',
|
||||
'openssl.h',
|
||||
'openssladapter.cc',
|
||||
'openssladapter.h',
|
||||
'openssldigest.cc',
|
||||
'openssldigest.h',
|
||||
'opensslidentity.cc',
|
||||
'opensslidentity.h',
|
||||
'opensslstreamadapter.cc',
|
||||
'opensslstreamadapter.h',
|
||||
],
|
||||
'conditions': [
|
||||
['build_ssl!=1', {
|
||||
['build_ssl==1', {
|
||||
'dependencies': [
|
||||
'<(DEPTH)/third_party/boringssl/boringssl.gyp:boringssl',
|
||||
],
|
||||
}, {
|
||||
'include_dirs': [
|
||||
'<(ssl_root)',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}, {
|
||||
'sources': [
|
||||
'nssidentity.cc',
|
||||
'nssidentity.h',
|
||||
'nssstreamadapter.cc',
|
||||
'nssstreamadapter.h',
|
||||
],
|
||||
'conditions': [
|
||||
['use_openssl==1', {
|
||||
# Configure for OpenSSL/BoringSSL.
|
||||
'defines': [
|
||||
'SSL_USE_OPENSSL',
|
||||
'HAVE_OPENSSL_SSL_H',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'defines': [
|
||||
'SSL_USE_OPENSSL',
|
||||
'HAVE_OPENSSL_SSL_H',
|
||||
],
|
||||
},
|
||||
'sources': [
|
||||
'<@(openssl_sources)',
|
||||
],
|
||||
'conditions': [
|
||||
# Pull in the external or bundled OpenSSL as appropriate.
|
||||
['build_ssl==1', {
|
||||
'dependencies': [
|
||||
'<(DEPTH)/third_party/boringssl/boringssl.gyp:boringssl',
|
||||
],
|
||||
}, {
|
||||
'include_dirs': [
|
||||
'<(ssl_root)',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}, {
|
||||
# Configure for NSS.
|
||||
['use_legacy_ssl_defaults!=1', {
|
||||
'defines': [
|
||||
'SSL_USE_NSS',
|
||||
'HAVE_NSS_SSL_H',
|
||||
@ -559,28 +536,14 @@
|
||||
'SSL_USE_NSS_RNG',
|
||||
],
|
||||
},
|
||||
'sources': [
|
||||
'<@(nss_sources)',
|
||||
],
|
||||
}],
|
||||
['OS=="mac" or OS=="ios" or OS=="win"', {
|
||||
'conditions': [
|
||||
# Pull in the external or bundled NSS as appropriate.
|
||||
['build_ssl==1', {
|
||||
'dependencies': [
|
||||
'<(DEPTH)/net/third_party/nss/ssl.gyp:libssl',
|
||||
],
|
||||
'conditions': [
|
||||
# On some platforms, the rest of NSS is bundled. On others,
|
||||
# it's pulled from the system.
|
||||
['OS == "mac" or OS == "ios" or OS == "win"', {
|
||||
'dependencies': [
|
||||
'<(DEPTH)/third_party/nss/nss.gyp:nspr',
|
||||
'<(DEPTH)/third_party/nss/nss.gyp:nss',
|
||||
],
|
||||
}, {
|
||||
'dependencies': [
|
||||
'<(DEPTH)/build/linux/system.gyp:ssl',
|
||||
],
|
||||
}],
|
||||
'<(DEPTH)/third_party/nss/nss.gyp:nspr',
|
||||
'<(DEPTH)/third_party/nss/nss.gyp:nss',
|
||||
],
|
||||
}, {
|
||||
'include_dirs': [
|
||||
@ -592,6 +555,14 @@
|
||||
],
|
||||
}],
|
||||
['OS == "android"', {
|
||||
'defines': [
|
||||
'HAVE_OPENSSL_SSL_H'
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'defines': [
|
||||
'HAVE_OPENSSL_SSL_H'
|
||||
],
|
||||
},
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'-llog',
|
||||
@ -599,6 +570,20 @@
|
||||
],
|
||||
},
|
||||
}, {
|
||||
'conditions': [
|
||||
['use_legacy_ssl_defaults!=1', {
|
||||
'defines': [
|
||||
'HAVE_NSS_SSL_H',
|
||||
'SSL_USE_NSS_RNG',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'defines': [
|
||||
'HAVE_NSS_SSL_H',
|
||||
'SSL_USE_NSS_RNG',
|
||||
],
|
||||
},
|
||||
}],
|
||||
],
|
||||
'sources!': [
|
||||
'ifaddrs-android.cc',
|
||||
'ifaddrs-android.h',
|
||||
@ -640,6 +625,21 @@
|
||||
'-lrt',
|
||||
],
|
||||
},
|
||||
'conditions': [
|
||||
['build_ssl==1', {
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")',
|
||||
],
|
||||
},
|
||||
'cflags': [
|
||||
'<!@(<(pkg-config) --cflags nss)',
|
||||
],
|
||||
'ldflags': [
|
||||
'<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}, {
|
||||
'sources!': [
|
||||
'dbus.cc',
|
||||
@ -755,6 +755,19 @@
|
||||
'linux.h',
|
||||
],
|
||||
}],
|
||||
['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
|
||||
'conditions': [
|
||||
['build_ssl==1', {
|
||||
'dependencies': [
|
||||
'<(DEPTH)/build/linux/system.gyp:ssl',
|
||||
],
|
||||
}, {
|
||||
'include_dirs': [
|
||||
'<(ssl_root)',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user