mirror of
https://github.com/fanlumaster/googlepinyinime-rev.git
synced 2025-07-18 08:57:54 +08:00
27 lines
645 B
PowerShell
27 lines
645 B
PowerShell
# 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
|
|
}
|
|
|
|
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."
|
|
}
|
|
|
|
cmake -G "Visual Studio 17 2022" -A x64 -S . -B ./build/
|
|
|
|
if ($LASTEXITCODE -eq 0)
|
|
{
|
|
cmake --build ./build/ --config DEBUG
|
|
}
|