raylib/projects/CMake
2026-04-12 19:21:09 +02:00
..
CMakeLists.txt update 2025->2026, 5.5->6.0 (#5754) 2026-04-12 19:21:09 +02:00
core_basic_window.c Restore projects/CMake/CMakeLists.txt (#5191) 2025-09-17 19:22:53 +02:00
README.md Restore projects/CMake/CMakeLists.txt (#5191) 2025-09-17 19:22:53 +02:00

raylib CMake Project

This provides a base project template which builds with CMake.

Usage

To compile the example, use one of the following dependending on your build target...

Desktop

Use the following to build for desktop:

cmake -B build
cmake --build build

Web

Compiling for the web requires the Emscripten SDK:

mkdir build
cd build
emcmake cmake .. -DPLATFORM=Web -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXECUTABLE_SUFFIX=".html"
emmake make