Skip to content

Commit 1b702c5

Browse files
committed
Enable SSH build.
1 parent f2988b5 commit 1b702c5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

build.libgit2.ps1

+5-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ Param(
2424
Set-StrictMode -Version Latest
2525

2626
$projectDirectory = Split-Path $MyInvocation.MyCommand.Path
27-
$libgit2Directory = Join-Path $projectDirectory "libgit2"
27+
$libgit2Directory = (Join-Path $projectDirectory "libgit2") -replace '\\','/'
28+
$libssh2Directory = (Join-Path $projectDirectory "..\libssh2") -replace '\\','/'
29+
$libssh2Lib = (Join-Path $libssh2Directory "lib\libssh2.lib") -replace '\\','/'
30+
$libssh2IncludeDirectory = (Join-Path $libssh2Directory "libssh2\include") -replace '\\','/'
2831
$x86Directory = Join-Path $projectDirectory "nuget.package\runtimes\win-x86\native"
2932
$x64Directory = Join-Path $projectDirectory "nuget.package\runtimes\win-x64\native"
3033
$arm64Directory = Join-Path $projectDirectory "nuget.package\runtimes\win-arm64\native"
@@ -129,7 +132,7 @@ try {
129132
Write-Output "Building x64..."
130133
Run-Command -Quiet { & mkdir build64 }
131134
cd build64
132-
Run-Command -Fatal { & $cmake -G "Visual Studio 16 2019" -A x64 -D BUILD_TESTS=OFF -D THREADSAFE=ON -D USE_SSH=OFF -D ENABLE_TRACE=ON -D "BUILD_CLAR=$build_clar" -D "LIBGIT2_FILENAME=$binaryFilename" ../.. }
135+
Run-Command -Fatal { & $cmake -G "Visual Studio 16 2019" -A x64 -D BUILD_TESTS=OFF -D THREADSAFE=ON -D USE_SSH=ON -D "EMBED_SSH_PATH=$libssh2Directory" -D "LIBSSH2_LIBRARY=$libssh2Lib" -D "LIBSSH2_INCLUDE_DIR=$libssh2IncludeDirectory" -D ENABLE_TRACE=ON -D "BUILD_CLAR=$build_clar" -D "LIBGIT2_FILENAME=$binaryFilename" ../.. }
133136
Run-Command -Fatal { & $cmake --build . --config $configuration }
134137
if ($test.IsPresent) { Run-Command -Quiet -Fatal { & $ctest -V . } }
135138
cd $configuration

0 commit comments

Comments
 (0)