#!/usr/bin/env bash set -euo pipefail repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" source "${repo_root}/tools/web/emscripten-env.sh" build_dir="${repo_root}/build_web" emcmake cmake -S "${repo_root}/web/engine" -B "${build_dir}" -G Ninja -DCMAKE_BUILD_TYPE=Release -DWEB_ENGINE_THREADS=OFF cmake --build "${build_dir}" --target web_engine test -s "${build_dir}/web_engine.js" printf 'web-cmake-ok build=%s\n' "${build_dir}"