fix: use zlib from electron_node (#75)
This commit is contained in:
Родитель
3349ef049f
Коммит
4d44266b78
7
BUILD.gn
7
BUILD.gn
|
@ -131,7 +131,7 @@ component("node_lib") {
|
|||
"deps/cares",
|
||||
"deps/http_parser",
|
||||
"deps/nghttp2",
|
||||
"//third_party/zlib",
|
||||
"deps/zlib",
|
||||
"//v8:v8_libplatform",
|
||||
]
|
||||
public_deps = [
|
||||
|
@ -278,9 +278,8 @@ foreach(header_group, node_files.headers) {
|
|||
|
||||
copy("zlib_headers") {
|
||||
sources = [
|
||||
"//third_party/zlib/names.h",
|
||||
"//third_party/zlib/zconf.h",
|
||||
"//third_party/zlib/zlib.h",
|
||||
"deps/zlib/zconf.h",
|
||||
"deps/zlib/zlib.h",
|
||||
]
|
||||
outputs = [
|
||||
"$node_headers_dir/include/node/{{source_file_part}}",
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
config("includes") {
|
||||
include_dirs = [ "." ]
|
||||
}
|
||||
|
||||
config("ignored_warnings") {
|
||||
if (is_win) {
|
||||
cflags = [
|
||||
"/wd4131", # old-style declarator
|
||||
"/wd4127", # conditional expression is constant
|
||||
"/wd4244", # possible loss of data on type conversion
|
||||
"/wd4996", # deprecated 'open'
|
||||
]
|
||||
} else {
|
||||
cflags = [
|
||||
"-Wno-implicit-function-declaration",
|
||||
"-Wno-shift-negative-value",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
source_set("zlib") {
|
||||
sources = [
|
||||
"adler32.c",
|
||||
"compress.c",
|
||||
"crc32.c",
|
||||
"crc32.h",
|
||||
"deflate.c",
|
||||
"deflate.h",
|
||||
"gzclose.c",
|
||||
"gzguts.h",
|
||||
"gzlib.c",
|
||||
"gzread.c",
|
||||
"gzwrite.c",
|
||||
"infback.c",
|
||||
"inffast.c",
|
||||
"inffast.h",
|
||||
"inffixed.h",
|
||||
"inflate.c",
|
||||
"inflate.h",
|
||||
"inftrees.c",
|
||||
"inftrees.h",
|
||||
"trees.c",
|
||||
"trees.h",
|
||||
"uncompr.c",
|
||||
"zconf.h",
|
||||
"zlib.h",
|
||||
"zutil.c",
|
||||
"zutil.h",
|
||||
]
|
||||
|
||||
if (is_win) {
|
||||
defines = [ "ZLIB_DLL" ]
|
||||
}
|
||||
|
||||
configs += [ ":ignored_warnings" ]
|
||||
|
||||
public_configs = [ ":includes" ]
|
||||
}
|
Загрузка…
Ссылка в новой задаче