Skip to content
Anthony Samms edited this page Jun 18, 2026 · 2 revisions

Building on Mac OS

Prerequisites

Xcode Command Line Tools

xcode-select --install

Homebrew

Install Homebrew if you don't have it, then install the required packages:

brew update
brew install cmake ninja python3 pkg-config git ffmpeg sdl3 libogg libvorbis flac mpg123 opus

Optional: Install ccache to speed up subsequent builds:

brew install ccache

Python 3

Code generation runs during the CMake configure step and requires python3 to be on your PATH. This is satisfied by the brew install python3 above.


Clone the Repository

git clone --recurse-submodules https://github.com/Yonokid/YataiDON
cd YataiDON

If you already cloned without submodules:

git submodule update --init --recursive

Build

Debug

cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build -j$(sysctl -n hw.logicalcpu)
cp build/bin/YataiDON ./YataiDON

You can also use the helper script — note it calls nproc which is Linux-specific, so install coreutils first if you want to use it:

brew install coreutils
./build_debug.sh

Release

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(sysctl -n hw.logicalcpu)
cp build/bin/YataiDON ./YataiDON

Running

From the repo root, the game expects the following directories alongside the binary:

YataiDON        ← executable
Skins/
Songs/
shader/
config.toml

Run from the repo root after a build:

./YataiDON

Notes

  • PortAudio is supplied as a prebuilt static archive (src/libs/audio/libportaudio-macos.a); no separate installation is needed.
  • FFmpeg is resolved via pkg-config. Ensure ffmpeg is installed via Homebrew so its .pc files are available.
  • libsndfile and libsamplerate are built from source via FetchContent automatically.
  • LeakSanitizer (-fsanitize=leak) is not supported by Apple Clang. If a Debug build fails because of it, pass -DCMAKE_CXX_FLAGS="-fsanitize=address -fsanitize=undefined" to CMake to override.
  • Dependencies fetched by CMake are cached in .cmake-deps/ in the repo root, so subsequent configures are fast.
  • Release builds use -flto=auto for link-time optimization. Apple's linker supports this via -flto=thin; if you hit LTO errors, pass -DCMAKE_CXX_FLAGS="-O2 -DNDEBUG" to disable it.

Clone this wiki locally