aboutsummaryrefslogtreecommitdiffhomepage
path: root/binding.gyp
diff options
context:
space:
mode:
Diffstat (limited to 'binding.gyp')
-rw-r--r--binding.gyp25
1 files changed, 15 insertions, 10 deletions
diff --git a/binding.gyp b/binding.gyp
index aa06024f70..e76ea54674 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -44,7 +44,10 @@
],
'conditions': [
['OS == "win"', {
- "include_dirs": [ "third_party/boringssl/include" ],
+ "include_dirs": [
+ "third_party/boringssl/include",
+ "third_party/zlib"
+ ],
"defines": [
'_WIN32_WINNT=0x0600',
'WIN32_LEAN_AND_MEAN',
@@ -63,19 +66,20 @@
"ws2_32"
]
}, { # OS != "win"
+ 'variables': {
+ 'config': '<!(echo $CONFIG)',
+ # The output of "node --version" is "v[version]". We use cut to
+ # remove the first character.
+ 'target%': '<!(node --version | cut -c2-)'
+ },
# Empirically, Node only exports ALPN symbols if its major version is >0.
# io.js always reports versions >0 and always exports ALPN symbols.
# Therefore, Node's major version will be truthy if and only if it
- # supports ALPN. The output of "node -v" is v[major].[minor].[patch],
- # like "v4.1.1" in a recent version. We use cut to split by period and
- # take the first field (resulting in "v[major]"), then use cut again
- # to take all but the first character, removing the "v".
+ # supports ALPN. The target is "[major].[minor].[patch]". We split by
+ # periods and take the first field to get the major version.
'defines': [
- 'TSI_OPENSSL_ALPN_SUPPORT=<!(node --version | cut -d. -f1 | cut -c2-)'
+ 'TSI_OPENSSL_ALPN_SUPPORT=<!(echo <(target) | cut -d. -f1)'
],
- 'variables': {
- 'config': '<!(echo $CONFIG)'
- },
'include_dirs': [
'<(node_root_dir)/deps/openssl/openssl/include',
'<(node_root_dir)/deps/zlib'
@@ -713,7 +717,8 @@
'xcode_settings': {
'MACOSX_DEPLOYMENT_TARGET': '10.9',
'OTHER_CFLAGS': [
- '-stdlib=libc++'
+ '-stdlib=libc++',
+ '-std=c++11'
]
}
}],