This document describes how to setup a build environment for building with Visual Studio.
- Install Visual Studio Community 2019 with the C++ for games workload
- Install cmake and git
The easiest way to build the dependencies is with vcpkg
- Clone vcpkg to
C:/Tools/vcpkg/
:
cd C:\Tools\vcpkg\
git clone https://github.com/Microsoft/vcpkg.git .
- Run the bootstrapper in the root folder:
.\bootstrap-vcpkg.bat
- Install the dependencies:
.\vcpkg install sdl2 openal-soft wildmidi --triplet x64-windows
- Create a
build
directory and move into it - Create solution files with
cmake
:
cmake -DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake ..
-
Open the file OpenTESArena.sln and in Visual Studio, do the following from the menu: Build -> build Solution
-
The compilation is done when you can read something like the following in the bottom text output window:
========== Build: succeeded ==========