-
Notifications
You must be signed in to change notification settings - Fork 5
/
binding.gyp
53 lines (53 loc) · 1.21 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
{
'variables': {
'tclconfig%': '<!(tclsh gyp/tclconfig.tcl)'
},
'targets': [
{
'target_name': 'tcl',
'sources': [
'src/tclbinding.cpp',
],
'variables': {
'tclthreads': '<!(. <(tclconfig) && echo ${TCL_THREADS})',
'cxx': '<!(bash gyp/cxx.sh)'
},
'defines': [
'NAPI_DISABLE_CPP_EXCEPTIONS',
],
'conditions': [
[ 'OS=="mac"', {
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS' : ['-std=c++11','-stdlib=libc++'],
'OTHER_LDFLAGS': ['-stdlib=libc++'],
'MACOSX_DEPLOYMENT_TARGET': '10.7'
}
} ],
[ 'cxx!="false"', {
'cflags': ['-std=c++11'],
'defines': ['HAS_CXX11']
} ],
[ 'tclthreads==1', {
'defines': ['HAS_TCL_THREADS'],
'sources': ['src/tclworker.cpp']
} ],
[ 'tclthreads==1 and cxx!="false"', {
'sources': [
'src/taskrunner.cpp',
'src/asynchandler.cpp'
]
} ]
],
'include_dirs': [
'<!(. <(tclconfig) && echo ${TCL_INCLUDE_SPEC} | sed s/-I//g)',
'<!(node -p "require(\'node-addon-api\').include_dir")'
],
'dependencies': ["<!(node -p \"require('node-addon-api').gyp\")"],
'link_settings': {
'libraries': [
'<!(. <(tclconfig) && echo ${TCL_LIB_SPEC})'
]
}
}
]
}