General instructions

Installing dependencies

For Summoning Wars to build you need the development versions of the libraries it is using.
If you are lucky all libraries may be installed via your favorite package manager (apt-get, yum, emerge, pacman, ...).
The following lists the dependencies and the required version:

cmake-gui will start a graphical configuration, which is the favored way.

Run cmake-gui and select the Summoning Wars source folder (sumwars-code).

Additionally you should select a build directory where CMake generates its output. The default for this guide will be a folder called build within sumwars-code.

Hit Configure and CMake will look for the dependencies and you should get a result similar to the screenshot. Pay close attention to any output and make sure no errors occurred before you continue.

The next step is to adjust the Summoning Wars options to your needs (look at the next section).

The last step is to run another Configure followed by Generate. Once that successfully finished the files to build Summoning Wars should have been generated in the build folder and you are free to close cmake-gui.

Developer configuration

Developers usually want to make changes and test them without installing the game after each change. This is allowed through enabling the following options:

SUMWARS_STANDALONE_MODE will change all paths to be local and relative to the executable.

SUMWARS_POST_BUILD_COPY will copy the Summoning Wars binary back to sumwars-code so that resource paths match.

(optional) SUMWARS_PORTABLE_MODE will prevent the developer version from messing with the save files in your home/user directory and instead use a local path.

User configuration on UNIX/Linux systems

For installing the game in the correct location you might want to change CMAKE_INSTALL_PREFIX to match your filesystem layout. The default for the most systems will be /usr.

User configuration on Windows systems

Windows users need to enable SUMWARS_STANDALONE_MODE because windows doesn't have a global directory where resources are found. Instead the resources are installed in the program folder as well.

Compilation

Open the build directory of your choice (default is sumwars-code/build).

Invoking the build depends on the generator you selected in cmake-gui:

Makefiles

just run make -j NUMBER_OF_YOUR_PROCESSORS.

Visual Studio project file

Open the solution file and hit Build.

Installation

If you configured your Summoning Wars to be installed on a UNIX/Linux system (you didn't choose the developer options and checked for a correct CMAKE_INSTALL_PREFIX) you will have to run make install as root. After that you can run Summoning Wars by running sumwars.
For the developer configuration you just run ./sumwars within the sumwars-code directoy to start the game.
On Windows systems you might need to copy the resulting binary file into sumwars-code to play the game.

System specific hints

Windows

This sections needs major cleaning and clarification.

(work in progress)

Download and install a C++ IDE. Most of the current contributors that are developing on Windows use Microsoft Visual Studio 2010 Express Edition.

Obtain the following libraries (it's recommended to download/install them in sub-directories of a root directory. E.g. c:\dev\OGRE, c:\dev\CEGUI, etc): You may obtain the dependency package from here. That's the easy solution: just copy the dependencies to the Dependencies subfolder in the sumwars local repository. If the download is no longer available, you will need to download all items manually, as described below. If the download is available, you will only need to define the environment variables described below.

CEGUI >= 0.7 . You can get the SDK, but it's recommended to clone the Mercurial repository. (If you build it from source, don't forget to download the dependencies as well)

You should also define an environment variable named CEGUIDIR to point to the CEGUI folder. If you use the Mercurial repository, you may need to copy the contents of %CEGUIDIR%/include into %CEGUIDIR%/include/cegui

Fedora

Packages can be installed through yum install <name>. You need to use either su to start a super user session or use sudo yum install <name> for each package. The packages you might require are: mercurial, cmake-gui, gcc-c++, libstdc++-devel, ogre-devel, physfs-devel, poco-devel, cegui-devel, ois-devel, libvorbis-devel, freealut-devel, lua-devel, libXrandr-devel, ois-devel, lua-devel, cegui-devel, openal-devel, freealut-devel, libogg-devel, libvorbis-devel, poco-devel and physfs-devel.
The build process is straight forward on Fedora, just follow the general instructions for Linux systems.

Arch Linux

You'll need to build cegui-ogre and poco yourself and there are also lot's of handy tools you could use.
It's not really an official way to install it but it works, and allows to remove the packages with pacman.
A big thank you to the AUR repository contributors.
I enabled ABS just in case ABS.