-
Notifications
You must be signed in to change notification settings - Fork 42
/
binding.gyp
116 lines (115 loc) · 4.65 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
{
"targets": [
{
"target_name": "node_gtk",
"sources": [
"src/async_call_environment.cc",
"src/async_call_wrapper.cc",
"src/boxed.cc",
"src/callback.cc",
"src/closure.cc",
"src/debug.cc",
"src/error.cc",
"src/function.cc",
"src/gi.cc",
"src/gobject.cc",
"src/loop.cc",
"src/param_spec.cc",
"src/type.cc",
"src/util.cc",
"src/value.cc",
"src/modules/system.cc",
"src/modules/cairo/cairo.cc",
"src/modules/cairo/context.cc",
"src/modules/cairo/font-extents.cc",
"src/modules/cairo/font-face.cc",
"src/modules/cairo/font-options.cc",
"src/modules/cairo/glyph.cc",
"src/modules/cairo/matrix.cc",
"src/modules/cairo/path.cc",
"src/modules/cairo/pattern.cc",
"src/modules/cairo/rectangle-int.cc",
"src/modules/cairo/rectangle.cc",
"src/modules/cairo/region.cc",
"src/modules/cairo/scaled-font.cc",
"src/modules/cairo/surface.cc",
"src/modules/cairo/text-cluster.cc",
"src/modules/cairo/text-extents.cc",
],
"include_dirs" : [
"<!(node -e \"require('nan')\")"
],
"conditions": [
['OS == "linux"', {
"defines": [
"PLATFORM_LINUX=1",
],
"cflags": [
"<!@(pkg-config --cflags gobject-introspection-1.0 cairo)",
"-Wall",
"-g",
],
"ldflags": [
"-Wl,-no-as-needed",
"<!@(pkg-config --libs gobject-introspection-1.0 cairo)",
],
}],
['OS == "mac"', {
"defines": [
"PLATFORM_MAC=1",
],
"xcode_settings": {
"OTHER_CFLAGS": [
"<!@(pkg-config --cflags glib-2.0 gobject-introspection-1.0 cairo)",
],
"OTHER_LDFLAGS": [
"<!@(pkg-config --libs gobject-introspection-1.0 cairo)",
]
},
}],
['OS == "win"', {
"defines": [
"PLATFORM_WIN=1",
],
"variables": {
# If MSYS2 is NOT installed in C:/msys64 run:
# $ export MINGW_WINDOWS_PATH=$(./windows/mingw_windows_path.sh)
# before compiling
"MINGW_PREFIX": "<!(bash -c 'echo ${MINGW_WINDOWS_PATH:-/msys64}')",
},
"include_dirs": [
# Don't include /mingw64/include directly.
# To make extra include dir run:
# $ ./windows/mingw_include_extra.sh
# before compiling
"<(MINGW_PREFIX)/mingw64/include/__extra__",
"<(MINGW_PREFIX)/mingw64/include/gobject-introspection-1.0",
"<(MINGW_PREFIX)/mingw64/include/glib-2.0",
"<(MINGW_PREFIX)/mingw64/lib/glib-2.0/include",
"<(MINGW_PREFIX)/mingw64/include/cairo",
"<(MINGW_PREFIX)/mingw64/include/freetype2",
],
"libraries": [
"<(MINGW_PREFIX)/mingw64/lib/libglib-2.0.dll.a",
"<(MINGW_PREFIX)/mingw64/lib/libgmodule-2.0.dll.a",
"<(MINGW_PREFIX)/mingw64/lib/libgobject-2.0.dll.a",
"<(MINGW_PREFIX)/mingw64/lib/libffi.dll.a",
"<(MINGW_PREFIX)/mingw64/lib/libgirepository-1.0.dll.a",
"<(MINGW_PREFIX)/mingw64/lib/libcairo.dll.a",
]
}]
]
},
{
"target_name": "action_after_build",
"type": "none",
"dependencies": [ "<(module_name)" ],
"copies": [
{
"files": [ "<(PRODUCT_DIR)/<(module_name).node" ],
"destination": "<(module_path)"
}
]
}
]
}