aboutsummaryrefslogtreecommitdiff
path: root/binding.gyp
diff options
context:
space:
mode:
Diffstat (limited to 'binding.gyp')
-rw-r--r--binding.gyp23
1 files changed, 17 insertions, 6 deletions
diff --git a/binding.gyp b/binding.gyp
index 6ae7c31..016165a 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -2,18 +2,29 @@
"targets": [
{
"target_name": "tree_sitter_gsp_binding",
+ "dependencies": [
+ "<!(node -p \"require('node-addon-api').targets\"):node_addon_api_except",
+ ],
"include_dirs": [
- "<!(node -e \"require('nan')\")",
- "src"
+ "src",
],
"sources": [
"bindings/node/binding.cc",
"src/parser.c",
- # If your language uses an external scanner, add it here.
+ # NOTE: if your language has an external scanner, add it here.
+ ],
+ "conditions": [
+ ["OS!='win'", {
+ "cflags_c": [
+ "-std=c11",
+ ],
+ }, { # OS == "win"
+ "cflags_c": [
+ "/std:c11",
+ "/utf-8",
+ ],
+ }],
],
- "cflags_c": [
- "-std=c99",
- ]
}
]
}