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
|
--- a/third_party/electron_node/BUILD.gn
+++ b/third_party/electron_node/BUILD.gn
@@ -42,6 +42,18 @@
node_release_urlbase = ""
}
+if (is_linux) {
+ import("//build/config/linux/pkg_config.gni")
+
+ pkg_config("cares") {
+ packages = [ "libcares" ]
+ }
+
+ pkg_config("nghttp2") {
+ packages = [ "libnghttp2" ]
+ }
+}
+
assert(!node_use_dtrace, "node_use_dtrace not supported in GN")
assert(!node_use_etw, "node_use_etw not supported in GN")
assert(!node_use_perfctr, "node_use_perfctr not supported in GN")
@@ -128,10 +140,6 @@
component("node_lib") {
deps = [
":node_js2c",
- "deps/cares",
- "deps/http_parser",
- "deps/nghttp2",
- "deps/zlib",
"//v8:v8_libplatform",
]
public_deps = [
@@ -141,6 +149,21 @@
public_configs = [ ":node_lib_config" ]
include_dirs = [ "src" ]
libs = []
+ if (is_linux) {
+ configs += [
+ ":cares",
+ ":nghttp2",
+ ]
+ deps += [ "//third_party/zlib" ]
+ libs += [ "http_parser" ]
+ } else {
+ deps += [
+ "deps/cares",
+ "deps/http_parser",
+ "deps/nghttp2",
+ "deps/zlib",
+ ]
+ }
cflags_cc = [
"-Wno-deprecated-declarations",
"-Wno-implicit-fallthrough",
|