mirror of https://github.com/nodejs/node.git
70 lines
1.7 KiB
Plaintext
70 lines
1.7 KiB
Plaintext
|
# This file is used by GN for building, which is NOT the build system used for
|
||
|
# building official binaries.
|
||
|
# Please edit the gyp files if you are making changes to build system.
|
||
|
|
||
|
import("//node/node.gni")
|
||
|
|
||
|
# The actual configurations are put inside a template in unofficial.gni to
|
||
|
# prevent accidental edits from contributors.
|
||
|
template("ngtcp2_gn_build") {
|
||
|
config("ngtcp2_config") {
|
||
|
include_dirs = [
|
||
|
"nghttp3/lib/",
|
||
|
"nghttp3/lib/includes/",
|
||
|
"ngtcp2/crypto/includes/",
|
||
|
"ngtcp2/lib/includes/",
|
||
|
]
|
||
|
defines = [
|
||
|
"NGTCP2_STATICLIB",
|
||
|
"NGHTTP3_STATICLIB",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
gypi_values = exec_script("../../tools/gypi_to_gn.py",
|
||
|
[ rebase_path("ngtcp2.gyp") ],
|
||
|
"scope",
|
||
|
[ "ngtcp2.gyp" ])
|
||
|
|
||
|
# FIXME(zcbenz): Some APIs of ngtcp2 are not marked as export, so can not turn
|
||
|
# into component. This should be fixed in upstream ngtcp2
|
||
|
static_library(target_name) {
|
||
|
forward_variables_from(invoker, "*")
|
||
|
public_configs = [ ":ngtcp2_config" ]
|
||
|
|
||
|
defines = [ "_U_" ]
|
||
|
if (is_win) {
|
||
|
defines += [
|
||
|
"WIN32",
|
||
|
"_WINDOWS",
|
||
|
"HAVE_CONFIG_H",
|
||
|
]
|
||
|
}
|
||
|
if (is_linux) {
|
||
|
defines += [
|
||
|
"HAVE_ARPA_INET_H",
|
||
|
"HAVE_NETINET_IN_H",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
include_dirs = [
|
||
|
".",
|
||
|
"ngtcp2/lib/",
|
||
|
"ngtcp2/crypto/",
|
||
|
"nghttp3/lib/"
|
||
|
]
|
||
|
|
||
|
sources = gypi_values.nghttp3_sources + gypi_values.ngtcp2_sources
|
||
|
if (node_use_openssl) {
|
||
|
sources += gypi_values.ngtcp2_sources_openssl
|
||
|
deps = [ "../openssl" ]
|
||
|
}
|
||
|
|
||
|
if (is_clang || !is_win) {
|
||
|
cflags_c = [
|
||
|
"-Wno-extra-semi",
|
||
|
"-Wno-implicit-fallthrough",
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
}
|