Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jairbubbles committed Aug 17, 2021
1 parent 3fe9afd commit 3a088dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build.libgit2.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,16 @@ function Assert-Consistent-Naming($expected, $path) {
try {
Push-Location $libgit2Directory

# Patch CMakeLists.txt to fix LIBGIT2_FILENAME not being used when compiling the .rc file
(Get-Content src\CMakeLists.txt) -replace 'target_compile_definitions(git2internal PRIVATE LIBGIT2_FILENAME=\"${LIBGIT2_FILENAME}\")', 'target_compile_definitions(git2 PRIVATE LIBGIT2_FILENAME=\"${LIBGIT2_FILENAME}\")' | Set-Content src\CMakeLists.txt

$cmake = Find-CMake
$ctest = Join-Path (Split-Path -Parent $cmake) "ctest.exe"

Run-Command -Quiet { & remove-item build -recurse -force -ErrorAction Ignore }
Run-Command -Quiet { & mkdir build }
cd build

# Patch CMakeLists.txt to fix versions
(Get-Content src\CMakeLists.txt) -replace 'target_compile_definitions(git2internal PRIVATE LIBGIT2_FILENAME=\"${LIBGIT2_FILENAME}\")', 'target_compile_definitions(git2 PRIVATE LIBGIT2_FILENAME=\"${LIBGIT2_FILENAME}\")' | Set-Content src\CMakeLists.txt

if ($x86.IsPresent) {
Write-Output "Building 32-bit..."
Run-Command -Fatal { & $cmake -G "Visual Studio 16 2019" -A Win32 -D ENABLE_TRACE=ON -D USE_SSH=OFF -D "BUILD_CLAR=$build_clar" -D "LIBGIT2_FILENAME=$binaryFilename" .. }
Expand Down

0 comments on commit 3a088dd

Please sign in to comment.