-
-
Notifications
You must be signed in to change notification settings - Fork 366
Expand file tree
/
Copy pathbuild.ps1
More file actions
18 lines (15 loc) · 585 Bytes
/
build.ps1
File metadata and controls
18 lines (15 loc) · 585 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$scriptPath = $PSScriptRoot
$emsdkVer = "3.1.52"
$emsdkPath = Join-Path -Path $PSScriptRoot -ChildPath "emsdk" | Join-Path -ChildPath $emsdkVer
if (Test-Path -Path $emsdkPath -PathType Container) {
Write-Host "Found existing emsdk"
& "$emsdkPath\emsdk_env.ps1"
} else {
Write-Host "Building emsdk"
git clone --branch $emsdkVer "https://github.com/emscripten-core/emsdk.git" $emsdkPath
& "$emsdkPath\emsdk.ps1" install $emsdkVer
& "$emsdkPath\emsdk.ps1" activate $emsdkVer
}
emcc --version
emcmake cmake -Bbuild -DCMAKE_BUILD_TYPE=Release
cmake --build build