//-----------------------------------------------------------------------------
/** \page naming_conventions Naming Conventions
The following naming conventions are used for the OpenMesh code:
Files:
\li \c MyClass.cc for C++-Implementation of class \c MyClass
\li \c MyClass.hh for C++-Header of class \c MyClass
Classes:
\li Class names start with a capital letter: \c MyClass
\li Class templates end with \c T: \c MyClassTemplateT
Variables:
\li One leading underscore for parameters in function-calls: \c _var
\li One trailing underscore for member-variables: \c var_
\li Two trailing underscores for static member-variables: \c var__
Functions:
\li Words are separated by underscores: \c my_function()
Accessing members:
\li To get the member \c xxx_ use const& xxx() const
\li To set the member \c xxx_ use void set_xxx(arg)
**/
//-----------------------------------------------------------------------------
/** \page compiling Compiling OpenMesh
\section compilers 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
|
| Windows |
Microsoft Visual Studio 2008
|
MacOS X (Panther, Tiger and Leopard) |
gcc 4.0
gcc 4.2
|
\section req_libs Required libraries (Only for included Apps)
Install the following external libraries / frameworks if you want to use the included Applications:
\section build_systems Chosing build system
%OpenMesh can be built either using cmake or qmake (that already comes along
with the qt framework) . We strongly recommend use of the cmake build system.
\section sec_compiling_unix Unix
\subsection linux_using_cmake 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
\subsection linux_using_qmake Compiling OpenMesh using QMake
In order to compile OpenMesh, enter following commands in OpenMesh's root directory:
qmake ## Generates the appropriate Makefiles
make ## Builds the project (use 'make debug' to build debug version)
Make sure to use Qt version 4 (some linux distributions
use the link \c qmake-qt4 against the executable).
\section sec_compiling_windows Windows
\subsection windows_using_cmake 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.
- Get Visual Studio 2008
- Extract OpenMesh source code.
- Get all required libraries and install them ( including headers! ).
- Get cmake for windows from http://www.cmake.org/cmake/resources/software.html
-
- Start the cmake gui and open the OpenMesh toplevel directory
- Choose a build directory
- Click on configure .... If any libraries are left unconfigured, you can adjust the path in the ui. Rerun configure until everything is configured correctly
- Click generate to create the visual studio project files
- You can now find a Visual Studio solution file in the build directory you chose in cmake
- Now you can build OpenMesh from within Visual Studio using the newly created project file.
\subsection windows_using_qmake Compiling OpenMesh using QMake
If you want to use qmake to build your Visual Studio 2008 solution file,
download and install the Qt4 framework from Trolltech.
(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.
Open \c OpenMesh\qmake\packages\packages.Windows in a text editor and change the include and library paths
for GLEW and GLUT such that they match the installed ones (see comments to find the right path entries).
- In Microsoft Visual Studio 2008 open Tools->Visual Studio command prompt
- Go to the folder of your application and call \c C:\\qt4\\bin\\qmake.exe -r
- Open the resulting visual studio solution ( *.sln )
- Choose which build target to use ( Debug/Release )
- Choose \c Build \c solution from the build menu
\section sec_compiling_macosx 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 the darwin portage
system darwin ports.
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. ( Darwin ports usually installs header files to \c /usr/local/include and libraries to \c /usr/local/lib. )
\subsection mac_using_cmake 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.
\subsection mac_using_qmake Compiling OpenMesh using QMake
Adapt the header paths of at least GLEW (optional freetype, FTGL,...) in file OpenMesh/qmake/packages/packages.Darwin.
In order to compile and install OpenMesh, open a Terminal window and enter following commands in OpenMesh's root directory:
qmake -spec macx-g++ ## Generates the appropriate Makefiles
make ## Builds the project (use 'make debug' to build debug version)
**/
//-----------------------------------------------------------------------------