diff --git a/binding.gyp b/binding.gyp index 8cc62cc..71d54e8 100644 --- a/binding.gyp +++ b/binding.gyp @@ -11,6 +11,13 @@ "." ], "libraries": [ "<(module_root_dir)/libchdb.so" ], + "conditions": [ + ['OS=="mac"', { + "ldflags": [ + "-Wl,-rpath,@loader_path/../../" + ] + }] + ], "cflags!": [ "-fno-exceptions" ], "cflags_cc!": [ "-fno-exceptions" ], "defines": [ "NAPI_DISABLE_CPP_EXCEPTIONS" ]