forked from tree-sitter/node-tree-sitter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
binding.gyp
80 lines (80 loc) · 1.86 KB
/
binding.gyp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{
"targets": [
{
"target_name": "tree_sitter_runtime_binding",
"dependencies": ["tree_sitter"],
"sources": [
"src/binding.cc",
"src/conversions.cc",
"src/language.cc",
"src/logger.cc",
"src/node.cc",
"src/parser.cc",
"src/query.cc",
"src/tree.cc",
"src/tree_cursor.cc",
"src/util.cc",
],
"include_dirs": [
"vendor/tree-sitter/lib/include",
"<!(node -e \"require('nan')\")",
],
'cflags': [
'-std=c++17'
],
'cflags_cc': [
'-std=c++17'
],
'conditions': [
['OS=="mac"', {
'xcode_settings': {
'MACOSX_DEPLOYMENT_TARGET': '10.9',
'CLANG_CXX_LANGUAGE_STANDARD': 'c++17',
'CLANG_CXX_LIBRARY': 'libc++',
},
}],
['OS=="win"', {
'msvs_settings': {
'VCCLCompilerTool': {
'AdditionalOptions': [
'/std:c++17',
],
'RuntimeLibrary': 0,
},
},
}],
['OS == "linux"', {
'cflags_cc': [
'-Wno-cast-function-type'
]
}],
['runtime=="electron"', {
'defines': ['NODE_RUNTIME_ELECTRON=1']
}],
],
},
{
"target_name": "tree_sitter",
'type': 'static_library',
"sources": [
"vendor/tree-sitter/lib/src/lib.c"
],
"include_dirs": [
"vendor/tree-sitter/lib/src",
"vendor/tree-sitter/lib/include",
],
"cflags": [
"-std=c99"
]
}
],
'variables': {
'runtime%': 'node',
'openssl_fips': '',
'v8_enable_pointer_compression%': 0,
'v8_enable_31bit_smis_on_64bit_arch%': 0,
},
'conditions': [
['runtime=="electron"', { 'defines': ['NODE_RUNTIME_ELECTRON=1'] }],
]
}