Skip to content

Latest commit

 

History

History
 
 

linux

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Ubuntu or Debian Linux

Setup

This project uses CMake (minimum version 3.0), you can download it here or install it with apt-get.

sudo apt-get install cmake

Make sure to update git submodules before you build:

git submodule update --init

To build on Ubuntu or Debian you will need a C++ toolchain with support for C++14. GCC 4.9.2 (or higher) and Clang 3.4 (or higher) are known to work.

You will also need to install development packages for libcurl, x11, and opengl. On Ubuntu 16.04 or Debian Stretch all the required packages can be installed with

sudo apt-get install make g++ pkg-config libcurl4-openssl-dev \
  libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libgl1-mesa-dev

The demo application uses the Mapzen vector tile service, so you will need a Mapzen API key to build and run the demo.

  1. Visit https://mapzen.com/documentation/overview/#get-started-developing-with-mapzen to get an API key.

  2. Setup an environment variable (MAPZEN_API_KEY) to point to your API key.

    export MAPZEN_API_KEY=YOUR_API_KEY

Build

There are two ways to build the tangram-es library and demo application on Linux:

Command Line

To build the executable demo application:

make linux

You can optionally use make -j to parallelize the build and append DEBUG=1 or RELEASE=1 to choose the build type.

Then run it from the output folder:

cd build/linux/bin/ && ./tangram

You can open a different YAML scene file by dragging and dropping it into the window, or passing it as an argument:

cd build/linux/bin/ && ./tangram -f /path/to/your/scene.yaml

Tangram-es can optionally be built with system-installed font and GLFW libraries. You can install these libraries with:

sudo apt-get install libglfw3-dev libicu-dev libfreetype6-dev libharfbuzz-dev

Then compile with the following options:

CMAKE_OPTIONS=" -DUSE_SYSTEM_GLFW_LIBS=1 -DUSE_SYSTEM_FONT_LIBS=1" make linux

CLion

You can also run and debug from CLion.

After cloning and updating your git submodules, open CLion and Import Project from Sources. Select the root of this repo. Choose Open Project. Do not overwrite CMakeLists.txt.

CLion will automatically set everything up, all you have to do is wait a minute for the project to get initialized. Then, select the tangram run configuration and hit run/debug.

CLion Tangram Target