build-deps/mpfr: consider VS_TOOLSET override

Previously it constructed toolset from `VC_VER`, while it's possible
it's overridden using `VS_TOOLSET`.
This commit is contained in:
Andrej730
2026-09-08 13:06:10 +05:00
parent 2eba0addf2
commit 9624a17809
+3 -1
View File
@@ -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