Skip to content

Commit c3cf28d

Browse files
committed
add arm64 config for mpfr
1 parent b477c1d commit c3cf28d

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

build.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,13 @@ $mpirLib = Resolve-LibraryPath @("mpir.lib", "lib_mpir_gc.lib", "libmpir*.lib")
820820
Invoke-GitClonePinnedCommit "https://github.com/BrianGladman/mpfr.git" $env:MPFR_MSVC_VERSION "mpfr"
821821
$mpfrBuildDir = Resolve-ExistingDirectory @("mpfr\build.vs22", "mpfr\build.vs19")
822822
Push-Location $mpfrBuildDir
823-
msbuild.exe /m /p:Platform=$msvcPlatform /p:Configuration=Release "lib_mpfr\lib_mpfr.vcxproj"
823+
$mpfrProject = "lib_mpfr\lib_mpfr.vcxproj"
824+
if ($msvcPlatform -eq "ARM64") {
825+
$mpfrProjectContents = Get-Content -Path $mpfrProject -Raw
826+
$mpfrProjectContents = $mpfrProjectContents.Replace("x64", "ARM64").Replace("X64", "ARM64")
827+
Set-Content -Path $mpfrProject -Value $mpfrProjectContents -Encoding utf8
828+
}
829+
msbuild.exe /m /p:Platform=$msvcPlatform /p:Configuration=Release $mpfrProject
824830
$mpfrReleaseDir = Resolve-ExistingDirectory ($msvcPlatformDirCandidates | ForEach-Object { "lib\$_\Release" })
825831
Copy-Item -Path (Join-Path $mpfrReleaseDir "*.lib") -Destination $installLibDir -Force
826832
Copy-Item -Path (Join-Path $mpfrReleaseDir "*.pdb") -Destination $installLibDir -Force -ErrorAction SilentlyContinue

0 commit comments

Comments
 (0)