Skip to content

Windows Build Guide.

Requirements

  • 0.1. Install Clion 2020.1 or newer / Visual Studio 2019 or newer.
  • 0.2. Install Vulkan SDK/Runtime 1.3.211.0 or newer.
  • 0.3. Install CMake 3.16.0 or newer.
  • 0.4. Install MS Build Tools for Visual Studio 16.11.29 or newer (if you are using CLion).
  • 0.5. Make sure you have Python 3 installed and added to environment variables.

vcpkg

If you use Visual Studio, make sure you don't have vcpkg with zlib installed. It can cause undefined behavior. If you have it, uninstall it or remove zlib from vcpkg. Use "vcpkg list | findstr zlib" to check if you have it.

  1. Open CMake GUI.

  2. Choose the path to the SREngine folder (where the source code is located).

  3. Choose the path where to build the binaries (ex. SREngine/build).

  4. Press Configure and choose your VS version.

  5. Press Generate.

  6. Open Visual Studio solution.

  7. In Visual Studio right-click on SREngine and press Set as Startup Project.

  8. Run build.

  1. Open CMD in root directory of the repository and run the following commands:

  2. mkdir build

  3. cd build

  4. cmake -G "VISUAL_STUDIO_VERSION" ../ -DCMAKE_BUILD_TYPE=Debug

  5. Replace VISUAL_STUDIO_VERSION with your version ex. Visual Studio 17 2022

  6. Now you have your solution generated and you can open it with Visual Studio

  7. In Visual Studio right-click on SREngine and press Set as Startup Project

  8. Build and Run the game engine!

  1. Press Ctrl + Alt + S to open Settings window.

  2. Select Build, Execution, Deployment on the left.

  3. Select Toolchains.

  4. Add (Alt + Insert) Visual Studio compiler.

  5. Select amd64 in Architecture:.

  6. Repeat "2"

  7. Select CMake.

  8. Pass -j n argument as Build options, where n is a number of your logical processors minus 2.

  9. In Project window right-click SREngine folder and click Reload CMake Project.

  10. Click Run 'SREngine' (Shift + F10).

screenshot