I want to build MITK with some already compiled external libs (ANN, DCMTK, GDCM, ITK, VTK, tinyxml). Each one has its own folder structure that is specified in a seperate config.cmake file.
During MITK build system generation CMake will find it when specifying the location of the config.cmake file of that external lib as
set (EXTERNAL_ITK_DIR "C:/repo_cache/stable/win64-vc12/3rd_party/itk/4.5.1/cmake" CACHE PATH "")
But when starting the compiled mitkWorkbench with the batch scripts "startMitkWorkbench_release.bat" the application doesn't start but lists errors that the libs can't be found "Pre-loading library "liborg_mitk_gui_qt_ext" failed: "Cannot load library liborg_mitk_gui_qt_ext"
This is similar to http://thread.gmane.org/gmane.comp.lib.mitk.user/4481 and caused by a false extended path in the batch scripts. Here C:/repo_cache/stable/win64-vc12/3rd_party/itk/4.5.1/cmake/bin instead of C:/repo_cache/stable/win64-vc12/3rd_party/itk/4.5.1/bin is defined (additional "cmake").
So the build system founds everything needed and the compiler generated the application but the batch scripts can't be used as they are.
I found the cause in a Todo in mitkFunctionGetLibrarySearchPaths.cmake:
- The code below is sub-optimal. It makes assumptions about
- the structure of the build directories, pointed to by
- the *_DIR variables. Instead, we should rely on package
- specific "LIBRARY_DIRS" variables, if they exist.
I will fix the bug according to my current requirements in my Github fork and update this bug once ready.