4 echo "Emscripten SDK PATH is not provided"
5 echo "Usage: wasm_build EMSDK_PATH"
9 if [ ! -d "./builddir_wasm" ]; then
10 sed "s|EMSDK:|$1|g" wasm_cross.txt > /tmp/.wasm_cross.txt
11 meson -Dbindings=[''] -Db_lto=true -Ddefault_library=static --cross-file /tmp/.wasm_cross.txt builddir_wasm
12 cp ./test/wasm_test.html builddir_wasm/src/index.html
15 ninja -C builddir_wasm/
17 echo " thorvg-wasm.wasm and thorvg-wasm.js can be found in builddir_wasm/src folder"
18 ls -lrt builddir_wasm/src/thorvg-wasm.*