Skip to content

Commit ffabba7

Browse files
minor fixes
1 parent 5c51e40 commit ffabba7

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

Scripts/BuildEngine.ps1

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ if ($IsWindows) {
8585
function Build([string]$configuration, [int]$VsVersion , [bool]$runBuild) {
8686

8787
# Define CMake Preset argument
88-
switch ($systemName) {
89-
"Windows" {
88+
if($IsWindows) {
9089
switch ($VsVersion) {
9190
2022 {
9291
$cMakePreset = "Windows_$configuration"
@@ -96,19 +95,19 @@ function Build([string]$configuration, [int]$VsVersion , [bool]$runBuild) {
9695
}
9796
}
9897
}
99-
"Linux" {
98+
if($IsLinux) {
10099
# Set Linux build compiler
101100
$cMakePreset = "Linux_$configuration"
102101
}
103-
"Darwin" {
102+
if($IsMacOS) {
104103
$cMakePreset = "MacOS_$configuration"
105104
}
106105
}
107106

108107
$cMakeArguments = "--preset $cmakePreset"
109108

110109
# CMake Generation process
111-
Write-Host $cMakeArguments
110+
Write-Host "Creating Build for Preset $cMakeArguments"
112111
$cMakeProcess = Start-Process $cMakeProgram -ArgumentList $cMakeArguments -NoNewWindow -Wait -PassThru
113112
if ($cMakeProcess.ExitCode -ne 0 ) {
114113
throw "cmake failed generation for '$cMakeArguments' with exit code '$cMakeProcess.ExitCode'"

0 commit comments

Comments
 (0)