From f26aee7e46206ca137026863fd6f3d2d69d6474c Mon Sep 17 00:00:00 2001 From: shum Date: Mon, 5 Jan 2026 10:46:38 +0000 Subject: [PATCH] simplex-chat-nodejs: fix library loading on Mac --- packages/simplex-chat-nodejs/binding.gyp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) 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" + ] + }] ] } ]