forked from anaisbetts/node-system-idle-time
-
Notifications
You must be signed in to change notification settings - Fork 1
/
binding.gyp
63 lines (63 loc) · 1.45 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
{
"targets": [{
"target_name": "system_idle_time",
"sources": [
"src/module.cc"
],
"include_dirs": [
"<!(node -e \"require('nan')\")"
],
"conditions": [
['OS=="mac"', {
"defines": [
"OS=1"
],
"sources": [
"src/mac/idle.cc"
],
"xcode_settings": {
"OTHER_CPLUSPLUSFLAGS": ["-std=c++11", "-stdlib=libc++", "-mmacosx-version-min=10.7"],
"OTHER_LDFLAGS": ["-framework CoreFoundation -framework IOKit"]
}
}],
['OS=="win"', {
"defines": [
"OS=2"
],
"sources": [
"src/win/idle.cc"
],
"msvs_settings": {
"VCLinkerTool": {
# Don't print a linker warning when no imports from either .exe are used.
"AdditionalOptions": ["/ignore:4199"],
},
}
}],
['OS=="linux"', {
"defines": [
"OS=3"
],
'variables': {
'pkg-config': 'pkg-config'
},
"sources": [
"src/linux/idle.cc"
],
'direct_dependent_settings': {
'cflags': [
'<!@(<(pkg-config) --cflags x11 xext xscrnsaver)',
],
},
'link_settings': {
'ldflags': [
'<!@(<(pkg-config) --libs-only-other --libs-only-L x11 xext xscrnsaver)',
],
'libraries': [
'<!@(<(pkg-config) --libs-only-l x11 xext xscrnsaver)',
],
},
}]
]
}]
}