You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by nk...@apache.org on 2022/06/21 08:11:30 UTC

[pulsar-client-node] branch master updated: chore: split conditions between OS in binding.gyp (#220)

This is an automated email from the ASF dual-hosted git repository.

nkurihar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-client-node.git


The following commit(s) were added to refs/heads/master by this push:
     new cec131c  chore: split conditions between OS in binding.gyp (#220)
cec131c is described below

commit cec131cc6f97178a249b579a804532b736c320ea
Author: Yuri Mizushima <yu...@yahoo-corp.jp>
AuthorDate: Tue Jun 21 17:11:26 2022 +0900

    chore: split conditions between OS in binding.gyp (#220)
---
 README.md   | 5 +++++
 binding.gyp | 6 +++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 400a489..e29339d 100644
--- a/README.md
+++ b/README.md
@@ -99,7 +99,12 @@ brew info libpulsar
 
 ```shell
 # for example
+## Intel x86_64
 export PULSAR_CPP_DIR=/usr/local/Cellar/libpulsar/2.9.1_1
+
+## Apple Silicon and Homebrew since 3.0.0
+## cf. https://brew.sh/2021/02/05/homebrew-3.0.0/
+export PULSAR_CPP_DIR=/opt/homebrew/Cellar/libpulsar/2.9.1_1
 ```
 
 ### Install on Linux
diff --git a/binding.gyp b/binding.gyp
index abeddfe..66f3d0a 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -67,6 +67,9 @@
           "libraries": [
             "<(pulsar_cpp_dir)/lib/libpulsar.dylib"
           ],
+          "dependencies": [
+            "<!@(node -p \"require('node-addon-api').gyp\")"
+          ],
         }],
         ['OS=="win"', {
           "defines": [
@@ -102,7 +105,8 @@
               ]
             }
           ]
-        }, {  # 'OS!="win"'
+        }],
+        ['OS!="mac" and OS!="win"', {
           "libraries": [
             "-lpulsar",
           ],