Page MenuHomePhabricator

mitkFunctionInstallAutoLoadModules does not install dependencies
Closed, WontfixPublic

Description

CMake function mitkFunctionInstallAutoLoadModules() can be used to find modules that "auto-load" with a given other module (auto-loading is a Micro-Services feature). Problems can arise when auto-loaded modules depend on other modules/libraries that are not required by anything other in your project. Such dependencies are currently not installed. (Example: segmentation algorithms define a segmentation interface via mircro services and one of the auto-load modules depends on OpenCV, which is otherwise not used in the application)

Since I don't find a good way to integrate dependency searching directly into mitkFunctionInstallAutoLoadModules(), I have implemented a solution, where the function returns the list of discovered auto-load modules. This list of modules can then be fed into the MITK_INSTALL_TARGETS macro (as plugins), which will do the dependency checking via CMake's fixup_bundle() function.

The solution has been tested successfully on Linux and Windows, and it seems clear enough for users to understand.

Event Timeline

maleike added a subscriber: maleike.

New remote branch pushed: bug-16505-mitkFunctionInstallAutoLoadModules_dependencies

(In reply to Daniel Maleike from comment #0)

Since I don't find a good way to integrate dependency searching directly
into mitkFunctionInstallAutoLoadModules(), I have implemented a solution,
where the function returns the list of discovered auto-load modules.

mitkFunctionInstallAutoLoadModules() was never intended to do dependency checking, just "installing" the auto-load modules into the install prefix. The CMake function "fixup_bundle" (shipped with the CMake distribution) should handle the complete dependency checking and "fixing up" libraries in the install tree which have missing dependencies.

This
list of modules can then be fed into the MITK_INSTALL_TARGETS macro (as
plugins), which will do the dependency checking via CMake's fixup_bundle()
function.

The solution has been tested successfully on Linux and Windows, and it seems
clear enough for users to understand.

I would still like to understand why the current set-up is not working. Introducing a new "return variable" is fine for a work-around but I would rather not have it integrate into the master/release. Getting rid of it later will get difficult if it is used in external projects.

New remote branch pushed: bug-16505-mitkFunctionInstallAutoLoadModules_dependencies-rebased

Current release is finished. Reseting target milestone...

kislinsk removed engelm as the assignee of this task.
kislinsk added a project: Auto-closed.
kislinsk added subscribers: engelm, kislinsk.

Hi there! 🙂

This task was auto-closed according to our Task Lifecycle Management.
Please follow this link for more information and don't forget that you are encouraged to reasonable re-open tasks to revive them. 🚑

Best wishes,
The MITK devs