Ubuntu Notes

Requirements

  • Ubuntu 14.04 or later
  • CMake 3.0+

CMake

To install CMake:

sudo apt-get install cmake

Clang

Cinder on Linux supports building both libcinder and Cinder applications with either GCC or Clang, though Clang is recommended, and can be installed using:

sudo apt-get install clang

To set Clang as the default compiler, select /usr/bin/clang++ when prompted by this command:

sudo update-alternatives --config c++

Cinder Dependencies

sudo apt-get install libxcursor-dev \
libxrandr-dev \
libxinerama-dev \
libxi-dev \
libgl1-mesa-dev \
libglu1-mesa-dev \
zlib1g-dev \
libfontconfig1-dev \
libmpg123-dev \
libsndfile1 \
libsndfile1-dev \
libpulse-dev \
libasound2-dev \
libcurl4-gnutls-dev \
libgstreamer1.0-dev \
libgstreamer-plugins-bad1.0-dev \
libgstreamer-plugins-base1.0-dev \
gstreamer1.0-libav \
gstreamer1.0-alsa \
gstreamer1.0-pulseaudio \
gstreamer1.0-plugins-bad \
libboost-filesystem-dev

Building Cinder

Fetching and Building Cinder

git clone --recursive https://github.com/cinder/Cinder.git
cd Cinder
mkdir build && cd build
cmake ..
make -j 8

Building and Running BasicApp

Building

cd samples/BasicApp/proj/cmake
mkdir build && cd build
cmake ..
make

Running

Starting from samples/BasicApp/proj/cmake/build:

./Debug/BasicApp/BasicApp

For building in Release mode you just have to add -DCMAKE_BUILD_TYPE=Release in the above cmake commands.

cmake .. -DCMAKE_BUILD_TYPE=Release