| 1 | # raylib CMake Project |
| 2 | |
| 3 | This provides a base project template which builds with [CMake](https://cmake.org). |
| 4 | |
| 5 | ## Usage |
| 6 | |
| 7 | To compile the example, use one of the following dependending on your build target... |
| 8 | |
| 9 | ### Desktop |
| 10 | |
| 11 | Use the following to build for desktop: |
| 12 | |
| 13 | ``` bash |
| 14 | cmake -B build |
| 15 | cmake --build build |
| 16 | ``` |
| 17 | |
| 18 | ### Web |
| 19 | |
| 20 | Compiling for the web requires the [Emscripten SDK](https://emscripten.org/docs/getting_started/downloads.html): |
| 21 | |
| 22 | ``` bash |
| 23 | mkdir build |
| 24 | cd build |
| 25 | emcmake cmake .. -DPLATFORM=Web -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXECUTABLE_SUFFIX=".html" |
| 26 | emmake make |
| 27 | ``` |