Commit d8a96fa1 by João Reis Committed by Kewde

overwrite 'msbuild_toolset' only if 'toolset' is defined (#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.
parent b2a7d615
...@@ -5,7 +5,11 @@ ...@@ -5,7 +5,11 @@
}, },
'target_defaults': { 'target_defaults': {
'default_configuration': 'Release', 'default_configuration': 'Release',
'msbuild_toolset':'<(toolset)', 'conditions': [
[ 'toolset!=""', {
'msbuild_toolset':'<(toolset)'
}]
],
'configurations': { 'configurations': {
'Debug': { 'Debug': {
'defines!': [ 'defines!': [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment