Generate CMake config and export targets from remote module build as standalone cmake project
OTB includes a useful extension to ITK remote module mechanisme which allows to build module as a standalone cmake project using the option OTB_BUILD_MODULE_AS_STANDALONE.
The limitation of this mode is that dependency between remote modules will NOT be tracked.
Nevertheless, it will be useful if in case of external build, targets and config cmake files can be automaticcally generated by cmake during the module compilatio nto allow to include external remote module in a third part project using a find_package.
For in source build, remote modules cmake targets and config files are correctly generated and added to the OTB build/install tree where modules are deployed. It should not be so difficult to also generate
For instance the config file can be generated with the configure_package_config_file package. The list of targets (libs and applications from the remote module) can perhaps be
This generation can be added to the OTBModuleExternal.cmake file in OTB source tree or added in the OTB module template used generally by otb user to start a new remote module.