In the src
directory there are several folders containing all the source code and configuration files that allows to build MeshLab.
The source code of MeshLab is structured in the following directories:
- cmake: it contains a series of cmake scripts used to find external libraries;
- external: it contains a series of cmake configuration files that will download external libraries needed by MeshLab and several plugins;
- common: a series of utility classes and functions used by MeshLab and its plugins;
- meshlab: GUI and core of MeshLab;
- meshlabplugins: all the plugins that can be added to MeshLab;
- use_cpu_opengl: a tool compiled only under windows that allows to use non-GPU accelerated OpenGL functions;
- vcglib: submodule containing the vcglib.
MeshLab builds with the three major compilers: gcc
, clang
, and msvc
. It requires Qt 5.15, cmake and optionally ninja (required on windows). Only 64 bit is supported.
After setting up the Qt environment:
git clone --recursive https://github.com/cnr-isti-vclab/meshlab
mkdir meshlab/build
cd meshlab/build
cmake ..
make
or, using ninja (supported also on Windows):
cmake -GNinja ..
ninja
You can also use QtCreator to build MeshLab:
- Install QtCreator and Qt 5.15;
- Open
CMakeLists.txt
; - Configure and build MeshLab.
External libraries required by plugins, if not found, are automatically downloaded by cmake
during the configuration, and placed into src/external/downloads
.
On osx some plugins exploit openmp parallelism (screened poisson, isoparametrization) so you need a compiler supporting it and the clang provided by xcode does not support openmp. You can install all the required libraries by running the following command in a terminal:
brew install libomp
On Windows, we suggest to build MeshLab using QtCreator. Before trying to build, you should:
- install VisualStudio >= 2017 with the C++ development package;
- install Qt 5.15 and QtCreator.
then, open the CMakeLists.txt file and build MeshLab.