diff options
author | murgatroid99 <mlumish@google.com> | 2016-02-01 11:19:07 -0800 |
---|---|---|
committer | murgatroid99 <mlumish@google.com> | 2016-02-03 09:36:39 -0800 |
commit | 673f65be1430c609a29a9310d71929f79184d97e (patch) | |
tree | 19c0bb6536b7318ad790177b55b38d78a3274bd6 /binding.gyp | |
parent | ed00b0366d9022bdfe47bbf4c0b4bff1bf03d195 (diff) |
Add working Node artifact builder for all platforms
Diffstat (limited to 'binding.gyp')
-rw-r--r-- | binding.gyp | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/binding.gyp b/binding.gyp index 651c2e13af..c8048327fe 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' @@ -731,7 +735,8 @@ 'xcode_settings': { 'MACOSX_DEPLOYMENT_TARGET': '10.9', 'OTHER_CFLAGS': [ - '-stdlib=libc++' + '-stdlib=libc++', + '-std=c++11' ] } }], |