-
Notifications
You must be signed in to change notification settings - Fork 48
/
binding.gyp
68 lines (68 loc) · 2.2 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
{
'includes': [ 'common.gypi' ],
'variables': {
# Includes we don't want warnings for.
'system_includes': [
'-isystem <(module_root_dir)/<!(node -e \'require("nan")\')',
'-isystem <(module_root_dir)/mason_packages/.link/include',
'-isystem <(module_root_dir)/mason_packages/.link/include/or-tools'
]
},
'targets': [
{
'target_name': 'action_before_build',
'type': 'none',
'hard_dependency': 1,
'actions': [
{
'action_name': 'install-deps',
'inputs': ['./scripts/install-deps.sh'],
'outputs': ['./mason_packages'],
'action': ['./scripts/install-deps.sh']
}
]
},
{
'target_name': '<(module_name)',
'product_dir': '<(module_path)',
'dependencies': [ 'action_before_build' ],
'link_settings': {
'libraries': [
'<(module_root_dir)/mason_packages/.link/lib/libortools.a',
'<(module_root_dir)/mason_packages/.link/lib/libprotobuf.a',
'<(module_root_dir)/mason_packages/.link/lib/libgflags.a',
'-lz',
],
},
'sources': [
'src/main.cc',
'src/tsp.cc',
'src/vrp.cc',
],
'ldflags': [
'-Wl,-z,now'
],
'conditions': [
['OS == "linux"', {
'cflags': [
'<@(system_includes)'
]
}]
],
'xcode_settings': {
'OTHER_LDFLAGS':[
'-Wl,-bind_at_load'
],
'OTHER_CPLUSPLUSFLAGS': [
'<@(system_includes)'
],
'GCC_ENABLE_CPP_RTTI': 'YES',
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'MACOSX_DEPLOYMENT_TARGET':'10.8',
'CLANG_CXX_LIBRARY': 'libc++',
'CLANG_CXX_LANGUAGE_STANDARD':'c++14',
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0'
}
},
],
}