- Test the latest features before they are released
- Contribute code changes to the project
- Create custom builds with specific configurations
- Debug issues in your development environment
Prerequisites
Before building OpenRCT2, you’ll need:Build Tools
- CMake 3.24 or later
- C++ Compiler with C++20 support:
- GCC 12 or later (Linux)
- Clang 11 or later (Linux/macOS)
- MSVC 2022 or later (Windows)
- Ninja or Make (build system)
- Git (to clone the repository)
Required Dependencies
OpenRCT2 requires several libraries to build:- SDL2 (graphics and input)
- libzip (≥1.0)
- zlib
- libpng (≥1.6)
- OpenSSL (1.0.0 or later)
- libcurl (for HTTP support)
- FreeType2 (for TTF font support)
- fontconfig (Linux only, for TTF fonts)
- ICU (internationalization)
- zstd (compression)
Optional Dependencies
- FLAC (for FLAC audio support)
- Vorbis and Ogg (for OGG audio support)
- OpenGL (for hardware rendering)
- discord-rpc (for Discord Rich Presence)
- Google Benchmark (for benchmarking, disabled by default)
- CCache (to speed up recompilation)
Build Process
The general build process follows these steps:Install dependencies
Install the required libraries for your platform (see platform-specific guides).
Build Options
CMake provides several options to customize your build:| Option | Description | Default |
|---|---|---|
CMAKE_BUILD_TYPE | Build type (Debug, Release, RelWithDebInfo, MinSizeRel) | Debug |
DISABLE_GUI | Build headless only (no GUI) | OFF |
DISABLE_NETWORK | Disable multiplayer functionality | OFF |
DISABLE_HTTP | Disable HTTP support | OFF |
DISABLE_TTF | Disable TrueType font support | OFF |
DISABLE_OPENGL | Disable OpenGL support | OFF |
DISABLE_FLAC | Disable FLAC audio support | OFF |
DISABLE_VORBIS | Disable OGG/Vorbis audio support | OFF |
ENABLE_SCRIPTING | Enable plugin/script support | ON |
PORTABLE | Create a portable build | OFF |
WITH_TESTS | Build unit tests | OFF |
OPENRCT2_USE_CCACHE | Use CCache for faster rebuilds | ON |
Example: Building with custom options
Platform-Specific Guides
Choose your platform for detailed build instructions:Linux
Build on Ubuntu, Debian, Fedora, Arch, and other distributions
macOS
Build on macOS using CMake and Homebrew dependencies
Windows
Build on Windows using Visual Studio and vcpkg
WSL
Build on Windows Subsystem for Linux
MSYS2
Build on Windows using MSYS2 MinGW
Compiler Requirements
The project requires C++20 support:- GCC: Version 12.0 or later
- Clang: Version 11.0 or later
- MSVC: Visual Studio 2022 or later
- Apple Clang: Xcode 13 or later

