Dolphin uses CMake for building on all platforms except Windows, where Visual Studio solution files are used. This page provides an overview of the build system architecture.
Build Systems
Windows
Windows builds use the Visual Studio solution file located at Source/dolphin-emu.sln. Dolphin targets the latest MSVC shipped with Visual Studio or Build Tools.
Other compilers might be able to build Dolphin on Windows but have not been tested and are not recommended.
Linux, macOS, and Android Native
All non-Windows platforms use CMake 3.20 or later as the build system. CMake generates platform-specific build files (Makefiles, Ninja files, etc.) that are then used to compile Dolphin.
Android
Android builds use Gradle as the primary build system. The Gradle script automatically invokes CMake to build Dolphin’s native components while building the Java/Kotlin code.
Compiler Requirements
Dolphin requires modern compilers with C++23 support:
- GCC: Version 12 or later
- Clang: Version 15 or later
- AppleClang: Version 14.0.3 or later (Xcode 14.3+)
- MSVC: Version 19.32 or later (Visual Studio 2022 17.2.3+)
CMake will inform you if your compiler is too old and does not meet these requirements.
Git Submodules
Dolphin uses Git submodules for some external dependencies. You must initialize submodules before building:
git submodule update --init --recursive
Failing to initialize submodules will result in build errors.
Dependencies
Dolphin has two types of dependencies:
Bundled Dependencies
Many libraries are bundled in the Externals/ directory and used automatically if system versions aren’t available:
- fmt
- glslang
- pugixml
- enet
- xxhash
- bzip2
- liblzma
- zstd
- zlib-ng
- minizip-ng
- LZO
- lz4
- libspng
- FreeSurround
- cubeb
- libusb
- SFML
- miniupnpc
- mbedtls
- curl
- hidapi
- mGBA
- gtest (for tests)
System vs Bundled Libraries
CMake can use system-installed libraries or bundled versions. The USE_SYSTEM_LIBS option controls this behavior:
AUTO (default): Use system libraries if available, otherwise use bundled
ON: Always use system libraries and fail if unavailable
OFF: Always use bundled libraries
cmake .. -DUSE_SYSTEM_LIBS=ON
Individual libraries can be controlled with USE_SYSTEM_<dependency> options.
CMake Options
Dolphin provides many CMake options to customize the build:
Build Configuration
| Option | Default | Description |
|---|
CMAKE_BUILD_TYPE | Release | Build type: Release, Debug, RelWithDebInfo, MinSizeRel |
ENABLE_LTO | OFF | Enable Link Time Optimization |
ENABLE_GENERIC | OFF | Generic build for any little-endian host (no JIT) |
Frontend Options
| Option | Default | Description |
|---|
ENABLE_QT | ON | Enable Qt GUI frontend |
ENABLE_NOGUI | ON | Enable NoGUI frontend |
ENABLE_CLI_TOOL | ON | Enable dolphin-tool CLI utility |
ENABLE_HEADLESS | OFF | Headless variant (disables Qt and Discord) |
| Option | Default | Description |
|---|
ENABLE_X11 | ON | Enable X11 support (Linux) |
ENABLE_EGL | ON | Enable EGL OpenGL interface (Linux) |
LINUX_LOCAL_DEV | OFF | Build relocatable binary (Linux) |
Video Backend Options
| Option | Default | Description |
|---|
ENABLE_VULKAN | ON | Enable Vulkan video backend |
Audio Backend Options
| Option | Default | Description |
|---|
ENABLE_ALSA | ON | Enable ALSA sound backend (Linux) |
ENABLE_PULSEAUDIO | ON | Enable PulseAudio sound backend (Linux) |
ENABLE_CUBEB | ON | Enable Cubeb sound backend |
Controller Backend Options
| Option | Default | Description |
|---|
ENABLE_SDL | ON | Enable SDL controller backend |
ENABLE_EVDEV | ON | Enable evdev controller backend (Linux) |
USE_MGBA | ON | Enable GBA controller emulation using libmgba |
Feature Options
| Option | Default | Description |
|---|
USE_UPNP | ON | Enable UPnP port mapping support |
USE_DISCORD_PRESENCE | ON | Enable Discord Rich Presence |
USE_RETRO_ACHIEVEMENTS | ON | Enable RetroAchievements integration |
ENABLE_AUTOUPDATE | ON | Enable automatic updates |
ENABLE_ANALYTICS | ON | Enable opt-in analytics collection |
ENCODE_FRAMEDUMPS | ON | Encode framedumps in AVI format |
Development Options
| Option | Default | Description |
|---|
ENABLE_TESTS | ON | Enable building unit tests |
ENABLE_LLVM | ON | Enable LLVM support for disassembly |
ENABLE_GPROF | OFF | Enable gprof profiling (Debug builds only) |
ENABLE_VTUNE | OFF | Enable Intel VTune integration (Linux) |
FASTLOG | OFF | Enable all logs |
Build Directories
The build system outputs files to different locations:
- Linux/macOS:
build/Binaries/
- Windows:
Binary/x64/ or Binary/ARM64/ (depending on architecture)
- Android:
Source/Android/app/build/outputs/apk/
Next Steps
Refer to the platform-specific build guides: