-
-
Notifications
You must be signed in to change notification settings - Fork 120
Developer Getting Started: Visual Studio
- Git client (TortoiseGit)
- CMake
- Visual Studio
- SDL 1.2 development libraries
- SDL_mixer 1.2 development libraries
Repo URL: https://github.com/cxong/cdogs-sdl.git
-
Right-click where you want to clone the repo (e.g.
C:\
), select "Git Clone..." -
In clone dialog, enter the repo URL
-
Cloning...
-
You should now see the repo contents in
C:\cdogs-sdl
-
Right click in
C:\cdogs-sdl
and select "TortoiseGit > Submodule Update" to get the submodules as well (just tinydir).
There are many instructions for installing SDL for visual studio, but unfortunately CMake's Windows SDL support is quite poor, so these instructions are designed to support CMake as well.
-
Choose a location for the SDL libraries (e.g.
C:\dev
). -
Copy the contents of the SDL_1.2.XX subfolder to
C:\dev
(so you should have the foldersC:\dev\include
,C:\dev\lib
etc.) -
For SDL_mixer, copy the contents of the include and lib folders to
C:\dev
(justSDL_mixer.h
andSDL_mixer.lib
). -
In
C:\dev\lib
, there arex86
andx64
versions of the same libraries. Copy the.lib
files inx86
to thelib
folder. -
Copy the
.dll
files to theC:\cdogs-sdl
folder -
Create an environment variable
SDLDIR
that points toC:\dev
-
Run CMake: for "Where is the source code:" input
C:\cdogs-sdl\src
, and for "Where to build the binaries:" inputC:\cdogs-sdl
-
Click "Configure", choosing the right Visual Studio version (e.g. VS2012 is VS11); click Finish
-
Click "Generate"; you should now see Visual Studio projects in
C:\cdogs-sdl
.
- Open
C:\cdogs-sdl\cdogs-sdl.sln
- Set the
cdogs-sdl
project as the startup project - Press F5 to compile and run. You are ready to go!