-
Notifications
You must be signed in to change notification settings - Fork 0
/
binding.gyp
65 lines (65 loc) · 1.75 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
{
'includes': [ 'common.gypi' ],
'variables': {
'error_on_warnings%':'true',
# includes we don't want warnings for.
# As a variable to make easy to pass to
# cflags (linux) and xcode (mac)
'system_includes': [
"-isystem <(module_root_dir)/<!(node -e \"require('nan')\")",
"-isystem <(module_root_dir)/mason_packages/.link/include/"
]
},
'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' ],
'sources': [ './src/hello_world.cpp' ],
'include_dirs': [
'<!(node -e \'require("nan")\')'
],
'ldflags': [
'-Wl,-z,now',
],
'conditions': [
['error_on_warnings == "true"', {
'cflags_cc' : [ '-Werror' ],
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': [ '-Werror' ]
}
}]
],
'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++11',
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0'
}
}
]
}