Files
googlepinyinime-rev/scripts/lcompile.ps1

25 lines
660 B
PowerShell
Raw Normal View History

2025-01-02 06:19:47 +08:00
# generate compile to exe files
$currentDirectory = Get-Location
$cmakeListsPath = Join-Path -Path $currentDirectory -ChildPath "CMakeLists.txt"
if (-not (Test-Path $cmakeListsPath)) {
Write-Host("No CMakeLists.txt in current directory, please check.")
return
2025-01-02 06:19:47 +08:00
}
Write-Host "Start generating and compiling..."
$buildFolderPath = ".\build"
if (-not (Test-Path $buildFolderPath)) {
New-Item -ItemType Directory -Path $buildFolderPath | Out-Null
Write-Host "build folder created."
2025-01-02 06:19:47 +08:00
}
# cmake -G "Visual Studio 17 2022" -A x64 -S . -B ./build/
cmake --preset=default
2025-01-02 06:19:47 +08:00
if ($LASTEXITCODE -eq 0) {
cmake --build build
2025-01-02 06:19:47 +08:00
}