Request for changes-108: Make OTB package great again

From OTBWiki
Jump to: navigation, search

[Request for Changes - 108] Make OTB package great again

Status

Summary

This RFC address lot of enhancements and bug fixes into Packaging script spawned from 'formation_cnes' branch. The idea is to unify OTB, OTB-contrib, OTB-xdk into a single Package called OTB. It happen to evolve into a refac of packaging scripts (see cmake code structure below).

Rationale

OTB binary package started for windows with mingw binaries. MINGW was the only possible option at that time to build OTB in shared libs. the final package is distributed in a zip archive so that no administrative rights were needed for end-users. After one or two releases, this idea began to spread on other platforms. self-extractable, portable, easy-to-install binary package. Luckily, OTB already build all of its dependencies using SuperBuild with exception of compiler, cmake and swig. So a shell script script to check dll dependencies are evolved to cmake scripts and got settled under SuperBuild/Packaging/

After binary package for users, there comes developers who need to build OTB with different config, NEW modules and official remote modules. Consequently due to near-to-release-date scenario, all these new feature requests in Packaging were pushed as different stuff Now that there is more flavours of OTB package in a release than some of Linux distribution!. So based on the work on 'formation_cnes' a new branch update_pkg was created.

This task and its sub-tasks are tracked by the following JIRA story https://scrum.orfeo-toolbox.org/jira/browse/OTB-1268

Implementation details

Packaging is now placed under OTB source root directory and is no longer a sub-project of SuperBuild development headers and import libs (windows) are included in the package. some official remote modules are included in the package and it is known without "-contrib"

Classes and files

  • del 'SuperBuild/Packaging'
  • add 'Packaging/'
  • OTBConfig.cmake.in: added CXX14 standard flags
  • Modules/IO/TestKernel/test/CMakeLists.txt: adds -Wl,-no-as-needed is used on this module's test driver. (see inline comments)
  • SuperBuild/patches/
  • QT: a minimal build of QT is used in OTB (QtXml is no longer a dependency of OTBQt4)
  • ITK: itktestlib(from vnl) is activated only with testing
  • SHARK: fix list of required boost components
  • CMake/FindShark.cmake: fix list of required boost components
  • CMake/FindLibKML.cmake: fix list of required components
  • SuperBuild/CMakeLists.txt: Pass compile and link flags to all subprojects
  • CMake/OTBSetStandardCompilerFlags.cmake
  • CMake/otbcli.sh.in, otbgui.sh.in, otbcli.bat, otbgui.bat
  • deactivate GLUT and GLFW together on OSX
cmake code structure
  • All cmake functions are in it's own file.
  • These function are called from Packaging/CMakeLists.txt.
  • If you happen to find two function defined in a single file, consider this a bug.
  • The idea is to achieve code encapsulation without the cpp classes.

Applications

None

Tests

4 tests are added to Packaging

  • tu_install_package - test install of package to a temp directory
  • tu_selftester - run selftester script from the installed package
  • tu_build_examples - run a cmake configure on OTB/Examples and test building of HelloWorldOTB, Pipeline
  • tu_uninstall_otb - Test uninstall of OTB from tu_install_package

Documentation

Work in progress

Additional notes

  • OTBOpenGL module exports the full path to libGL.so and libGLU.so in targets-release.cmake and OTBOpenGL.cmake.

This has to be fixed (TODO)