MeshLib
 
Loading...
Searching...
No Matches
Integration

Windows

There are two general options of integrating MeshLib into your project:

  1. Submodule
  2. Distribution

Common for both options:
Please install vcpkg, and integrate it into Visual Studio (note that vcpkg requires English language pack in Visual Studio, and vcpkg cannot be installed on FAT volumes, only on NTFS):

$ git clone https://github.com/Microsoft/vcpkg.git
$ cd vcpkg
$ git checkout 5c54cc06554e450829d72013c4b9e4baae41529a
$ .\bootstrap-vcpkg.bat
$ .\vcpkg integrate install (with admin rights)
$ cd ..

More details here: vcpkg

  1. Copy MeshLib/thirdparty/vcpkg/triplets/x64-windows-meshlib.cmake to vcpkg/triplets folder of vcpkg installation.
  2. Execute install.bat
    $ cd vcpkg # or add vcpcg to PATH
    $ ../MeshLib/thirdparty/install.bat

Submodule:
You can have MeshLib as submodule in your repository, and inculde all MeshLib's projects to your solution.

Note
You should use MeshLib/source/common.props in other projects of your solution.
Note
You can customize props by defining CustomMRProps.props in directory above common.props

Distribution:
You can download distribution and integrate it in your projects.
Project settings:

  1. C/C++ -> General -> Additional Include Directories add distribution\install\include;
  2. Linker -> General -> Additional Library Directories add distribution\install\app\$(Configuration);
  3. Linker -> Input -> Additional Dependencies add distribution\install\lib\$(Configuration)\*.lib;
  4. Debug: C/C++ -> Preprocessor -> Preprocessor Defenitions add _ITERATOR_DEBUG_LEVEL=0;
  5. 'vcpkg -> Triplet' set x64-windows-meshlib

Make sure you copy all dlls from distribution\install\app\$(Configuration); to your $(TargetDir)

Note
MeshLib distribution has x64 build only
Note
Distribution is build with ITERATOR_DEBUG_LEVEL=0 in debug so you will need to setup this for your projects

Ubuntu/Fedora

You can download dev package and install it with your Linux OS package manager. Examples of integration with cmake can be found in the ./examples directory.

MacOS

Same as for Linux, but requires brew packages to be installed: xargs brew install < /Library/Frameworks/MeshLib.framework/Versions/Current/requirements/macos.txt