Skip to content

Commit 08452f8

Browse files
authored
Merge pull request #1626 from ianhattendorf/fix/electron-4-build
Fix macOS and Windows Electron 4 builds
2 parents 4f3d123 + 8f78805 commit 08452f8

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

generate/templates/templates/binding.gyp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
[
9595
"OS=='mac'", {
9696
"conditions": [
97-
["node_root_dir.split('/')[-1].startswith('iojs')", {
97+
["<(is_electron) == 1", {
9898
"include_dirs": [
9999
"vendor/openssl/include"
100100
],
@@ -122,7 +122,7 @@
122122
[
123123
"OS=='win'", {
124124
"conditions": [
125-
["node_root_dir.split('\\\\')[-1].startswith('iojs')", {
125+
["<(is_electron) == 1", {
126126
"include_dirs": ["vendor/openssl/include"],
127127
"libraries": [
128128
"<(module_root_dir)/vendor/openssl/lib/libcrypto.lib",

vendor/libgit2.gyp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"library%": "static_library",
88
"openssl_enable_asm%": 0, # only supported with the Visual Studio 2012 (VC11) toolchain.
99
"gcc_version%": 0,
10+
"is_electron%": "<!(node ../utils/isBuildingForElectron.js <(node_root_dir))",
1011
"is_clang%": 0
1112
},
1213
"targets": [
@@ -299,7 +300,7 @@
299300
"conditions": [
300301
["OS=='mac'", {
301302
"conditions": [
302-
["node_root_dir.split('/')[-1].startswith('iojs')", {
303+
["<(is_electron) == 1", {
303304
"include_dirs": [
304305
"openssl/include"
305306
]
@@ -370,7 +371,7 @@
370371
],
371372
},
372373
}],
373-
["node_root_dir.split('\\\\')[-1].startswith('iojs')", {
374+
["<(is_electron) == 1", {
374375
"include_dirs": ["openssl/include"]
375376
}]
376377
],
@@ -545,14 +546,14 @@
545546
]
546547
},
547548
"conditions": [
548-
["OS=='mac' and node_root_dir.split('/')[-1].startswith('iojs')", {
549+
["OS=='mac' and <(is_electron) == 1", {
549550
"include_dirs": [
550551
"openssl/include",
551552
]
552553
}],
553554
["OS=='win'", {
554555
"conditions": [
555-
["node_root_dir.split('\\\\')[-1].startswith('iojs')", {
556+
["<(is_electron) == 1", {
556557
"include_dirs": [
557558
"openssl/include"
558559
],

0 commit comments

Comments
 (0)