[SofaExporter] Modularize (+minor dependency cleaning) #915
Waiting for FOSDEM to start...so let's make a small cleaning PR.
Reviewers will merge only if all these checks are true.
As said in the PR description. This PR is converting the code into a properly package module/plugin.
Currently in Sofa a module/plugin that can be search through the find_package() CMake macro. A lot of
If a third module SofaX is just doing find_package(SofaExporter) it is possible to write
The solution to fix that is to have the files to include in a subdirectory of the module/plugin.
To me these have two totally different usages.
config.h is containing the different parameters related to the module...and it should be included in every .h of a module because this is where the SOFA_MODULE_API is implemented.
Appart from that is the initModule.cpp/initModule.h which contains the defintion/declaration for functions needed to intialize the module.
In the past initModule.h was containing the initModule() function...but when it is a real plugin we are using the Plugin API and dlopen for that. If we want to allow people to use the module without using the dynamic library we add into initModule.h the declaration of the "C" function that are in initModule.cpp