#!/bin/bash
#mkdir cmake-build-emrelease
rm -fr cmake-build-emrelease
emcmake cmake "-DCMAKE_EXE_LINKER_FLAGS=-s USE_GLFW=3 -s USE_WEBGL2=1" -DCMAKE_BUILD_TYPE=Release -DBUILD_GRAPHICS_TESTS:BOOL=ON -S ./ -B ./cmake-build-emrelease
#emcmake cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_GRAPHICS_TESTS:BOOL=ON -S ./ -B ./cmake-build-emrelease
cd cmake-build-emrelease
emmake make -j 32

cp BLT_GRAPHICS_TESTS.js /var/www/html/emscript/
cp BLT_GRAPHICS_TESTS.data /var/www/html/emscript/
cp BLT_GRAPHICS_TESTS.wasm /var/www/html/emscript/
cp BLT_GRAPHICS_TESTS.worker.js /var/www/html/emscript/

