-
Notifications
You must be signed in to change notification settings - Fork 10
/
binding.gyp
112 lines (112 loc) · 2.87 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
{
"targets": [
{
"target_name": "<(module_name)",
"variables": {
"lua_include": "",
"lib_dirs": ""
},
"conditions": [
[
"OS=='win'",
{
"include_dirs": [
"<(module_root_dir)/3rdlibs/LuaJIT/src"
],
"library_dirs": [
"./win64luajit"
],
"libraries": [
"lua51.lib"
],
"actions": [
{
'action_name': 'move_lua',
'inputs': [
'<(module_root_dir)/win64luajit/lua51.dll'
],
'outputs': [
'<(module_root_dir)/build/Release/lua51.dll'
],
'action': [
'copy',
'<(module_root_dir)/win64luajit/lua51.dll',
'<(module_root_dir)/build/Release/lua51.dll'
]
}
],
}
],
[
'OS=="mac"',
{
"include_dirs": [
"<(module_root_dir)/maclualib/include"
],
"libraries": [
"<(module_root_dir)/maclualib/lib/liblua.a"
],
"actions": [
],
"cflags": [
"-std=c++11",
"-stdlib=libc++"
],
"xcode_settings": {
"CLANG_CXX_LANGUAGE_STANDARD": "c++0x",
"CLANG_CXX_LIBRARY": "libc++"
}
}
],
[
'OS=="linux"',
{
"include_dirs": [
"<(module_root_dir)/3rdlibs/LuaJIT/src"
],
"library_dirs": [
"<(module_root_dir)/3rdlibs/LuaJIT/src"
],
"libraries": [
"<(module_root_dir)/3rdlibs/LuaJIT/src/libluajit.so"
],
"actions": [
]
}
]
],
"sources": [
"src/utils.cc",
"src/luastate.cc",
"src/nodelua.cc",
"src/MyLuaWorker.cpp",
"src/MyWorkerQueue.cpp",
"src/MyLuaState.cpp",
"3rdlibs/lua-cjson/fpconv.c",
"3rdlibs/lua-cjson/lua_cjson.c",
"3rdlibs/lua-cjson/strbuf.c"
],
"include_dirs": [
"<!@(node -p \"require('node-addon-api').include\")"
],
"dependencies": [
"<!(node -p \"require('node-addon-api').gyp\")"
],
"defines": [
"NAPI_VERSION=<(napi_build_version)",
"NAPI_DISABLE_CPP_EXCEPTIONS",
]
},
{
"target_name": "action_after_build",
"type": "none",
"dependencies": [ "<(module_name)" ],
"copies": [
{
"files": [ "<(PRODUCT_DIR)/<(module_name).node" ],
"destination": "<(module_path)"
}
]
}
]
}