Skip to content

Latest commit

 

History

History
126 lines (86 loc) · 2.74 KB

File metadata and controls

126 lines (86 loc) · 2.74 KB

Build Instructions

Build Steps

Prerequisites

  • CMake: Version 3.25 or later
  • Vulkan SDK: Latest version with VULKAN_SDK environment variable set
  • C++ Compiler:
    • Visual Studio 2022+ (Windows)
    • GCC 11+ or Clang 14+ (Linux)
  • Build System:
    • Visual Studio 2022+ (includes Ninja)
    • Ninja (standalone for Linux or command-line builds)
  • vcpkg: Integrated for dependency management

1. Open Developer Command Prompt

  • Windows: Open "Developer Command Prompt for Visual Studio"
  • Linux: Open a terminal with development tools in PATH

2. Navigate to Project Root

cd Playground

3. Configure Build

Visual Studio Solution (Windows)

cmake --preset=vs

This generates a Visual Studio 2022 solution in the build folder.

Ninja Build (Windows/Linux)

Release Build:

cmake --preset=ninja

Debug Build:

cmake --preset=ninja -DCMAKE_BUILD_TYPE=Debug

4. Build the Project

Visual Studio

  1. Open the solution file in the build folder
  2. Build from within Visual Studio (Ctrl+Shift+B)

Ninja

cd build
ninja

Output

Build artifacts are placed in the bin folder:

  • Executables: bin/
  • Libraries: bin/

Updating Dependencies

To update vcpkg baseline for all configurations:

vcpkg x-update-baseline

Code Quality Checks

cppcheck

Run static analysis:

cppcheck src --check-level=exhaustive --quiet --std=c++20 --enable=style,performance,portability --suppress=cstyleCast --suppress=useStlAlgorithm

clang-tidy

Automatically runs during Ninja builds (configured in CMakeLists.txt).

For Visual Studio: Using Clang-Tidy in Visual Studio

Troubleshooting

Vulkan SDK Not Found

Ensure the VULKAN_SDK environment variable is set and points to your Vulkan SDK installation.

vcpkg Package Errors

Try clearing the vcpkg cache:

vcpkg remove --outdated
vcpkg integrate install

Build Fails with C++20 Errors

Verify your compiler supports C++20:

  • Visual Studio 2022 or later
  • GCC 11+ or Clang 14+

Third-Party Libraries