diff options
author | Konstantin Pavlov <thresh@nginx.com> | 2023-09-26 16:14:21 -0700 |
---|---|---|
committer | Konstantin Pavlov <thresh@nginx.com> | 2023-09-26 16:14:21 -0700 |
commit | f1ce2a5ac2ba3266d525544445366fae538d7194 (patch) | |
tree | cebb4477c96415ec5124eae8322932b14b04a09d /src/nodejs/unit-http/binding_pub.gyp | |
parent | 43f140dfd318378f330ff019bb2a37c94d8f885c (diff) | |
download | unit-f1ce2a5ac2ba3266d525544445366fae538d7194.tar.gz unit-f1ce2a5ac2ba3266d525544445366fae538d7194.tar.bz2 |
Node.js: provide reasonable default paths for macOS.
Diffstat (limited to '')
-rw-r--r-- | src/nodejs/unit-http/binding_pub.gyp | 25 |
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"] }] |