diff --git a/packages/simplex-chat-nodejs/binding.gyp b/packages/simplex-chat-nodejs/binding.gyp index 30e527ed14..fa72d9b1d2 100644 --- a/packages/simplex-chat-nodejs/binding.gyp +++ b/packages/simplex-chat-nodejs/binding.gyp @@ -7,8 +7,19 @@ "-L<(module_root_dir)/libs", "-lsimplex" ], - "ldflags": [ - "-Wl,-rpath,'$$ORIGIN'/../../libs" + "conditions": [ + ["OS=='mac'", { + "xcode_settings": { + "OTHER_LDFLAGS": [ + "-Wl,-rpath,@loader_path/../../libs" + ] + } + }], + ["OS=='linux'", { + "ldflags": [ + "-Wl,-rpath,'$$ORIGIN'/../../libs" + ] + }] ] } ]