-
Notifications
You must be signed in to change notification settings - Fork 4
/
binding.gyp
129 lines (128 loc) · 3.68 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
{
'targets': [
{
'target_name': 'node-icu-tokenizer',
'sources': [ 'node-icu-tokenizer.cpp' ],
'cflags_cc': [
'-std=c++0x',
'-fexceptions',
'-Wall',
'-O3'
],
'xcode_settings': {
'CLANG_CXX_LANGUAGE_STANDARD': 'c++11',
'CLANG_CXX_LIBRARY': 'libc++',
'MACOSX_DEPLOYMENT_TARGET': '10.7',
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'GCC_ENABLE_CPP_RTTI': 'YES',
'OTHER_CPLUSPLUSFLAGS': [
'-fexceptions',
'-Wall',
'-O3'
]
},
'defines': [ 'NAPI_VERSION=3' ],
'dependencies': [
'<!(node -p "require(\'node-addon-api\').gyp")'
],
'include_dirs': [
"./includes/",
"<!@(node -p \"require('node-addon-api').include\")"
],
'conditions': [
['OS == "win"', {
'defines': [
'NAPI_DISABLE_CPP_EXCEPTIONS',
'NAPI_VERSION=3',
'VIPS_CPLUSPLUS_EXPORTS',
'_ALLOW_KEYWORD_MACROS',
'_FILE_OFFSET_BITS=64'
],
'libraries': [
'<(module_root_dir)/lib/icudt.lib',
'<(module_root_dir)/lib/icuin.lib',
'<(module_root_dir)/lib/icuio.lib',
'<(module_root_dir)/lib/icutest.lib',
'<(module_root_dir)/lib/icutu.lib',
'<(module_root_dir)/lib/icuuc.lib',
],
'msvs_disabled_warnings': [
4275
]
}],
['OS == "linux"', {
'defines': [
'_GLIBCXX_USE_CXX11_ABI=0'
],
'libraries': [
'<(module_root_dir)/lib/libicudata.so.60',
'<(module_root_dir)/lib/libicui18n.so.60',
'<(module_root_dir)/lib/libicuio.so.60',
# '<(module_root_dir)/lib/libicule.so.60',
'<(module_root_dir)/lib/libiculx.so.60',
'<(module_root_dir)/lib/libicutu.so.60',
'<(module_root_dir)/lib/libicuuc.so.60',
'-Wl,-s -Wl,--disable-new-dtags -Wl,-rpath=\'$${ORIGIN}/../../lib/\''
],
}],
['OS=="mac"', {
"libraries": ["<!@(icu-config --ldflags)"],
"cflags": ["<!(icu-config --cppflags)"],
"xcode_settings": {
"OTHER_CFLAGS": [
"<!(icu-config --cppflags)",
],
},
}]
],
'configurations': {
'Release': {
'conditions': [
['OS == "linux"', {
'cflags_cc': [
'-Wno-cast-function-type'
]
}],
['target_arch == "arm"', {
'cflags_cc': [
'-Wno-psabi'
]
}],
['OS == "win"', {
'msvs_settings': {
'VCCLCompilerTool': {
'DebugInformationFormat': 3, # Generate a PDB
'WarningLevel': 3,
'BufferSecurityCheck': 'true',
'ExceptionHandling': 1, # /EHsc
'SuppressStartupBanner': 'true',
'WarnAsError': 'false',
'RuntimeLibrary': '2',
'WholeProgramOptimization': 'true'
},
'VCLibrarianTool': {
'AdditionalOptions': [
'/LTCG:INCREMENTAL'
]
},
'VCLinkerTool': {
'ImageHasSafeExceptionHandlers': 'false',
'OptimizeReferences': 2,
'EnableCOMDATFolding': 2,
'LinkIncremental': 1,
'GenerateDebugInformation': 'true',
'AdditionalOptions': [
'/LTCG:INCREMENTAL'
]
}
},
'msvs_disabled_warnings': [
4275
]
}]
]
}
},
}
]
}