Replace Superbuild by vcpkg
What changes will be made and why they would make a better Orfeo ToolBox?
High level description
The Superbuild is complex and costly to maintain. The use of a C++ package manager like vcpckg (https://vcpkg.readthedocs.io/en/latest/) could help simplify things.
A C++ package manager allows installing dependencies (pre-compiled binaries or building from sources) similarly to a linux package manager (apt, yum) or Python's pip, like:
vcpkg install sqlite3
From the 37 dependencies in the Superbuild, vcpkg has everything except for
- HDF4
- libsvm
- muparserx
- openthreads
- ossim
- qtw
- shark
Ports files (recipes for building a library) can be submitted to vcpkg. As an example, gdal is packaged like this https://github.com/Microsoft/vcpkg/tree/master/ports/gdal
Once the dependencies are installed, they can be used with CMake with find_package
and passing the toolchain file to the cmake configuration:
cmake -DCMAKE_TOOLCHAIN_FILE=${VCPKG_DIR}/scripts/buildsystems/vcpkg.cmake ../
The plan would therefore be:
- Submit port files to vcpkg for the missing OTB dependencies
- Submit a port file for OTB
vcpkg install otb
Risks and benefits
- Benefits: reduced work for OTB dev team, binary distribution of the developper version of OTB, one line OTB installation
- Dependency on an external tool (but which is open source)
Alternatives for implementations
Other C++ package managers exist (like conan http://conan.io).