This project uses CMake (minimum version 3.0), you can download it here or install it with apt-get.
sudo apt-get install cmakeMake sure to update git submodules before you build:
git submodule update --initTo 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-devThe demo application uses the Mapzen vector tile service, so you will need a Mapzen API key to build and run the demo.
-
Visit https://mapzen.com/documentation/overview/#get-started-developing-with-mapzen to get an API key.
-
Setup an environment variable (
MAPZEN_API_KEY) to point to your API key.export MAPZEN_API_KEY=YOUR_API_KEY
There are two ways to build the tangram-es library and demo application on Linux:
To build the executable demo application:
make linuxYou 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/ && ./tangramYou 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.yamlTangram-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-devThen compile with the following options:
CMAKE_OPTIONS=" -DUSE_SYSTEM_GLFW_LIBS=1 -DUSE_SYSTEM_FONT_LIBS=1" make linuxYou 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.
