Building from source
Building on Linux
Debian/Ubuntu build dependencies:
build-essential clang cmake curl extra-cmake-modules git libasound2-dev libcurl4-openssl-dev libdbus-1-dev libdecor-0-dev libegl-dev libevdev-dev libfontconfig-dev libfreetype-dev libgtk-3-dev libgudev-1.0-dev libharfbuzz-dev libinput-dev libopengl-dev libpipewire-0.3-dev libpulse-dev libssl-dev libudev-dev libwayland-dev libx11-dev libx11-xcb-dev libxcb1-dev libxcb-composite0-dev libxcb-cursor-dev libxcb-damage0-dev libxcb-glx0-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-shape0-dev libxcb-shm0-dev libxcb-sync-dev libxcb-util-dev libxcb-xfixes0-dev libxcb-xinput-dev libxcb-xkb-dev libxext-dev libxkbcommon-x11-dev libxrandr-dev lld llvm ninja-build pkg-config zlib1g-dev
- Clone:
git clone https://github.com/thenotoriousfox/riverhorse.git && cd riverhorse - Build the bundled dependencies (slow; the directory can live outside the
tree):
scripts/deps/build-dependencies-linux.sh deps - Configure:
cmake -B build-release -G Ninja \ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \ -DCMAKE_EXE_LINKER_FLAGS_INIT=-fuse-ld=lld \ -DCMAKE_MODULE_LINKER_FLAGS_INIT=-fuse-ld=lld \ -DCMAKE_SHARED_LINKER_FLAGS_INIT=-fuse-ld=lld \ -DCMAKE_PREFIX_PATH="$PWD/deps" - Build:
ninja -C build-release - Run:
./build-release/bin/riverhorse
Building on Windows
Needs Visual Studio 2022 (or its Build Tools) with the C++ and “C++ Clang tools for Windows” components.
- Build the dependencies into
dep\msvc\deps-x64:scripts\deps\build-dependencies-windows-x64.bat - From an “x64 Native Tools Command Prompt”, configure:
cmake -B build-release -G Ninja -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON ^ -DCMAKE_C_COMPILER="%VCINSTALLDIR%Tools\Llvm\x64\bin\clang-cl.exe" ^ -DCMAKE_CXX_COMPILER="%VCINSTALLDIR%Tools\Llvm\x64\bin\clang-cl.exe" ^ -DCMAKE_PREFIX_PATH="%CD%\dep\msvc\deps-x64" - Build:
ninja -C build-release - Run:
build-release\bin\riverhorse.exe