emscripten minimal cmake project
cd webassembly-minimal-cmake-project
mkdir build
cd build
Emscripten only support mingw32-make build toolchain,please install mingw before
cmake .. -DCMAKE_TOOLCHAIN_FILE=path to\emsdk\upstream\emscripten\cmake\Modules\Platform\Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR=path to/emsdk/node/14.18.2_64bit/bin/node.exe -G "MinGW Makefiles"
mingw32-make
or
emcmake cmake ..
mingw32-make
ubuntu example
sudo apt-get install build-essential
emcmake cmake ..
make
open index.html
you will see browser console below.