mirror of https://github.com/OpenVPN/openvpn-gui
Allow running build-msvc.ps1 from anywhere
Signed-off-by: Samuli Seppänen <samuli@openvpn.net>pull/444/head
parent
fe5d45bc1e
commit
3ea37e6332
|
@ -5,15 +5,23 @@ $CWD = Get-Location
|
||||||
$CMAKE="C:\Program Files\CMake\bin\cmake.exe"
|
$CMAKE="C:\Program Files\CMake\bin\cmake.exe"
|
||||||
$CMAKE_TOOLCHAIN_FILE="C:\users\vagrant\buildbot\windows-server-2019-static-msbuild\vcpkg\scripts\buildsystems\vcpkg.cmake"
|
$CMAKE_TOOLCHAIN_FILE="C:\users\vagrant\buildbot\windows-server-2019-static-msbuild\vcpkg\scripts\buildsystems\vcpkg.cmake"
|
||||||
|
|
||||||
|
# Enable running this script from anywhere
|
||||||
|
cd $PSScriptRoot
|
||||||
|
|
||||||
# Architecture names taken from here:
|
# Architecture names taken from here:
|
||||||
#
|
#
|
||||||
# https://docs.microsoft.com/en-us/cpp/build/cmake-presets-vs?view=msvc-160
|
# https://docs.microsoft.com/en-us/cpp/build/cmake-presets-vs?view=msvc-160
|
||||||
"x64", "arm64", "Win32" | ForEach {
|
"x64", "arm64", "Win32" | ForEach {
|
||||||
$platform = $_
|
$platform = $_
|
||||||
Write-Host "Building openvpn-gui ${platform}"
|
Write-Host "Building openvpn-gui ${platform}"
|
||||||
mkdir build_$platform
|
if ( ( Test-Path "build_${platform}" ) -eq $False )
|
||||||
|
{
|
||||||
|
mkdir build_$platform
|
||||||
|
}
|
||||||
cd build_$platform
|
cd build_$platform
|
||||||
& "$CMAKE" -A $platform -DCMAKE_TOOLCHAIN_FILE="$CMAKE_TOOLCHAIN_FILE" ..
|
& "$CMAKE" -A $platform -DCMAKE_TOOLCHAIN_FILE="$CMAKE_TOOLCHAIN_FILE" ..
|
||||||
& "$CMAKE" --build . --config Release
|
& "$CMAKE" --build . --config Release
|
||||||
cd $CWD
|
cd $PSScriptRoot
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cd $CWD
|
Loading…
Reference in New Issue