From 6ba07fa31d03b49b3508d8805a9c54cd4516fb27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 31 Jan 2020 23:05:18 +0100 Subject: [PATCH] doc: fix a serious error in CMake toolchain docs. --- doc/platforms-html5.dox | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/platforms-html5.dox b/doc/platforms-html5.dox index b5edf62b7..b37fc2a7f 100644 --- a/doc/platforms-html5.dox +++ b/doc/platforms-html5.dox @@ -75,11 +75,14 @@ of the toolchain files from above: @code{.sh} mkdir build-emscripten-wasm && cd build-emscripten-wasm cmake .. \ - -DCMAKE_TOOLCHAIN_FILE="../toolchains/generic/Emscripten-wasm.cmake" \ + -DCMAKE_TOOLCHAIN_FILE="path/to/toolchains/generic/Emscripten-wasm.cmake" \ -DCMAKE_BUILD_TYPE=Release cmake --build . @endcode +Note that the `CMAKE_TOOLCHAIN_FILE` path needs to be absolute --- otherwise +CMake will silently ignore it and continue compiling natively. + After that you can run the generated JavaScript file using Node.js. Note that it looks for the corresponding `*.wasm` file in the current directory, so you need to @cb{.sh} cd @ce there first: