Skip to content

Commit

Permalink
overwrite 'msbuild_toolset' only if 'toolset' is defined (TryGhost#1242)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
joaocgreis authored and richard-townsend-arm committed Feb 19, 2020
1 parent 7cac428 commit 4a04f70
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion deps/common-sqlite.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
},
'target_defaults': {
'default_configuration': 'Release',
'msbuild_toolset':'<(toolset)',
'conditions': [
[ 'toolset!=""', {
'msbuild_toolset':'<(toolset)'
}]
],
'configurations': {
'Debug': {
'defines!': [
Expand Down

0 comments on commit 4a04f70

Please sign in to comment.