Repository navigation
Expand file tree
/
Copy pathbinding.gyp
More file actions
142 lines (141 loc) · 5.89 KB
/
Copy pathbinding.gyp
File metadata and controls
142 lines (141 loc) · 5.89 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
{
# Node 26's official Windows binary is built with ClangCL + ThinLTO, so its
# common.gypi injects `-flto=thin` and `/opt:lldltojobs=N` into the MSVC
# AdditionalOptions of every target. MSVC's link.exe rejects those
# Clang/lld-only options (LNK1117), which breaks the build on Windows +
# Node 26. Strip them with gyp's list-exclusion filter. This lives under
# msvs_settings, so it is inert on the make/xcode generators (Linux/macOS).
"target_defaults": {
"configurations": {
"Release": {
# Compile out the DEBUG()/LOG() tracing macros (src/macros.h).
# Neither node-gyp nor Node's common.gypi defines NDEBUG, so
# without this, debug tracing ends up in published prebuilts.
"defines": [ "NDEBUG" ],
"msvs_settings": {
"VCCLCompilerTool": {
"AdditionalOptions/": [ ["exclude", "flto"] ]
},
"VCLinkerTool": {
"AdditionalOptions/": [ ["exclude", "flto"], ["exclude", "lldltojobs"] ]
}
}
}
}
},
"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/fundamental.cc",
"src/gi.cc",
"src/gobject.cc",
"src/loop.cc",
"src/param_spec.cc",
"src/toggle_queue.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)"
}
]
}
]
}