From 39e6943f1e48be3d16f9c69cab001c98ad41de63 Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Tue, 26 Jun 2018 22:58:20 +0200 Subject: [PATCH] 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. --- BUILD.gn | 9 ++++++++- build/node/BUILD.gn | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 993a47c86116..fb38e18355ca 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -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) { diff --git a/build/node/BUILD.gn b/build/node/BUILD.gn index 26ec8f6a6e8b..9eab747415b6 100644 --- a/build/node/BUILD.gn +++ b/build/node/BUILD.gn @@ -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")