mirror of
https://github.com/raysan5/raylib.git
synced 2026-06-13 21:01:53 +08:00
Some checks failed
Android / build (arm64) (push) Has been cancelled
Android / build (x86_64) (push) Has been cancelled
CMakeBuilds / Windows Build (push) Has been cancelled
CMakeBuilds / Linux Build (push) Has been cancelled
Linux / build (i386, i386, /user/bin, 32) (push) Has been cancelled
Linux / build (x86_64, amd64, /user/bin, 64) (push) Has been cancelled
Linux Examples / build (push) Has been cancelled
macOS / build (push) Has been cancelled
Parse raylib_api / build (push) Has been cancelled
WebAssembly / build (push) Has been cancelled
Windows / build (i686, pe-i386, 32, mingw-w64) (push) Has been cancelled
Windows / build (x64, x64, 64, msvc16) (push) Has been cancelled
Windows / build (x86, Win32, 32, msvc16) (push) Has been cancelled
Windows / build (x86_64, pe-x86-64, 64, mingw-w64) (push) Has been cancelled
Windows Examples / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
* Update CMakeLists.txt Add missing link flags * Update README.md Remove unneeded flag because this flag is defined in the updated CMakeList file * Update CMakeLists.txt
28 lines
571 B
Markdown
28 lines
571 B
Markdown
# 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
|
|
cmake -B build
|
|
cmake --build build
|
|
```
|
|
|
|
### Web
|
|
|
|
Compiling for the web requires the [Emscripten SDK](https://emscripten.org/docs/getting_started/downloads.html):
|
|
|
|
``` bash
|
|
mkdir build
|
|
cd build
|
|
emcmake cmake .. -DPLATFORM=Web -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXECUTABLE_SUFFIX=".html"
|
|
emmake make
|
|
```
|