Skip to content

Commit 4a04f70

Browse files
joaocgreisrichard-townsend-arm
authored andcommitted
overwrite 'msbuild_toolset' only if 'toolset' is defined (TryGhost#1242)
node-gyp uses 'msbuild_toolset' in 'target_defaults' to specify what toolset should be used, according to what version of Visual Studio was detected. Before this change, when 'toolset' was not specified, node-sqlite3 failed to compile with any version of Visual Studio after 2015, because gyp fails to detect the toolset correctly. With this change 'toolset' is only used if defined, fixing compilation with node-gyp and recent VS versions.
1 parent 7cac428 commit 4a04f70

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

deps/common-sqlite.gypi

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
},
66
'target_defaults': {
77
'default_configuration': 'Release',
8-
'msbuild_toolset':'<(toolset)',
8+
'conditions': [
9+
[ 'toolset!=""', {
10+
'msbuild_toolset':'<(toolset)'
11+
}]
12+
],
913
'configurations': {
1014
'Debug': {
1115
'defines!': [

0 commit comments

Comments
 (0)