chore: [gn] changes to BUILD.gn for windows (#13434)

Grab basket of changes needed to get the `electron_lib` target building on Windows with GN.
This commit is contained in:
Jeremy Apthorp 2018-06-26 22:58:20 +02:00 committed by GitHub
parent 4b60efcaf8
commit 39e6943f1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 2 deletions

View file

@ -256,6 +256,12 @@ static_library("electron_lib") {
]
configs += [ ":gio_unix" ]
}
if (is_win) {
deps += [
"//third_party/wtl",
"//third_party/breakpad:client",
]
}
defines = [
# This is defined in skia/skia_common.gypi.
"SK_SUPPORT_LEGACY_GETTOPDEVICE",
@ -282,7 +288,7 @@ static_library("electron_lib") {
# the #includes can be agnostic about where crashpad is vendored.
"//third_party/crashpad",
]
if (is_linux) {
if (is_linux || is_win) {
include_dirs += [
"//third_party/breakpad",
]
@ -296,6 +302,7 @@ static_library("electron_lib") {
"*_x11.cc",
"*_gtk.h",
"*_gtk.cc",
"*\blibrary_loaders/*",
]
}
if (!is_win) {

View file

@ -1,12 +1,16 @@
action("configure_node") {
script = "//third_party/electron_node/configure"
ssl_libname_suffix = ""
if (is_win) {
ssl_libname_suffix = ".dll"
}
args = [
"--enable-static",
"--release-urlbase=https://atom.io/download/electron",
"--shared",
"--shared-openssl",
"--shared-openssl-includes=" + rebase_path("//third_party/boringssl/src/include"),
"--shared-openssl-libname=boringssl",
"--shared-openssl-libname=boringssl" + ssl_libname_suffix,
"--shared-openssl-libpath=" + rebase_path(root_out_dir),
"--without-npm",
"--without-bundled-v8",
@ -72,6 +76,9 @@ action("build_node") {
if (is_linux) {
outputs = [ "$target_out_dir/Release/lib/libnode.so" ]
}
if (is_win) {
outputs = [ "$target_out_dir/Release/node.dll" ]
}
}
node_libs = get_target_outputs(":build_node")