Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Latest commit

 

History

History
92 lines (61 loc) · 2.33 KB

BUILD.md

File metadata and controls

92 lines (61 loc) · 2.33 KB

Build instructions

Tomatenquark relies on the excellent vcpkg package management. In order to get started you will need the following ingredients.

  • git
  • cmake

Platform specific dependencies for building

Windows

You will need a recent version of Visual Studio alongside the C/C++ extension pack.

Ubuntu

In order for compilation to work you must have the following packages available:

  • libgl
  • libvorbis
  • alsa

On Ubuntu you can get these dependencies via:

sudo apt-get install -y libgl1-mesa-dev libasound2-dev libvorbis-dev

OSX

On OSX we recommend using XCode. However, tomatenquark may be built using plain Makefile.

Building the code

In order to build the project follow these steps:

  1. clone vcpkg into a location of your choosing and set it up.
  2. clone code into a location of your choosing
  3. installing the necessary dependencies
  4. platform-dependant compilation

Installing necessary dependencies

Navigate to your vcpkg directory and install a triplet of your choosing:

./vcpkg install --recurse @/path/to/code/cmake/triplets/linux64
#.\vcpkg install --recurse @/path/to/code/cmake/triplets/windows64 # on windows

Platform-dependant compilation

Windows

cd \path\to\code
mkdir build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=\path\to\vcpkg\scripts\buildsystems\vcpkg.cmake
msbuild /property:Platform=x64 /t:tomatenquark tomatenquark.sln

OSX

cd /path/to/code
mkdir build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake -G Xcode
xcodebuild -arch x86_64 build

If you prefer Makefiles over project files, head straight to the linux section.

Linux

cd /path/to/code
mkdir build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake
make tomatenquark

Reduced version for server-only

The server only version works with fewer dependencies. You will need only to install enet and zlib. When building the code select the tomaten_server or tomaten_master target, e.g:

.\vcpkg install enet zlib --triplet x64-linux
# (cd to code)
mkdir build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake
make tomaten_server