summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKonstantin Pavlov <thresh@nginx.com>2023-09-26 16:14:21 -0700
committerKonstantin Pavlov <thresh@nginx.com>2023-09-26 16:14:21 -0700
commitf1ce2a5ac2ba3266d525544445366fae538d7194 (patch)
treecebb4477c96415ec5124eae8322932b14b04a09d
parent43f140dfd318378f330ff019bb2a37c94d8f885c (diff)
downloadunit-f1ce2a5ac2ba3266d525544445366fae538d7194.tar.gz
unit-f1ce2a5ac2ba3266d525544445366fae538d7194.tar.bz2
Node.js: provide reasonable default paths for macOS.
-rw-r--r--src/nodejs/unit-http/binding_pub.gyp25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/nodejs/unit-http/binding_pub.gyp b/src/nodejs/unit-http/binding_pub.gyp
index 3c39933a..3dadf4a5 100644
--- a/src/nodejs/unit-http/binding_pub.gyp
+++ b/src/nodejs/unit-http/binding_pub.gyp
@@ -7,9 +7,28 @@
['OS=="mac"', {
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES'
- }
- }]
- ],
+ },
+ 'conditions': [
+ [ 'target_arch=="arm64"', {
+ 'include_dirs': [
+ '/opt/homebrew/include'
+ ],
+ 'libraries' : [
+ '-L/opt/homebrew/lib',
+ '-lunit'
+ ],
+ }],
+ ['target_arch=="x64"', {
+ 'include_dirs': [
+ '/usr/local/include',
+ ],
+ 'libraries' : [
+ '-L/usr/local/lib',
+ '-lunit'
+ ],
+ }]
+ ]}
+ ]],
'sources': ["unit.cpp", "addon.cpp"],
'libraries': ["-lunit"]
}]