, , : https://chromium.googlesource.com/external/gyp/+/master/docs/UserDocumentation.md#Skeleton-of-a-typical-executable-target-in-a-gyp-file.
@saper GitHub , MSVS_VERSION :
['OS=="win"' and 'MSVS_VERSION=="2013"' , {
'libraries': [
"opencv/lib/vc12/opencv_world300.lib"
],
}],
['OS=="win"' and 'MSVS_VERSION=="2012"' , {
'libraries': [
"opencv/lib/vc11/opencv_world300.lib"
],
}],
['OS=="win"' and 'MSVS_VERSION=="2010"' , {
'libraries': [
"opencv/lib/vc10/opencv_world300.lib"
],
}]
(nit: , toolset gyp, = ==)
: https://github.com/saper/node-sass/blob/c7e9cf0f0e0098e8316bd41722fc2edf4a835d9f/src/libsass.gyp#L91-L94.
1:
, .targets .vcxproj (, this), .vcxproj - , MSVS, , , .vcxproj / .
MSVS gyp , , :
CMD:
SET GYP_MSVS_VERSION=2012
PowerShell:
$env:GYP_MSVS_VERSION=2015
:
node_modules/.bin/node-gyp build
env-var , CLI arg .
CLI npm, , Windows MSVCR .
..
2:
CLI MSVS : --min-msvs-version.
3:
MSBUILD node -gyp MSBUILD ( ) / .vcxproj, PATH. , , C99/++ 1 [1/4/7], VS2015. :
- reset PATH MSBuild bin.
node-gyp build rebuild node-gyp configure, "%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild" build/binding.sln /p:Configuration=Release ( posh, : &"${env:ProgramFiles(x86)}\MSBuild\14.0\Bin\MSBuild" build\binding.sln /p:Configuration=Release)- Pull node -gyp pangyp, MSBUILD, , Windows , .:)