Game Develop C++ Platform: (All) Install and use Cmake

| Game Develop C++ Platform Platform for developing native games based on OpenGL and SFML with Game Develop

- Main Page
- Modules
- Classes
- Files

All Classes Namespaces Files Functions Variables Typedefs Enumerations Groups Pages
(All) Install and use Cmake

Building is done using CMake: It is an open-source build system that can generate build files for lots of IDE and build tools ( Makefiles... ).

# Download and install CMake

First, install CMake:
Download it here or get it using your package manager if you're using a Linux distribution.

# Using CMake to generate the build files

## Using the GUI

- Start the CMake user interface ( cmake-gui ). Choose the GDSDK directory as the source directory, and Binaries/.build as the directory where to build the binaries:

- Click on Configure. If asked to create the build directory, answer yes. Choose then your favorite generator: MinGW Makefiles (on Windows) or Unix Makefiles (on Linux) generate a traditional Makefile that can be built using the mingw32-make ( on Windows) or make ( on Linux ) command. You can also choose the Ninja generator to use the Ninja build system.

- When you click on Finish, CMake do a first configuration. Adjust any variable if necessary ( no changes is needed by default ), then click on Generate.

- You can then launch a terminal/command prompt, go to the *.build* folder ( `cd SDKFolder/Binaries/.build` ) and launch the build using the generator you've choosen: `mingw32-make`, or `make` on Linux.

Binaries are created into Binaries/Output/Release folder.

## Using the command line

Using the commandline with CMake is also easy:

cd SDKFolder/Binaries
mkdir .build
cd .build
cmake .. -G "MinGW Makefiles"
mingw32-make

or using the fast Ninja build system :

cd SDKFolder/Binaries
mkdir .build
cd .build
cmake .. -G "Ninja"
ninja

Binaries are of course also created into Binaries/Output/Release folder.
( For linux, this is the directory where you put the files of Game Develop )