To compile the library you need a C++14 conforming compiler (like g++ 5 and newer). The build system is written in CMake and the code is hosted in a Git repository, so you'll need CMake and Git, too.
LVR depends on several libraries that need to be installed on your system. Some of those dependencies are optional and are only used to enable more LVR features. A coarse overview of LVR's dependencies:
- Program Options
- Smart Pointer (Note: LVR is currently transitioning to std's smart pointer, so this dependency might be dropped in the future)
- Glut 3
- Glut XMU
- Eigen 3
- VTK 5
On Ubuntu (16.04)To install all of the above dependencies on Ubuntu 16.04, you can simply execute these commands:
# The basics sudo apt install build-essential cmake git # Requires dependencies sudo apt install libflann-dev liblz4-dev libgsl-dev libxmu-dev libboost-dev libeigen3-dev libvtk5-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libboost-mpi-dev libboost-all-dev freeglut3-dev # For generating the documentation sudo apt install doxygen libgraphviz-devThis should give you an environment ready to use LVR.
Compiling the SoftwareAfter cloning the Git repository (or downloading the source code in another way), change into LVR's directory and execute these commands to compile LVR:
# Out-of-source builds are recommended mkdir build cd build # You can also choose "Debug" if you want to debug LVR code. This step will # show you if you are still missing some library dependencies. cmake -DCMAKE_BUILD_TYPE=Release .. # Compiling LVR. The number of the parameter -j denotes how many threads # will be used (how many compilations will take place at once). Set # this number to approximately the number of CPU cores you have. make -j8Afterwards, there should be several executables in 'build/bin/' as well as some other artifacts in 'build/'.