mirror of
https://github.com/raysan5/raylib.git
synced 2026-01-30 02:39:17 -05:00
Add "-DPLATFORM=Web" with cmake example
@ -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:
|
**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 "-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".)_
|
_(The ninja generator is optional and you can use your system default by removing "-G Ninja".)_
|
||||||
|
|||||||
Reference in New Issue
Block a user