forked from atom/node-pathwatcher
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbinding.gyp
More file actions
159 lines (159 loc) · 5.64 KB
/
binding.gyp
File metadata and controls
159 lines (159 loc) · 5.64 KB
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
{
"targets": [
{
"target_name": "efsw",
"type": "static_library",
"sources": [
"./vendor/efsw/src/efsw/Debug.cpp",
"./vendor/efsw/src/efsw/DirWatcherGeneric.cpp",
"./vendor/efsw/src/efsw/DirectorySnapshot.cpp",
"./vendor/efsw/src/efsw/DirectorySnapshotDiff.cpp",
"./vendor/efsw/src/efsw/FileInfo.cpp",
"./vendor/efsw/src/efsw/FileSystem.cpp",
"./vendor/efsw/src/efsw/FileWatcher.cpp",
"./vendor/efsw/src/efsw/FileWatcherCWrapper.cpp",
"./vendor/efsw/src/efsw/FileWatcherFSEvents.cpp",
"./vendor/efsw/src/efsw/FileWatcherGeneric.cpp",
"./vendor/efsw/src/efsw/FileWatcherImpl.cpp",
"./vendor/efsw/src/efsw/FileWatcherInotify.cpp",
"./vendor/efsw/src/efsw/FileWatcherKqueue.cpp",
"./vendor/efsw/src/efsw/FileWatcherWin32.cpp",
"./vendor/efsw/src/efsw/Log.cpp",
"./vendor/efsw/src/efsw/Mutex.cpp",
"./vendor/efsw/src/efsw/String.cpp",
"./vendor/efsw/src/efsw/System.cpp",
"./vendor/efsw/src/efsw/Thread.cpp",
"./vendor/efsw/src/efsw/Watcher.cpp",
"./vendor/efsw/src/efsw/WatcherFSEvents.cpp",
"./vendor/efsw/src/efsw/WatcherGeneric.cpp",
"./vendor/efsw/src/efsw/WatcherInotify.cpp",
"./vendor/efsw/src/efsw/WatcherKqueue.cpp",
"./vendor/efsw/src/efsw/WatcherWin32.cpp"
],
"include_dirs": [
"./vendor/efsw/include",
"./vendor/efsw/src"
],
"conditions": [
["OS==\"win\"", {
"sources!": [
"./vendor/efsw/src/efsw/WatcherKqueue.cpp",
"./vendor/efsw/src/efsw/WatcherFSEvents.cpp",
"./vendor/efsw/src/efsw/WatcherInotify.cpp",
"./vendor/efsw/src/efsw/FileWatcherKqueue.cpp",
"./vendor/efsw/src/efsw/FileWatcherInotify.cpp",
"./vendor/efsw/src/efsw/FileWatcherFSEvents.cpp"
],
"sources": [
"./vendor/efsw/src/efsw/platform/win/FileSystemImpl.cpp",
"./vendor/efsw/src/efsw/platform/win/MutexImpl.cpp",
"./vendor/efsw/src/efsw/platform/win/SystemImpl.cpp",
"./vendor/efsw/src/efsw/platform/win/ThreadImpl.cpp"
],
}],
["OS!=\"win\"", {
"sources": [
"./vendor/efsw/src/efsw/platform/posix/FileSystemImpl.cpp",
"./vendor/efsw/src/efsw/platform/posix/MutexImpl.cpp",
"./vendor/efsw/src/efsw/platform/posix/SystemImpl.cpp",
"./vendor/efsw/src/efsw/platform/posix/ThreadImpl.cpp"
],
"cflags": ["-Wall", "-Wno-long-long"]
}],
["OS==\"linux\"", {
"sources!": [
"./vendor/efsw/src/efsw/WatcherKqueue.cpp",
"./vendor/efsw/src/efsw/WatcherFSEvents.cpp",
"./vendor/efsw/src/efsw/WatcherWin32.cpp",
"./vendor/efsw/src/efsw/FileWatcherKqueue.cpp",
"./vendor/efsw/src/efsw/FileWatcherWin32.cpp",
"./vendor/efsw/src/efsw/FileWatcherFSEvents.cpp"
],
"libraries": [
"-lpthread"
],
"defines": [
"EFSW_VERBOSE"
]
}],
["OS==\"mac\"", {
"sources!": [
"./vendor/efsw/src/efsw/WatcherInotify.cpp",
"./vendor/efsw/src/efsw/WatcherWin32.cpp",
"./vendor/efsw/src/efsw/FileWatcherInotify.cpp",
"./vendor/efsw/src/efsw/FileWatcherWin32.cpp"
],
"defines": [
"EFSW_FSEVENTS_SUPPORTED"
],
"xcode_settings": {
"OTHER_LDFLAGS": [
"-framework CoreFoundation -framework CoreServices"
]
}
}]
]
},
{
"target_name": "pathwatcher",
"defines": [
"NODE_API_SWALLOW_UNTHROWABLE_EXCEPTIONS"
],
"dependencies": ["efsw"],
"cflags!": ["-fno-exceptions"],
"cflags_cc!": ["-fno-exceptions"],
"xcode_settings": {
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
"CLANG_CXX_LIBRARY": "libc++",
"MACOSX_DEPLOYMENT_TARGET": "10.7",
},
"msvs_settings": {
"VCCLCompilerTool": {"ExceptionHandling": 1},
},
"sources": [
"lib/core.cc",
"lib/core.h"
],
"include_dirs": [
"<!(node -p \"require('node-addon-api').include_dir\")",
"vendor/efsw",
],
"conditions": [
['OS=="mac"', {
"sources+": [
"lib/platform/FSEventsFileWatcher.cpp",
"lib/platform/KqueueFileWatcher.cpp"
],
"defines+": [
"USE_KQUEUE"
]
}],
['OS=="win"', {
'msvs_settings': {
'VCCLCompilerTool': {
'ExceptionHandling': 1, # /EHsc
'WarnAsError': 'true',
},
},
'msvs_disabled_warnings': [
4018, # signed/unsigned mismatch
4244, # conversion from 'type1' to 'type2', possible loss of data
4267, # conversion from 'size_t' to 'type', possible loss of data
4530, # C++ exception handler used, but unwind semantics are not
# enabled
4506, # no definition for inline function
4577, # 'noexcept' used with no exception handling mode specified;
# termination on exception is not guaranteed
4996, # function was declared deprecated
2220, # warning treated as error - no object file generated
4309, # 'conversion' : truncation of constant value
4101, # unreferenced local variable
],
'defines': [
'_WIN32_WINNT=0x0600',
],
}] # OS=="win"
],
}
]
}