Surface_mesh
1.0
A simple and efficient halfedge-based mesh data structure
|
Surface_mesh uses CMake as its build system. Version 2.6.4 or greater is required.
Surface_mesh has been tested to build with the following compilers:
Operating System | Compiler |
---|---|
Linux | gcc |
Mac OS-X | gcc, clang |
Windows | Visual Studio 2008 |
The latest release is available from the official project page. A snapshot of the current sources can be obtained from the git repository at
https://opensource.cit-ec.de/git/surface_mesh/
Surface_mesh relies on CMake
as its build and configuration system. CMake
is a cross-platform build-system capable of generating different build files (so-called generators) for a specific platform, e.g., Makefiles for Linux/Unix, Xcode projects for Mac OS-X and Visual Studio projects for Windows.
On the comamnd line change to the top-level Surface_mesh directory, create a build directory and run cmake
:
$ cd surface_mesh $ mkdir build $ cd build $ cmake ..
The configuration procedure can be fine-tuned by specifying flags using the -D
option of cmake
:
$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=/usr/bin/g++
The command above would configure CMake
to use release mode as its build type and /usr/bin/g++
as its C++ compiler.
In order to compile the included examples configure CMake with
$ cmake -DWITH_EXAMPLES=true ..
Commonly used flags are shown below.
Flag | Description |
---|---|
CMAKE_BUILD_TYPE | Specify the build type, e.g. Debug or Release. |
CMAKE_CXX_COMPILER | Specify the compiler to be used. |
CMAKE_CXX_FLAGS | Specify additional compiler flags, e.g. "-DNDEBUG" |
For additional information on using cmake
and customizing its configuration see the CMake documentation.
After successful configuration Surface_mesh can be build using the chosen build system. For a Unix-like environment the default generator is Makefiles. In order to build Surface_mesh just call
$ make
from the top-level build directory. In order to build Surface_mesh in parallel use the -j
option of make
:
$ make -j
The resulting library program is named libsurface_mesh.so
and located in the current working directory.
In order to build the full HTML manual and reference documentation call
$ make doxygen
The resulting HTML documentation can be found in the doc/ subdirectory.
In order to install Surface_mesh just call
$ sudo make install
Upon installation, both the library and headers will be installed to the directory given via CMAKE_INSTALL_PREFIX, which defaults to /usr/local/ on Unix-like systems. If you need to install to a custom location set the install prefix during build configuration:
$ cmake -DCMAKE_INSTALL_PREFIX=<your custom path> ..