-
Notifications
You must be signed in to change notification settings - Fork 817
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
09203c1
commit fe6edde
Showing
4 changed files
with
29 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,50 @@ | ||
# MeshLab Source Code structure | ||
|
||
In the `src` folder there are several folders containing all the source code and configuration files that allows to compile MeshLab. | ||
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 folders: | ||
The source code of MeshLab is structured in the following directories: | ||
|
||
* [external](https://github.com/cnr-isti-vclab/meshlab/tree/master/src/external): it contains a series of external libraries needed by several plugins. Some of these libraries are compiled before the compilation of meshlab, if a corresponding system library is not found and then linked; some other libraries are just included by some plugins. | ||
* [external](https://github.com/cnr-isti-vclab/meshlab/tree/master/src/external): it contains a series of external libraries needed by several plugins. Some of these libraries are compiled before the compilation of meshlab, if a corresponding system library is not found and then linked; other are header-only libraries that are just included by some plugins. | ||
* [common](https://github.com/cnr-isti-vclab/meshlab/tree/master/src/common): a series of utility functions used by MeshLab and its plugins. | ||
* [meshlab](https://github.com/cnr-isti-vclab/meshlab/tree/master/src/meshlab): GUI and core of MeshLab. | ||
* [meshlabserver](https://github.com/cnr-isti-vclab/meshlab/tree/master/src/meshlabserver): a tool that allows to compute mesh operations through command line | ||
* [meshlabplugins](https://github.com/cnr-isti-vclab/meshlab/tree/master/src/meshlabplugins): all the plugins that can be added to MeshLab. | ||
|
||
The following folders are used by `cmake`: | ||
|
||
* cmake; | ||
* templates. | ||
|
||
There are also two folders that contains MeshLab plugins that are no longer supported or are experimental, and these plugins are not compiled in any of MeshLab configurations: | ||
|
||
* plugins_experimental; | ||
* plugins_unsupported. | ||
|
||
## Compiling MeshLab | ||
|
||
MeshLab compiles with the three major compilers: `gcc`, `clang`, and `msvc`. | ||
## Build MeshLab | ||
|
||
MeshLab requires [Qt](https://www.qt.io/) >= 5.9, with `xmlpatterns` as additional package. | ||
MeshLab builds with the three major compilers: `gcc`, `clang`, and `msvc`. It requires [Qt](https://www.qt.io/) >= 5.12, with `xmlpatterns` as additional package. | ||
|
||
After setting up the Qt environment: | ||
|
||
git clone --recursive https://github.com/cnr-isti-vclab/meshlab | ||
cd meshlab/src | ||
qmake | ||
make | ||
|
||
Then, a meshlab executable can be found inside the `distrib` folder. | ||
|
||
You can also use `cmake`: | ||
mkdir meshlab/src/build | ||
cd meshlab/src/build | ||
cmake .. | ||
make | ||
|
||
git clone --recursive https://github.com/cnr-isti-vclab/meshlab | ||
cd meshlab | ||
cmake src/ | ||
make | ||
|
||
You can also use [QtCreator](https://www.qt.io/product) to build meshlab: | ||
|
||
1. Install QtCreator and Qt >= 5.9 with `xmlpatterns` as additional package; | ||
2. Open `meshlab.pro` inside `src`; | ||
1. Install QtCreator and Qt >= 5.12 with `xmlpatterns` as additional package; | ||
2. Open `CMakeLists.txt` inside `src`; | ||
3. Select your favourite shadow build directory; | ||
4. Before the build, deactivate the `QtQuickCompiler` option from the qmake call in the project options; | ||
5. Build meshlab. | ||
|
||
MeshLab has a plugin architecture and therefore all the plugins are compiled separately; some of them are harder to be compiled. Don't worry, if a plugin fails to compile just remove it and you lose just that functionality. As a first step you should try to compile MeshLab with the configuration "meshlab_mini": | ||
|
||
qmake "CONFIG+=meshlab_mini" | ||
make | ||
|
||
This configuration contains the info for building meshlab with a minimal set of plugins. | ||
4. Build meshlab. | ||
|
||
Some plugins of MeshLab need external libraries. All the required libraries are included in the `meshlab/src/external` folder, that are automatically compiled before MeshLab in all its configurations. | ||
MeshLab has a plugin architecture and therefore all the plugins are compiled separately; some of them are harder to be compiled. Don't worry: if a plugin fails to compile, just remove it and you lose just that functionality. | ||
|
||
### Platform specific notes | ||
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. Qmake is configured in order to look for the `clang` compiler that is automatically installed by `homebrew`, calling: | ||
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 llvm libomp | ||
|
||
On __Linux__, you may optionally choose to use your system installs of some libraries rather than the bundled versions. | ||
The library name, argument to add to all `qmake` calls (e.g. by adding to `QMAKE_FLAGS` in the example below), and Debian package name are listed below: | ||
On __Windows__, we suggest to build meshlab using QtCreator. Before trying to build, you should: | ||
|
||
* Eigen3 (at least 3.2) - `CONFIG+=system_eigen3` - package `libeigen3-dev` | ||
* GLEW (version 2 or newer) - `CONFIG+=system_glew` - package `libglew-dev` | ||
* lib3ds - `CONFIG+=system_lib3ds` - package `lib3ds-dev` | ||
* OpenCTM - `CONFIG+=system_openctm` - package `libopenctm-dev` | ||
* BZip2 - `CONFIG+=system_bzip2` - package `libbz2-dev` | ||
* install VisualStudio >= 2017 with the C++ developement package; | ||
* install Qt >= 5.12 and QtCreator. | ||
|
||
The versions found in Debian Buster are all new enough to meet these requirements. | ||
then, open the CMakeLists.txt file and try to build MeshLab. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters