Files
sh d3a72473e9 nodejs: add and fix windows (#6581)
* simplex-chat-nodejs: adjust binding.gyp for windows

* simplex-chat-nodejs: different library linkage for windows

* simplex-chat-nodejs: remove non-moving GC in Windows

"non-moving GC is broken on windows with GHC 9.4-9.6.3" from:

https://github.com/simplex-chat/simplex-chat/blob/master/apps/multiplatform/common/src/commonMain/cpp/desktop/simplex-api.c#L11-L17

* ci: add windows to release-nodejs-libs

* simplex-chat-nodejs: same curl flags for dll.def download
2026-01-15 16:36:35 +00:00

51 lines
1.2 KiB
Python

{
"targets": [
{
"target_name": "simplex",
"sources": [ "cpp/simplex.cc" ],
"include_dirs": [
"<!@(node -p \"require('node-addon-api').include\")"
],
"dependencies": [
"<!(node -p \"require('node-addon-api').gyp\")"
],
"cflags!": [ "-fno-exceptions" ],
"cflags_cc!": [ "-fno-exceptions" ],
"defines": [ "NAPI_DISABLE_CPP_EXCEPTIONS" ],
"conditions": [
["OS=='mac'", {
"libraries": [
"-L<(module_root_dir)/libs",
"-lsimplex"
],
"xcode_settings": {
"OTHER_LDFLAGS": [
"-Wl,-rpath,@loader_path/../../libs"
]
}
}],
["OS=='linux'", {
"libraries": [
"-L<(module_root_dir)/libs",
"-lsimplex"
],
"ldflags": [
"-Wl,-rpath,'$$ORIGIN'/../../libs"
]
}],
["OS=='win'", {
"libraries": [
"<(module_root_dir)/libs/libsimplex.lib"
],
"copies": [{
"destination": "<(PRODUCT_DIR)",
"files": [
"<(module_root_dir)/libs/*"
]
}]
}]
]
}
]
}