Skip to main content
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

OptionDefaultDescription
CMAKE_BUILD_TYPEReleaseBuild type: Release, Debug, RelWithDebInfo, MinSizeRel
ENABLE_LTOOFFEnable Link Time Optimization
ENABLE_GENERICOFFGeneric build for any little-endian host (no JIT)

Frontend Options

OptionDefaultDescription
ENABLE_QTONEnable Qt GUI frontend
ENABLE_NOGUIONEnable NoGUI frontend
ENABLE_CLI_TOOLONEnable dolphin-tool CLI utility
ENABLE_HEADLESSOFFHeadless variant (disables Qt and Discord)

Platform-Specific Options

OptionDefaultDescription
ENABLE_X11ONEnable X11 support (Linux)
ENABLE_EGLONEnable EGL OpenGL interface (Linux)
LINUX_LOCAL_DEVOFFBuild relocatable binary (Linux)

Video Backend Options

OptionDefaultDescription
ENABLE_VULKANONEnable Vulkan video backend

Audio Backend Options

OptionDefaultDescription
ENABLE_ALSAONEnable ALSA sound backend (Linux)
ENABLE_PULSEAUDIOONEnable PulseAudio sound backend (Linux)
ENABLE_CUBEBONEnable Cubeb sound backend

Controller Backend Options

OptionDefaultDescription
ENABLE_SDLONEnable SDL controller backend
ENABLE_EVDEVONEnable evdev controller backend (Linux)
USE_MGBAONEnable GBA controller emulation using libmgba

Feature Options

OptionDefaultDescription
USE_UPNPONEnable UPnP port mapping support
USE_DISCORD_PRESENCEONEnable Discord Rich Presence
USE_RETRO_ACHIEVEMENTSONEnable RetroAchievements integration
ENABLE_AUTOUPDATEONEnable automatic updates
ENABLE_ANALYTICSONEnable opt-in analytics collection
ENCODE_FRAMEDUMPSONEncode framedumps in AVI format

Development Options

OptionDefaultDescription
ENABLE_TESTSONEnable building unit tests
ENABLE_LLVMONEnable LLVM support for disassembly
ENABLE_GPROFOFFEnable gprof profiling (Debug builds only)
ENABLE_VTUNEOFFEnable Intel VTune integration (Linux)
FASTLOGOFFEnable 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: