Skip to content

Building

Matt Styles edited this page Mar 1, 2019 · 13 revisions

Dependencies

SFML 2.5.0 - xygine uses the updated SFML API, other releases will not work. Building the latest source is recommended.

ENet - used for the networking components of xygine

Optional - Cmake3 or higher. Cmake is optimal for non-windows platforms.

Compiler with C++17 support - VS2017, gcc6+, clang or XCode 10

Building

Visual Studio

The easiest route on Windows is to use the included Visual Studio 2017 solution, which also includes all the necessary libraries. To switch between static and shared builds in Visual Studio use the 'Configuration Manager' to choose the build type.

Cmake

A cmake configuration is included, and should be straightforward if you are familiar with CMake. For those not familiar with cmake, executing the following commands in the root folder should get you started (Make sure dependencies are installed beforehand):

mkdir build && cd build
cmake ..
cmake --build . --target install

By default this will generate dynamic libraries in Debug mode. This can be modified using the standard CMake variables

Other cmake variables:

  • BUILD_DEMO: ON to build the demo
Clone this wiki locally