//----------------------------------------------------------------------------- /** \page compiling Compiling OpenMesh \section compilers Tested compilers %OpenMesh has been successfully tested for the following operating systems / compilers. This is only a list of tested compilers. More might be supported but are not tested. Make sure that your compiler supports at least C++11
Linux gcc >= 6.3
clang >= 3.3
Windows Microsoft Visual Studio 2015
Microsoft Visual Studio 2017
Tested MacOS X Compilers XCode
\section req_libs Required libraries (Only if you want to build the included Apps) Install the following external libraries / frameworks if you want to use the included Applications:

Qt5https://www.qt.io/download

\section download_source Getting the source code You can download one of the source packages provided at our website: OpenMesh.org

Or to get the latest version you can clone the repository using git. Make sure to clone recursively to get all required dependencies:
git clone --recursive https://gitlab.vci.rwth-aachen.de:9000/OpenMesh/OpenMesh.git \section build_systems Chosing build system %OpenMesh can be built using 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

\warning If your compiler does not support c++11 natively, you might have to enable it by changing the cmake call to:
cmake .. -DCMAKE_CXX_FLAGS=-std=c++98 You can choose the build type by using cmake with the flag
-DCMAKE_BUILD_TYPE=(Debug|Release) The default is: Release
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

\note When you link against the static libraries of OpenMesh and get the error "can not be used when making a shared object; recompile with -fPIC" you need to add "-fPIC" to the CMAKE_CXX_FLAGS. (This is usually added automatically) \section sec_compiling_windows Windows \subsection windows_using_cmake Compiling OpenMesh using CMake Building OpenMesh on Windows requires cmake to generate the project files for Visual Studio.

\section sec_compiling_macosx MacOS X To compile OpenMesh, you need cmake on your system which is the minimal requirement to build OpenMesh. We recommend using homebrew (https://brew.sh/index_de) for installing additional packages required for compiling OpenMesh or other projects. After installing homebrew, you can use the following command to install cmake:
brew install cmake            ## cmake generates the makefiles

Optional libraries which can be used to build OpenMesh:
brew install googletest            # Required to compile the included tests
brew install qt            # Required to compile the included UI example apps

Download and install required libraries as stated above. You can download %OpenMesh's sources from www.openmesh.org or check out the latest repository via GIT (Recommended to get the latest version of OpenMesh):
https://gitlab.vci.rwth-aachen.de:9000/OpenMesh/OpenMesh.

\subsection mac_using_cmake Compiling OpenMesh using CMake We recommend you to use CMake >= 3.7 as build system. This can also easily be installed via Homebrew as well as the Qt >= 6.2 library which is used for some example applications in %OpenMesh.
Once installed, change to %OpenMesh's root directory and create a directory named e.g. "buildDebug" (assuming you want to build with debug symbols).
Then type in the following command to initially set up the build environment:

cmake ..            ## Generates the appropriate Makefiles

Note: If the build directory is not a subdirectory of %OpenMesh's root folder, replace ".." with %OpenMesh's absolute (or relative) path. In order to manually set specific build variables, just type:

ccmake .            ## Configure build environment

This opens the CMake configure tool. Change the CMAKE_BUILD_TYPE variable to "Release" in order to prepare build for release configuration. Now, when everything is set up, just type:

make                ## Build %OpenMesh

And optionally:

make doc            ## Build %OpenMesh's documentation

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. **/ /** \page compiling_tests Compiling OpenMesh unit tests %OpenMesh comes with a set of unittests for all platforms. In order to run these tests, you need to enable the cmake flag OPENMESH_BUILD_UNIT_TESTS. You also need GoogleTest on your machine. Configure the cmake variables in OpenMesh to point to your GTest include dirs and libraries (check the Advanced button in cmake, if you don't see these options). Than run cmake and build OpenMesh. Afterwards you should have a Unittests subdirectory in your binary build folder. This directory includes the unittest executables and several test files for input and output checks. You can run the executables directly, but make sure, that the working directory is the directory where the executables are. **/ //-----------------------------------------------------------------------------