Status: Currently you can depend a module on autoload modules. This is not correct and leads to problems like seen in T26976.
There should never be a need to directly depend on autoload modules as the provide implementation (e.g. io serivices), but the public interfaces one should depend on are provided by normal modules.
Proposed solution:
- Every autoload module target has the target property "MITK_AUTOLOAD_DIRECTORY".
- Thus check in the MITK_CREATE_MACRO if one of the modules specified by "DEPENDS" is an autoload module (has the target property "MITK_AUTOLOAD_DIRECTORY")
- If this is the case an informative CMake error should be thrown.