This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 108
/
binding.gyp
129 lines (129 loc) · 4.05 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
{
'variables': {
'conditions': [
['OS=="mac"', {
'spellchecker_use_hunspell%': 'true',
}],
['OS=="linux"', {
'spellchecker_use_hunspell': 'true',
}],
['OS=="win"', {
'spellchecker_use_hunspell': 'true',
}],
],
},
'target_defaults': {
'cflags_cc': ['-std=c++11'],
'conditions': [
['OS=="win"', {
'msvs_disabled_warnings': [
4267, # conversion from 'size_t' to 'int', possible loss of data
4530, # C++ exception handler used, but unwind semantics are not enabled
4506, # no definition for inline function
],
}],
['OS=="mac"', {
'xcode_settings': {
'CLANG_CXX_LIBRARY': 'libc++',
'CLANG_CXX_LANGUAGE_STANDARD': 'c++11'
}
}]
],
},
'targets': [
{
'target_name': 'spellchecker',
'include_dirs': [ '<!(node -e "require(\'nan\')")' ],
'sources': [
'src/main.cc',
'src/worker.cc'
],
'conditions': [
['spellchecker_use_hunspell=="true"', {
'dependencies': [
'hunspell',
],
'sources': [
'src/spellchecker_hunspell.cc',
],
}],
['OS=="win"', {
'sources': [
'src/spellchecker_win.cc',
'src/transcoder_win.cc',
],
}],
['OS=="linux"', {
'sources': [
'src/spellchecker_linux.cc',
'src/transcoder_posix.cc',
],
}],
['OS=="mac"', {
'sources': [
'src/spellchecker_mac.mm',
'src/transcoder_posix.cc',
],
'link_settings': {
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
],
},
}],
],
},
],
'conditions': [
['spellchecker_use_hunspell=="true"', {
'targets': [
{
'target_name': 'hunspell',
'type': 'static_library',
'msvs_guid': 'D5E8DCB2-9C61-446F-8BEE-B18CA0E0936E',
'defines': [
'HUNSPELL_STATIC',
],
'sources': [
'vendor/hunspell/src/hunspell/affentry.cxx',
'vendor/hunspell/src/hunspell/affentry.hxx',
'vendor/hunspell/src/hunspell/affixmgr.cxx',
'vendor/hunspell/src/hunspell/affixmgr.hxx',
'vendor/hunspell/src/hunspell/atypes.hxx',
'vendor/hunspell/src/hunspell/baseaffix.hxx',
'vendor/hunspell/src/hunspell/csutil.cxx',
'vendor/hunspell/src/hunspell/csutil.hxx',
'vendor/hunspell/src/hunspell/dictmgr.cxx',
'vendor/hunspell/src/hunspell/dictmgr.hxx',
'vendor/hunspell/src/hunspell/filemgr.cxx',
'vendor/hunspell/src/hunspell/filemgr.hxx',
'vendor/hunspell/src/hunspell/hashmgr.cxx',
'vendor/hunspell/src/hunspell/hashmgr.hxx',
'vendor/hunspell/src/hunspell/htypes.hxx',
'vendor/hunspell/src/hunspell/hunspell.cxx',
'vendor/hunspell/src/hunspell/hunspell.h',
'vendor/hunspell/src/hunspell/hunspell.hxx',
'vendor/hunspell/src/hunspell/hunzip.cxx',
'vendor/hunspell/src/hunspell/hunzip.hxx',
'vendor/hunspell/src/hunspell/langnum.hxx',
'vendor/hunspell/src/hunspell/phonet.cxx',
'vendor/hunspell/src/hunspell/phonet.hxx',
'vendor/hunspell/src/hunspell/replist.cxx',
'vendor/hunspell/src/hunspell/replist.hxx',
'vendor/hunspell/src/hunspell/suggestmgr.cxx',
'vendor/hunspell/src/hunspell/suggestmgr.hxx',
'vendor/hunspell/src/hunspell/utf_info.hxx',
'vendor/hunspell/src/hunspell/w_char.hxx',
'vendor/hunspell/src/parsers/textparser.cxx',
'vendor/hunspell/src/parsers/textparser.hxx',
],
'direct_dependent_settings': {
'defines': [
'HUNSPELL_STATIC',
'USE_HUNSPELL',
],
},
}
],
}],
],
}