diff --git a/win/build-deps.cmd b/win/build-deps.cmd index 1c948459c6..d1f5daabd8 100644 --- a/win/build-deps.cmd +++ b/win/build-deps.cmd @@ -363,7 +363,9 @@ if "%VS_VER%"=="2017" ( set mpfr_sln=build.vs19 set orig_platform_toolset=v142 ) -powershell -c "get-childitem %DEPENDENCY_DIR%\%mpfr_sln% -recurse -include *.vcxproj | select -expand fullname | foreach { (Get-Content $_) -replace '%orig_platform_toolset%', 'v%VC_VER:.=%' | Set-Content $_ }" +set target_platform_toolset=v%VC_VER:.=% +IF DEFINED VS_TOOLSET set target_platform_toolset=%VS_TOOLSET% +powershell -c "get-childitem %DEPENDENCY_DIR%\%mpfr_sln% -recurse -include *.vcxproj | select -expand fullname | foreach { (Get-Content $_) -replace '%orig_platform_toolset%', '%target_platform_toolset%' | Set-Content $_ }" :: mpfr's vcxproj files only define Debug/Release configurations (no RelWithDebInfo/MinSizeRel). call :BuildSolution "%DEPENDENCY_DIR%\%mpfr_sln%\lib_mpfr.sln" %DEBUG_OR_RELEASE% lib_mpfr IF NOT %ERRORLEVEL%==0 GOTO :Error