Skip to content

Commit

Permalink
overwrite 'msbuild_toolset' only if 'toolset' is defined (#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 kewde committed Nov 11, 2019
1 parent b2a7d61 commit d8a96fa
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 d8a96fa

Please sign in to comment.