-
-
Notifications
You must be signed in to change notification settings - Fork 119
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.) -
Do the same for SDL_mixer, combining the contents of the include and lib folders. However, you should also copy the contents of those folders to
C:\dev
for CMake's benefit (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
.