Chapter 3
Compiling Monteverdi from source

3.1 Linux and Mac OS X

Compiling Monteverdi from source follows the same procedure as a regular CMake project: setup a directory for an out-of-source build, configure and compile.

3.1.1 Monteverdi

Make sure OTB is compiled with at least OTB_USE_QT4, OTB_USE_GLUT, OTB_USE_GLFW and OTB_USE_GLEW set to ON. Setup another out-of-source build environment for Monteverdi:

$ mkdir ~/monteverdi  
$ cd ~/monteverdi  
$ git clone https://git@git.orfeo-toolbox.org/git/monteverdi2.git  
$ mkdir build  
$ mkdir install

Remember to checkout the develop branch if you want the current development version:

$ cd ~/monteverdi/monteverdi2  
$ git checkout develop

CMake needs to find both OTB and QWT installation locations. For example, set an CMake cache pre-population script with the following content:

# monteverdi-configuration.cmake  
set(CMAKE_INSTALL_PREFIX "~/monteverdi/install" CACHE STRING "" FORCE)  
set(OTB_DIR "~/OTB/install/lib/cmake/OTB-5.0" CACHE STRING "" FORCE)  
set(QWT_INCLUDE_DIR "/usr/include/qwt5-qt4" CACHE STRING "" FORCE)  
set(QWT_LIBRARY "/usr/lib64/libqwt.so.5" CACHE STRING "" FORCE)

Configure and compile monteverdi:

$ cd ~/monteverdi/build  
$ cmake -C monteverdi-configuration.cmake ../monteverdi2  
$ make  
$ make install

Remember to set the OTB_APPLICATION_PATH environment variable to allow monteverdi to find the OTB applications:

export OTB_APPLICATION_PATH=~/OTB/build/lib/otb/applications  
./bin/monteverdi

3.2 Windows

Everything that is needed for Monteverdi development on Windows, including compiling from source, is covered in details on the OTB wiki at:

http://wiki.orfeo-toolbox.org/index.php/OTB_development_on_Windows