forked from MillzyDev/bsq-RumbleMod
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ps1
31 lines (23 loc) · 724 Bytes
/
build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Param(
[Parameter(Mandatory=$false)]
[Switch] $clean,
[Parameter(Mandatory=$false)]
[Switch] $help
)
if ($help -eq $true) {
Write-Output "`"Build`" - Copiles your mod into a `".so`" or a `".a`" library"
Write-Output "`n-- Arguments --`n"
Write-Output "-Clean `t`t Deletes the `"build`" folder, so that the entire library is rebuilt"
exit
}
# if user specified clean, remove all build files
if ($clean.IsPresent) {
if (Test-Path -Path "build") {
remove-item build -R
}
}
if (($clean.IsPresent) -or (-not (Test-Path -Path "build"))) {
new-item -Path build -ItemType Directory
}
& cmake -G "Ninja" -DCMAKE_BUILD_TYPE="RelWithDebInfo" -B build
& cmake --build ./build