Windows Build Instructions

Contents:


Prerequisites

  • Compiler: C++20 support required

    • Windows: Visual Studio 2019 16.8+ or Visual Studio 2022

  • Git: Any recent version

  • CMake: 3.16 or newer

If you do not have these on your system, you can install them with:

Option 1: Visual Studio Installer (Recommended)

  • Download and install Visual Studio Community (free)

  • During installation, select “Desktop development with C++” workload

  • This includes MSVC compiler, CMake, and Git

Option 2: Individual installations

# Install via winget (Windows Package Manager):
winget install Git.Git
winget install Kitware.CMake
winget install Microsoft.VisualStudio.2022.Community

Option 3: Chocolatey

# Install Chocolatey first, then:
choco install git cmake visualstudio2022community


Building Using vcpkg

vcpkg is a free open source package manager available on Windows, Linux, and MacOS. This is our primary recommendation when using Visual Studio on Windows. vcpkg builds libraries from source and so first time builds of Vira can seem excessive if using vcpkg. We will assume you already have the required system prerequisites.

  1. Setup vcpkg:

    # Clone vcpkg to C:\vcpkg (or your preferred location)
    git clone https://github.com/microsoft/vcpkg.git C:\vcpkg
    cd C:\vcpkg
    .\bootstrap-vcpkg.bat
    .\vcpkg integrate install
    
  2. Build:

    mkdir build && cd build
    cmake -DCMAKE_TOOLCHAIN_FILE="C:/vcpkg/scripts/buildsystems/vcpkg.cmake" -DCMAKE_BUILD_TYPE=Release ../
    cmake --build . --config Release -j
    

    Note: If you installed vcpkg to a different location, adjust the toolchain file path accordingly.