User Tools

Site Tools


compiling

Compiling Voxelands

See also Compiling for Android

Get dependencies: First things first, installing dependencies to compile Voxelands:

  • cmake (Required only to compile)
  • libgl
  • libXxf86vm
  • sqlite
  • openal
  • libvorbis
  • libogg
  • freetype
  • git (Grabbing source)

Installing these dependencies may differ from distro to distro:

Arch Linux:

$ sudo pacman -S irrlicht cmake libxxf86vm sqlite openal libvorbis libogg openal git freetype2

Debian based:

$ sudo apt-get install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg62-turbo-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libfreetype6-dev git

Fedora, CentOS, RHEL:

$ sudo yum install cmake irrlicht-devel bzip2-devel gettext-devel libsqlite3x-devel libpng-devel libjpeg-turbo-devel libXxf86vm-devel mesa-libglapi openal-soft-devel libvorbis-devel libogg-devel freetype-devel

Get ready and compile: Now that you've installed dependencies, its time to put git to use:

$ git clone https://gitlab.com/voxelands/voxelands.git voxelands
$ cd voxelands
$ cmake .
$ make -jX

X being the number of CPU cores to use while compiling voxelands + 1 (2 is a nice default if you're unsure)

After these commands have been executed, you will likely have a built binary for Voxelands as long as everything went according to plan :-)

$ bin/voxelands

If this was successful, Voxelands will be running on your desktop. Remember that next builds are rarely backwards compatible with the stable branch, so may not work with multiplayer.

Additional CMake flags

  • BUILD_SERVER (default: 1): Build server
  • BUILD_CLIENT (default: 1): Build client
  • CPU_OPTS (default: 0): Optimize code to current CPU (not supported on MSVC)
  • ENABLE_AUDIO (default: 1): Enables audio in client
compiling.txt · Last modified: 2017/12/05 16:48 by darkrose