2022-01-10 10:55:32 +03:00
|
|
|
# raylib CMake Project
|
|
|
|
|
|
|
|
This provides a base project template which builds with [CMake](https://cmake.org).
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
To compile the example, use one of the following dependending on your build target...
|
|
|
|
|
|
|
|
### Desktop
|
|
|
|
|
|
|
|
Use the following to build for desktop:
|
|
|
|
|
|
|
|
``` bash
|
2022-05-19 14:18:12 +03:00
|
|
|
cmake -B build
|
|
|
|
cmake --build build
|
2022-01-10 10:55:32 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
### Web
|
|
|
|
|
|
|
|
Compiling for the web requires the [Emscripten SDK](https://emscripten.org/docs/getting_started/downloads.html):
|
|
|
|
|
|
|
|
``` bash
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-09-22 00:12:48 +03:00
|
|
|
emcmake cmake .. -DPLATFORM=Web -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXECUTABLE_SUFFIX=".html"
|
2022-01-10 10:55:32 +03:00
|
|
|
emmake make
|
2024-09-22 00:12:48 +03:00
|
|
|
```
|