build: define platform and restore sln

This commit is contained in:
2026-03-20 12:37:40 -03:00
parent ab8fdfc010
commit 56728ff186
+12 -4
View File
@@ -5,14 +5,22 @@ function Initialize-Project {
# generation # generation
Write-Host "Generating project" Write-Host "Generating project"
Set-Location $projectFolder Set-Location $projectFolder
$cmakeProcess = Start-Process -FilePath cmake -ArgumentList @("..") -NoNewWindow -Wait -PassThru
Set-Location ..
if ($cmakeProcess.ExitCode -ne 0) { cmake .. -G "Visual Studio 17 2022" -A x64 `
Write-Host "CMake generation failed" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" `
-DCMAKE_VS_PLATFORM_NAME="x64"
dotnet restore "$slnName.sln" --arch x64
$exitCode = $LASTEXITCODE
if ($exitCode -ne 0) {
Write-Host "CMake generation failed with exit code: $exitCode" -ForegroundColor Red
exit 1 exit 1
} }
Set-Location ..
# sln open # sln open
try { try {
$slnPath = "$projectFolder\$slnName.sln" $slnPath = "$projectFolder\$slnName.sln"