Developer Getting Started: Visual Studio - cxong/cdogs-sdl GitHub Wiki
For pre-2017 Visual Studios, see Visual Studio Setup.
Prerequisites
- Git client (GitHub for Windows)
- Visual Studio 2019
- CMake
- vcpkg
- python
- pip install protobuf
-
Clone repo
-
Setup vcpkg
-
Run
vcpkg install sdl2 sdl2-image sdl2-mixer protobuf -
Install python; run
pip install protobuf -
Generate the project using CMake, with
-DCMAKE_TOOLCHAIN_FILE=C:/Users/User/Documents/GitHub/vcpkg/scripts/buildsystems/vcpkg.cmake(replace with your installed location as prompted byvcpkg integrate install- Example:
cmake -DCMAKE_TOOLCHAIN_FILE=C:/Users/User/Documents/GitHub/vcpkg/scripts/buildsystems/vcpkg.cmake . -A x64 - Note: make sure you match the generated project architecture with the SDL architecture; see https://stackoverflow.com/a/28370892/2038264
- Example:
-
Open the generated
.slnfile using Visual Studio -
Set the
cdogs-sdlproject as the startup project -
Press F5 to compile and run. You are ready to go!

