Add "-DPLATFORM=Web" with cmake example

Bensuperpc
2022-09-12 18:15:31 +02:00
parent 4eec3af730
commit 7a744dc890

@ -123,7 +123,7 @@ Emscripten cmake will prefer the [ninja build system](https://ninja-build.org/)
**IDE-friendly option**: As the first option is only available from a command line where you have run "emsdk activate latest" when using an IDE (like Visual Studio, CLion, etc.) you should set the path to the emscripten toolchain file:
```
cmake -H . -B build -G Ninja "-DCMAKE_TOOLCHAIN_FILE=<fullpath_to_emsdk>/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake"
cmake -H . -B build -G Ninja -DPLATFORM=Web "-DCMAKE_TOOLCHAIN_FILE=<fullpath_to_emsdk>/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake"
```
_(The "-H ." is deprecated since CMake 3.13 and if you are using higher version please replace the argument with "-S .")_
_(The ninja generator is optional and you can use your system default by removing "-G Ninja".)_