Skip to content

Building on linux

amgraham edited this page May 25, 2012 · 11 revisions

Dependencies

Gentoo: dev-util/cmake media-libs/libpng
sys-libs/zlib
media-libs/freetype
dev-libs/boost

On Debian-based distros: sudo apt-get install build-essential libboost-all-dev cmake libpng12-0 libpng12-dev zlib1g zlib1g-dev libfreetype6 libfreetype6-dev

**Google-API**
media-gfx/imagemagick -openmp (disable OpenMP as convert is slowed down with this)

user@host ~ $ sudo emerge -av cmake libpng zlib freetype boost

In case I missed some, feel free to add.

First Clone

user@host ~ $ git clone https://github.com/udoprog/c10t.git
user@host ~ $ cd c10t
user@host ~/c10t/ $ git submodule init
user@host ~/c10t/ $ git submodule update
user@host ~/c10t/ $ cmake .
user@host ~/c10t/ $ make

Your c10t is now ready for use, and can be executed from the current directory with** ./c10t ** user@host ~/c10t/ $ ./c10t -w -o

Updating Clone

user@host ~ $ cd c10t
user@host ~/c10t/ $ mv CMakeLists.txt .CMakeLists.txt
user@host ~/c10t/ $ git pull
user@host ~/c10t/ $ git submodule init
user@host ~/c10t/ $ git submodule update
user@host ~/c10t/ $ cmake .
user@host ~/c10t/ $ make

Git will pull latest changes, if there are any

Your c10t is now ready for use, and can be executed from the current directory with** ./c10t **

CentOS

If you're using CentOS, the version of Boost available in the base yum repository is too old (1.33 currently). If you include the epel repository however, you can install boost141 (version 1.41). However, that version installs to nonstandard directories which the cmake process can't find.

The solution? Edit the CMakeLists.txt file in the base c10t directory to include these lines above the find_package routines:

SET(BOOST_ADDITIONAL_VERSIONS "1.41" "1.41.0")
SET(BOOST_ROOT "/usr/include/boost141")
SET(BOOST_LIBRARYDIR "/usr/lib64/boost141")

In this example you'll notice it's using the 64-bit version.

Something went wrong with that request. Please try again.