build: [gn] use consistent node configuration between gyp and build
This commit is contained in:
parent
4ebe71655b
commit
99ecbfbd3b
1 changed files with 11 additions and 10 deletions
|
@ -1,3 +1,9 @@
|
|||
if (is_debug) {
|
||||
node_configuration = "Debug"
|
||||
} else {
|
||||
node_configuration = "Release"
|
||||
}
|
||||
|
||||
action("configure_node") {
|
||||
script = "//third_party/electron_node/configure"
|
||||
ssl_libname_suffix = ""
|
||||
|
@ -39,7 +45,7 @@ action("gyp_node") {
|
|||
"node_override.gypi",
|
||||
]
|
||||
outputs = [
|
||||
"$target_out_dir/Release/build.ninja",
|
||||
"$target_out_dir/$node_configuration/build.ninja",
|
||||
]
|
||||
|
||||
args = [
|
||||
|
@ -66,23 +72,18 @@ action("build_node") {
|
|||
":gyp_node",
|
||||
]
|
||||
script = "//electron/build/run-ninja.py"
|
||||
if (is_debug) {
|
||||
configuration = "Debug"
|
||||
} else {
|
||||
configuration = "Release"
|
||||
}
|
||||
args = [
|
||||
"-C", rebase_path(target_out_dir, root_build_dir) + "/$configuration",
|
||||
"-C", rebase_path(target_out_dir, root_build_dir) + "/$node_configuration",
|
||||
"node_lib"
|
||||
]
|
||||
if (is_mac) {
|
||||
outputs = [ "$target_out_dir/$configuration/libnode.dylib" ]
|
||||
outputs = [ "$target_out_dir/$node_configuration/libnode.dylib" ]
|
||||
}
|
||||
if (is_linux) {
|
||||
outputs = [ "$target_out_dir/$configuration/lib/libnode.so" ]
|
||||
outputs = [ "$target_out_dir/$node_configuration/lib/libnode.so" ]
|
||||
}
|
||||
if (is_win) {
|
||||
outputs = [ "$target_out_dir/$configuration/node.dll.lib", "$target_out_dir/$configuration/node.dll" ]
|
||||
outputs = [ "$target_out_dir/$node_configuration/node.dll.lib", "$target_out_dir/$node_configuration/node.dll" ]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue