Skip to main content

How run and build

Perquisites:

  • cmake1
  • vcpkg2
caution

YOU MUST INSTALL CMAKE BEFORE VCPKG
This is because vcpkg will add it's own (old) cmake which, for example, will not work to build nvidia physx lib

note

AFTER BUILD
Engine needs the resources folder next to the .exe
You can manually do this but what would be the purpose of the cpy.bat then

Setup vcpkg

Open a terminal window and cd into the vcpkg folder, cd D:\git\vcpkg for example.

Now bootstrap vcpkg

./vcpkg/bootstrap-vcpkg.bat -disableMetrics

And make it available system wide

./vcpkg integrate install
./vcpkg integrate powershell

Don't forget to add those two variables to path since the default installation options of Visual Studio IDE packages a vcpkg manager and it'll use that if we don't setup a VCPKG_ROOT

VCPKG_ROOT=<your_path>
VCPKG_TRIPLET=x64_windows

Now getting packages should be as easy as vcpkg install spdlog

Add vcpkg to CMake

Since we added the PATH variables earlier, your CMakeLists file should include this snippet to set the CMAKE_TOOLCHAIN_FILE

cmake_minimum_required(VERSION 3.26)

if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE
"$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
CACHE STRING "")
endif()

project(kogayonon)

Install packages

important

This is subjected to change often enough

This is the command to install all necessary packages

vcpkg install sdl2 soil2 sol2 glm entt spdlog yaml-cpp tinyfiledialogs benchmark rapidjson physx

Footnotes

  1. cmake

  2. vcpkg (code this should be cloned with git)