-
-
Notifications
You must be signed in to change notification settings - Fork 118
Developer Getting Started: Visual Studio
Cong edited this page Nov 2, 2020
·
35 revisions
For pre-2017 Visual Studios, see Visual Studio Setup.
- 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
.sln
file using Visual Studio -
Set the
cdogs-sdl
project as the startup project -
Press F5 to compile and run. You are ready to go!