Developer Documentation

Building OpenVolumeMesh

# Prerequisites

OpenVolumeMesh is equipped with a CMake (http://www.cmake.org) build system that should make compiling the library on any platform pretty simple. Make sure you have at least CMake version 2.6 installed on your machine. Get the latest CMake sources or binaries at http://www.cmake.org.

If you are interested in contributing to OpenVolumeMesh by developing on its code base, we highly recommend to install the Google testing framework which can be found here: https://github.com/google/googletest This framework is needed in order to build and execute our included unit tests.

# Configuring and building OpenVolumeMesh on Linux and MacOSX

Open a terminal and extract the OpenVolumeMesh sources or check out the latest subversion revision:

    git clone https://www.graphics.rwth-aachen.de:9000/OpenVolumeMesh/OpenVolumeMesh.git

It is recommended to build OpenVolumeMesh out-of-source, so create a folder named e.g. "build" outside the OpenVolumeMesh sources root folder. Change to the newly created build directory and just type

    cmake /path/to/OpenVolumeMesh/sources

Note that CMake configures the build such that it builds with debug symbols per default. If you want to build with release settings (with optimizations turned on), use the tool

    ccmake .

inside your build folder. Once everything is configured as desired, just type

    make

inside the build folder. The built libraries can be found in the sub-folder `Build/lib`. OpenVolumeMesh will be built as a static as well as a dynamic library. If you want to build OpenVolumeMesh's documentation, simply type

    make doc

inside the build folder. The generated doxygen documentation files can then be found in `Build/share/Doc/html`.

If you want to install the library as well as its header files, type:

    sudo make install

This installs the requested files into the `lib` and `include` folders in `/usr/local` (this is the default value that can easily be changed using `ccmake`).

There is also a simple example in the `examples` folder in OpenVolumeMesh's root directory. This example has its own target defined in the CMake configuration file found in `examples/CMakeLists.txt`. This target is excluded from target `all` and has to be built explicitly. You can easily build it by typing:

    make simple_mesh

The binary can then be found in `Build/Examples`, or whatever you have specified in the CMake configuration.