Add dlog for tizen
[platform/core/uifw/lottie-player.git] / wasm_build.sh
1 #!/bin/bash
2
3 if [ -z "$1" ]; then
4     echo "Emscripten SDK PATH is not provided"
5     echo "Usage: wasm_build EMSDK_PATH"
6     exit 1;
7 fi
8
9 if [ ! -d "./builddir_wasm" ]; then
10     sed "s|EMSDK:|$1|g" wasm_cross.txt > /tmp/.wasm_cross.txt
11     meson -Dthread=false -Dmodule=false -Dcache=false -Dexample=false -Db_lto=true -Ddefault_library=static builddir_wasm --cross-file /tmp/.wasm_cross.txt
12     cp ./test/wasm_test.html builddir_wasm/src/index.html
13 fi
14
15 sudo ninja -C builddir_wasm/
16 echo "RESULT:"
17 echo " rlottie-wasm.wasm and rlottie-wasm.js can be found in builddir_wasm/src folder"
18 ls -lrt builddir_wasm/src/rlottie-wasm.*