![]() |
TCM 1.1.0
A CMake module to reduce boilerplate
|
TCM provides a function to work with Emscripten.
CMAKE_TOOLCHAIN_FILE "$env{EMROOT}/cmake/Modules/Platform/emscripten.cmake" EMROOT is a variable environment (name may differ) set to the root of emscripten's install directory. If EMSCRIPTEN is ON (it is, if using emscripten toolchain), then this target will produce:
.html file,.wasm file,.js file,If a SHELL_FILE is not provided, then the one embedded in TCM will be used. If EMBED_DIR is specified, then it will be embedded by emscripten. If PRELOAD_DIR is specified, then it will be preloaded by emscripten.
A companion utility target, called ${target}_open_html is also configured to run/open the produced html with emrun.