mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00

New build script for WASM with WebGPU. Run `wasm_webgpu_build.sh` to have WebGPU WASM binary
11 lines
463 B
Bash
Executable file
11 lines
463 B
Bash
Executable file
#!/bin/bash
|
|
|
|
#https://github.com/thorvg/thorvg/wiki/WebGPU-Raster-Engine-Development
|
|
|
|
if [ ! -d "./build_wasm" ]; then
|
|
sed "s|EMSDK:|$1|g" ./cross/wasm_webgpu.txt > /tmp/.wasm_cross.txt
|
|
meson -Db_lto=true -Ddefault_library=static -Dstatic=true -Dloaders="all" -Dsavers="all" -Dthreads=false -Dbindings="wasm_beta" -Dengines="wg_beta" --cross-file /tmp/.wasm_cross.txt build_wasm
|
|
fi
|
|
|
|
ninja -C build_wasm/
|
|
ls -lrt build_wasm/src/bindings/wasm/thorvg-wasm.*
|