-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbinding.gyp
83 lines (83 loc) · 2.18 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
{
"variables": {
"Canvas_Src%": "<!(node find_canvas.js)"
},
"conditions": [
['OS=="win"', {
"variables": {
"GTK_Root%": "C:/GTK"
}
}]
],
"targets": [
{
"target_name": "canvaswebp",
"sources": [
"webp.cc"
],
"include_dirs" : [
"<!(node -e \"require('nan')\")",
"<(Canvas_Src)/src",
"libwebp"
],
"cflags": [
"-std=c++14"
],
"cflags_cc!": [
"-std=gnu++0x" # Allow -std=c++14 to prevail
],
"xcode_settings": {
"GCC_VERSION": "com.apple.compilers.llvm.clang.1_0",
"CLANG_CXX_LANGUAGE_STANDARD": "c++14",
"CLANG_CXX_LIBRARY": "libc++",
},
"conditions": [
# Canvas dependencies:
['OS=="win"', {
"libraries": [
'-l<(GTK_Root)/lib/cairo.lib'
],
"include_dirs": [
'<(GTK_Root)/include',
'<(GTK_Root)/include/cairo',
'<(GTK_Root)/include/pango-1.0',
'<(GTK_Root)/include/glib-2.0',
'<(GTK_Root)/include/freetype2',
'<(GTK_Root)/lib/glib-2.0/include'
]
}, { # not windows
"libraries": [
"<!@(pkg-config cairo --libs)",
"<!@(pkg-config pangocairo --libs)"
],
"include_dirs": [
"<!@(pkg-config cairo --cflags-only-I | sed s/-I//g)",
"<!@(pkg-config pangocairo --cflags-only-I | sed s/-I//g)"
]
}],
# Canvas:
['OS=="win"', {
"libraries": ['-l<(Canvas_Src)/build/Release/canvas.lib']
}, {
"libraries": ["<(Canvas_Src)/build/Release/canvas.node"]
}],
# The libwebp library:
['OS=="win"', {
"conditions": [
['target_arch=="ia32"', {
"libraries": ['-l../libwebp/win32/libwebp.lib']
}, {
"libraries": ['-l../libwebp/win64/libwebp.lib']
}]
]
}],
['OS=="linux"', {
"libraries": ["../libwebp/linux-x86_64/libwebp.a"]
}],
['OS=="mac"', {
"libraries": ["../libwebp/mac/libwebp.a"]
}]
]
}
]
}