Compiling OpenMesh

Tested compilers

OpenMesh has been successfully tested for the following operating systems / compilers:

Linux

gcc 4.0.x
gcc 4.1.x
gcc 4.2.x
gcc 4.3.x
gcc 4.4.x

Windows

Microsoft Visual Studio 2008

MacOS X
(Panther,Tiger,Leopard,Snow Leopard)

gcc 4.0
gcc 4.2

Required libraries (Only for included Apps)

Install the following external libraries / frameworks if you want to use the included Applications:

Qt4http://www.qtsoftware.com/downloads
GLEWhttp://glew.sourceforge.net/


Chosing build system

OpenMesh can be built using the cmake build system.

Unix

Compiling %OpenMesh using CMake

In order to compile OpenMesh, create a directory named e.g. "build" in OpenMesh's root directory. Change to the newly created directory and type

cmake ..            ## Generates the appropriate Makefiles
make                ## Builds the project

You can choose the build type by using cmake with the flag
-DCMAKE_BUILD_TYPE=(Debug|Release)
The default is: Debug
Other flags are:
-DBUILD_APPS=OFF to disable build of applications and
-DCMAKE_INSTALL_PREFIX=<path> to specify the install path.
When calling make install cmake will install OpenMesh into this directory using the subdirectories lib/include/bin.

CMake builds both shared and static under Linux.

Everything will then be build in the Build subdirectory containing the libraries in lib and the binaries in bin.

There are some additional targets:
doc: Builds the Documentation
doc-install: Builds the Documentation and installs it


Windows

Compiling %OpenMesh using CMake

If you want to use cmake to build your Visual Studio 2008 solution file,
download and install CMake from www.cmake.org.
(Note: This is not mandatory since there are already VS2008 solution files included in OpenMesh).

Install the OpenGL Extension Wrangler Library (GLEW) from http://glew.sourceforge.net.

Note: Set the CMAKE_BUILD_TYPE variable to "Release" if you want OpenMesh to be built as release. In Visual Studio 2008 choose "Release" in the appropriate select box and build the solution afterwards.



MacOS X

Download and install required libraries as stated above. Because some of the examples depend on the GLEW library, it's recommended to install glew via MacPorts portage system MacPorts.
If you have not installed it yet, follow the instructions given on their site in order to install it.
Type sudo port -v install glew to install glew headers and libraries. ( MacPorts usually installs header files to /opt/local/include and libraries to /opt/local/lib. )

Compiling %OpenMesh using CMake

If you're using cmake as preferred build system create a directory named e.g. in OpenMesh's root directory and change to it.

cmake ..            ## Generates the appropriate Makefiles
make                ## Builds the project (use 'make debug' to build debug version)

The mac application bundle will be found under "Build" in the recently created build folder. It automatically contains all needed shared objects (libs, fonts, textures, etc.).

CMake builds both shared and static under MacOS X.


acg pic Project OpenMesh, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .