In this section, we describe how to configure, build, and install PMP in detail.
PMP uses CMake as its build configuration system. Version 3.16.3 or greater is required. PMP requires a C++20-compliant compiler. We continuously build and test PMP with the following compilers and operating systems:
Operating System | Compiler |
---|---|
Linux | gcc 11.4.0 |
macOS | AppleClang 14.0.0 |
Windows | Visual Studio 2022 |
We do not officially support older compiler versions.
Some parts of PMP depend on the following third-party libraries:
Library | Description | Version |
---|---|---|
Eigen | C++ linear algebra library | ≥ 3.4.0 |
OpenGL | Open Graphics Library | ≥ 3.3 |
GLEW | OpenGL Extension Wrangler Library | ≥ 2.1.0 |
GLFW | Graphics Library Framework | ≥ 3.4 |
ImGui | Immediate Mode GUI | ≥ 1.90.4 |
Google Test | C++ Test Framework | ≥ 1.13.0 |
By default, we include the corresponding libraries in our repository. Note that OpenGL and related dependencies are optional. They are only needed if you want to use the viewer classes. Google Test is optional as well and only required if you want to run the unit test suite.
PMP 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 macOS, and Visual Studio projects for Windows.
On the command line, change to the top-level PMP directory, create a build directory and run cmake
:
The configuration procedure can be fine-tuned by specifying flags using the -D
option of cmake
:
The command above would configure CMake
to use release mode as its build type and /usr/bin/g++
as its C++ compiler.
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, PMP can be build using the chosen build system. For a Unix-like environment the default generator is Makefiles. In order to build PMP just call
from the top-level build directory. In order to build pmp in parallel use the -j
option of make
:
The resulting library is named libpmp.so
and located in the current working directory.
In order to build the full HTML manual and reference documentation call
The resulting HTML documentation can be found in the docs/html/
sub-directory. Note: this requires Doxygen to be installed. In order to generate bibliographical references you need to have BibTex installed.
In order to install PMP just call
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:
The library can be uninstalled using
To use PMP in your own CMake-based projects simply include the library by using find_package(pmp)
and point CMake to the directory containing PMP CMake configuration file pmpConfig.cmake
. This can be either the PMP build directory
or the installed version
This way, you can simply link your own target against PMP
Note: The usage described above is currently limited to the core and algorithms modules of PMP. If you want to use the visualization module you need to link your target against pmp_vis
and its dependencies: stb_image
, imgui
, glfw
, glew
, as well as your platform OpenGL library.
By default, PMP uses 32-bit unsigned integers as internal index type to reference entities. However, if you need to process very large data sets this might not be sufficient. In this case, you can change the index type to be 64-bit by specifying
during build configuration.
By default, PMP uses float
as Scalar
type. In case you require higher floating point precision you can change the Scalar
type to double
by specifying
during build configuration.