diff --git a/CMakeExternals/Boost.cmake b/CMakeExternals/Boost.cmake
index bf50d36881..323448f549 100644
--- a/CMakeExternals/Boost.cmake
+++ b/CMakeExternals/Boost.cmake
@@ -1,343 +1,343 @@
 #-----------------------------------------------------------------------------
 # Boost
 #-----------------------------------------------------------------------------
 
 include(mitkFunctionGetMSVCVersion)
 
 #[[ Sanity checks ]]
-if(DEFINED BOOST_ROOT AND NOT EXISTS ${BOOST_ROOT})
-  message(FATAL_ERROR "BOOST_ROOT variable is defined but corresponds to non-existing directory")
+if(DEFINED Boost_ROOT AND NOT EXISTS ${Boost_ROOT})
+  message(FATAL_ERROR "Boost_ROOT variable is defined but corresponds to non-existing directory")
 endif()
 
 string(REPLACE "^^" ";" MITK_USE_Boost_LIBRARIES "${MITK_USE_Boost_LIBRARIES}")
 
 set(proj Boost)
 set(proj_DEPENDENCIES )
 set(Boost_DEPENDS ${proj})
 
-if(NOT DEFINED BOOST_ROOT AND NOT MITK_USE_SYSTEM_Boost)
+if(NOT DEFINED Boost_ROOT AND NOT MITK_USE_SYSTEM_Boost)
 
   #[[ Reset variables. ]]
   set(patch_cmd "")
   set(configure_cmd "")
   set(install_cmd "")
 
-  set(BOOST_ROOT ${ep_prefix})
-  set(Boost_DIR "${BOOST_ROOT}/lib/cmake/Boost-1.82.0")
+  set(Boost_ROOT ${ep_prefix})
+  set(Boost_DIR "${Boost_ROOT}/lib/cmake/Boost-1.82.0")
 
   if(WIN32)
-    set(BOOST_LIBRARYDIR "${BOOST_ROOT}/lib")
+    set(BOOST_LIBRARYDIR "${Boost_ROOT}/lib")
   endif()
 
   #[[ If you update Boost, make sure that the FindBoost module of the minimum
       required version of CMake supports the new version of Boost.
 
       In case you are using a higher version of CMake, download at least the
       source code of the minimum required version of CMake to look into the
       right version of the FindBoost module:
 
         <CMAKE_INSTALL_DIR>/share/cmake-<VERSION>/Modules/FindBoost.cmake
 
       Search for a list called _Boost_KNOWN_VERSIONS. If the new version is
       not included in this list, you have three options:
 
         * Update the minimum required version of CMake. This may require
           adaptions of other parts of our CMake scripts and has the most
           impact on other MITK developers. Yet this is the safest and
           cleanest option.
 
         * Set Boost_ADDITIONAL_VERSIONS (see the documentation of the
           FindBoost module). As Boost libraries and dependencies between
           them are hard-coded in the FindBoost module only for known versions,
           this may cause trouble for other MITK developers relying on new
           components of Boost or components with changed dependencies.
 
         * Copy a newer version of the FindBoost module into our CMake
           directory. Our CMake directory has a higher precedence than the
           default CMake module directory. Doublecheck if the minimum required
           version of CMake is able to process the newer version of the
           FindBoost module. Also, DO NOT FORGET to mention this option right
           above the call of cmake_minimum_required() in the top-level
           CMakeLists.txt file AND in this file right above the set(url)
           command below so if we update the minimum required version of CMake
           or use another option in the future, we do not forget to remove our
           copy of the FindBoost module again. ]]
 
   set(url "${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/boost_1_82_0.tar.gz")
   set(md5 f7050f554a65f6a42ece221eaeec1660)
 
   if(MITK_USE_Boost_LIBRARIES)
 
      #[[ Boost has a two-step build process. In the first step, a bootstrap
          script is called to build b2, an executable that is used to actually
          build Boost in the second step.
 
          The bootstrap script expects a toolset (compiler) argument that is
          used to build the b2 executable. The scripts and their expected
          argument format differ between Windows and Unix. ]]
 
     if(WIN32)
 
       mitkFunctionGetMSVCVersion()
 
       if(VISUAL_STUDIO_VERSION_MINOR EQUAL 0)
 
         #[[ Use just the major version in the toolset name. ]]
         set(bootstrap_args vc${VISUAL_STUDIO_VERSION_MAJOR})
 
       elseif(VISUAL_STUDIO_VERSION_MAJOR EQUAL 14 AND VISUAL_STUDIO_VERSION_MINOR LESS 20)
 
         #[[ Assume Visual Studio 2017. ]]
         set(bootstrap_args vc${VISUAL_STUDIO_VERSION_MAJOR}1)
 
       elseif(VISUAL_STUDIO_VERSION_MAJOR EQUAL 14 AND VISUAL_STUDIO_VERSION_MINOR LESS 30)
 
         #[[ Assume Visual Studio 2019. ]]
         set(bootstrap_args vc${VISUAL_STUDIO_VERSION_MAJOR}2)
 
       elseif(VISUAL_STUDIO_VERSION_MAJOR EQUAL 14 AND VISUAL_STUDIO_VERSION_MINOR LESS 40)
 
         #[[ Assume Visual Studio 2022. ]]
         set(bootstrap_args vc${VISUAL_STUDIO_VERSION_MAJOR}3)
 
       else()
 
         #[[ Fallback to the generic case. Be prepared to add another elseif
             branch above for future versions of Visual Studio. ]]
         set(bootstrap_args vc${VISUAL_STUDIO_VERSION_MAJOR})
 
       endif()
 
     else()
 
       #[[ We support GCC and Clang on Unix. On macOS, the toolset must be set
           to clang. The actual compiler for all of these toolkits is set
           further below, after the bootstrap script but before b2. ]]
 
       if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
         set(toolset gcc)
       elseif(CMAKE_CXX_COMPILER_ID STREQUAL Clang OR APPLE)
         set(toolset clang)
       endif()
 
       if(toolset)
         set(bootstrap_args --with-toolset=${toolset})
       endif()
 
       #[[ At least give it a shot if the toolset is something else and let
           the bootstrap script decide on the toolset by not passing any
           argument. ]]
 
     endif()
 
     #[[ The call of b2 is more complex. b2 arguments are grouped into options
         and properties. Options follow the standard format for arguments while
         properties are plain key-value pairs. ]]
 
     set(b2_options
       --build-dir=<BINARY_DIR>
       --stagedir=<INSTALL_DIR>
       --ignore-site-config #[[ Build independent of any site.config file ]]
       -q #[[ Stop at first error ]]
     )
 
     if(APPLE AND CMAKE_OSX_SYSROOT)
 
       #[[ Specify the macOS platform SDK to be used. ]]
       list(APPEND b2_options --sysroot=${CMAKE_OSX_SYSROOT})
 
     endif()
 
     foreach(lib ${MITK_USE_Boost_LIBRARIES})
       list(APPEND b2_options --with-${lib})
     endforeach()
 
     set(b2_properties
       threading=multi
       runtime-link=shared
       "cxxflags=${MITK_CXX${MITK_CXX_STANDARD}_FLAG} ${CMAKE_CXX_FLAGS}"
     )
 
     if(CMAKE_SIZEOF_VOID_P EQUAL 8)
       list(APPEND b2_properties address-model=64)
     else()
       list(APPEND b2_properties address-model=32)
     endif()
 
     if(BUILD_SHARED_LIBS)
       list(APPEND b2_properties link=shared)
     else()
       list(APPEND b2_properties link=static)
     endif()
 
     list(APPEND b2_properties "\
 $<$<CONFIG:Debug>:variant=debug>\
 $<$<CONFIG:Release>:variant=release>\
 $<$<CONFIG:MinSizeRel>:variant=release>\
 $<$<CONFIG:RelWithDebInfo>:variant=release>")
 
     if(WIN32)
 
       set(bootstrap_cmd if not exist b2.exe \( call bootstrap.bat ${bootstrap_args} \))
       set(b2_cmd b2 ${b2_options} ${b2_properties} stage)
 
     else()
 
       set(bootstrap_cmd #[[ test -e ./b2 || ]] ./bootstrap.sh ${bootstrap_args})
       set(b2_cmd ./b2 ${b2_options} ${b2_properties} stage)
 
       #[[ We already told Boost if we want to use GCC or Clang but so far we
           were not able to specify the exact same compiler we set in CMake
           when configuring the MITK superbuild for the first time.
           For example, this can be different from the system default
           when multiple versions of the same compiler are installed
           at the same time.
 
           The bootstrap script creates a configuration file for b2 that should
           be modified if necessary before b2 is called.
           We look for a line like
 
             using gcc ;
 
           and replace it with something more specific like
 
             using gcc : : /usr/bin/gcc-7.3 ;
 
           We use the stream editor sed for the replacement but since macOS is
           based on BSD Unix, we use the limited but portable BSD syntax
           instead of the more powerful GNU syntax. We also use | instead of
           the more commonly used / separator for sed because the replacement
           contains slashes.
 
           2021/06/15: The custom project-config.jam does not work well with
           SDK paths on macOS anymore, so we use a custom project-config.jam
           only on Linux for now. ]]
 
       if(toolset AND NOT APPLE)
         set(configure_cmd sed -i.backup "\
 s|\
 using[[:space:]][[:space:]]*${toolset}[[:space:]]*$<SEMICOLON>|\
 using ${toolset} : : ${CMAKE_CXX_COMPILER} $<SEMICOLON>|\
 g"
           <SOURCE_DIR>/project-config.jam
         )
       endif()
 
     endif()
 
   endif()
 
   if(WIN32)
     set(dummy_cmd cd .)
   else()
     set(dummy_cmd true) #[[ "cd ." does not work reliably ]]
   endif()
 
   if(NOT patch_cmd)
     set(patch_cmd ${dummy_cmd}) #[[ Do nothing ]]
   endif()
 
   if(NOT configure_cmd)
     set(configure_cmd ${dummy_cmd}) #[[ Do nothing ]]
   endif()
 
   if(WIN32)
     set(install_cmd
       if not exist $<SHELL_PATH:${ep_prefix}/include/boost/config.hpp>
       \( ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/boost <INSTALL_DIR>/include/boost \)
     )
   else()
     set(install_cmd
       # test -e <INSTALL_DIR>/include/boost/config.hpp ||
       ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/boost <INSTALL_DIR>/include/boost
     )
   endif()
 
   ExternalProject_Add(${proj}
     URL ${url}
     URL_MD5 ${md5}
     PATCH_COMMAND ${patch_cmd}
     CONFIGURE_COMMAND ${configure_cmd}
     BUILD_COMMAND ""
     INSTALL_COMMAND ${install_cmd}
   )
 
   ExternalProject_Add_Step(${proj} bootstrap
     COMMAND ${bootstrap_cmd}
     DEPENDEES patch
     DEPENDERS configure
     WORKING_DIRECTORY <SOURCE_DIR>
   )
 
   ExternalProject_Add_Step(${proj} b2
     COMMAND ${b2_cmd}
     DEPENDEES bootstrap
     DEPENDERS build
     WORKING_DIRECTORY <SOURCE_DIR>
   )
 
   if(WIN32)
 
     #[[ Reuse already extracted files. ]]
 
     set(stamp_dir ${ep_prefix}/src/Boost-stamp)
 
     configure_file(
       ${CMAKE_CURRENT_LIST_DIR}/extract-Boost.replacement.cmake
       ${stamp_dir}/extract-Boost.replacement.cmake
       COPYONLY)
 
     ExternalProject_Add_Step(${proj} pre_download
       COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_LIST_DIR}/Boost-pre_download.cmake
       DEPENDEES mkdir
       DEPENDERS download
       WORKING_DIRECTORY ${stamp_dir}
     )
 
   endif()
 
   set(install_manifest_dependees install)
 
   if(MITK_USE_Boost_LIBRARIES)
 
     if(WIN32)
 
       #[[ Move DLLs from lib to bin directory. ]]
 
       ExternalProject_Add_Step(${proj} post_install
         COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_LIST_DIR}/Boost-post_install-WIN32.cmake
         DEPENDEES install
         WORKING_DIRECTORY <INSTALL_DIR>/lib
       )
 
       set(install_manifest_dependees post_install)
 
     elseif(APPLE)
 
       #[[ Boost does not follow the common practice of either using rpath or
           absolute paths for referencing dependencies. We have to use the
           install_name_tool to fix this. ]]
 
       ExternalProject_Add_Step(${proj} post_install
         COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_LIST_DIR}/Boost-post_install-APPLE.cmake
         DEPENDEES install
         WORKING_DIRECTORY <INSTALL_DIR>/lib
       )
 
       set(install_manifest_dependees post_install)
 
     endif()
 
   endif()
 
   ExternalProject_Add_Step(${proj} install_manifest
     COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_LIST_DIR}/Boost-install_manifest.cmake
     DEPENDEES ${install_manifest_dependees}
     WORKING_DIRECTORY ${ep_prefix}
   )
 
 else()
 
   mitkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}")
 
 endif()
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2959cbd2bf..9c1fc88c97 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,1418 +1,1422 @@
 #[[ When increasing the minimum required version, check if Boost_ADDITIONAL_VERSIONS
     in CMake/PackageDepends/MITK_Boost_Config.cmake can be removed. See the first
     long comment in CMakeExternals/Boost.cmake for details. ]]
 
 set(MITK_CMAKE_MINIMUM_REQUIRED_VERSION 3.18)
 cmake_minimum_required(VERSION ${MITK_CMAKE_MINIMUM_REQUIRED_VERSION})
 
 if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.19 AND CMAKE_VERSION VERSION_LESS 3.19.2)
   message(FATAL_ERROR "\
 CMake v${CMAKE_VERSION} is defective [1]. \
 Please either downgrade to v3.18 or upgrade to at least v3.19.2.\n\
 [1] https://gitlab.kitware.com/cmake/cmake/-/issues/21529")
 endif()
 
 #-----------------------------------------------------------------------------
 # Policies
 #-----------------------------------------------------------------------------
 
 #[[ T28060
 
     https://cmake.org/cmake/help/v3.18/policy/CMP0091.html
     https://cmake.org/cmake/help/v3.18/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html
 
     We pass CMP0091 to all external projects as command-line argument:
       -DCMAKE_POLICY_DEFAULT_CMP0091:STRING=OLD
  ]]
 cmake_policy(SET CMP0091 OLD)
 
+if(POLICY CMP0135)
+  cmake_policy(SET CMP0135 NEW) # https://cmake.org/cmake/help/v3.24/policy/CMP0135.html
+endif()
+
 #-----------------------------------------------------------------------------
 # Superbuild Option - Enabled by default
 #-----------------------------------------------------------------------------
 
 option(MITK_USE_SUPERBUILD "Build MITK and the projects it depends on via SuperBuild.cmake." ON)
 
 if(MITK_USE_SUPERBUILD)
   project(MITK-superbuild)
   set(MITK_SOURCE_DIR ${PROJECT_SOURCE_DIR})
   set(MITK_BINARY_DIR ${PROJECT_BINARY_DIR})
 else()
   project(MITK VERSION 2023.04.99)
   include_directories(SYSTEM ${MITK_SUPERBUILD_BINARY_DIR})
 endif()
 
 #-----------------------------------------------------------------------------
 # MITK Extension Feature
 #-----------------------------------------------------------------------------
 
 set(MITK_EXTENSION_DIRS "" CACHE STRING "")
 
 unset(MITK_ABSOLUTE_EXTENSION_DIRS)
 
 foreach(MITK_EXTENSION_DIR ${MITK_EXTENSION_DIRS})
   get_filename_component(MITK_ABSOLUTE_EXTENSION_DIR "${MITK_EXTENSION_DIR}" ABSOLUTE)
   list(APPEND MITK_ABSOLUTE_EXTENSION_DIRS "${MITK_ABSOLUTE_EXTENSION_DIR}")
 endforeach()
 
 set(MITK_DIR_PLUS_EXTENSION_DIRS "${MITK_SOURCE_DIR}" ${MITK_ABSOLUTE_EXTENSION_DIRS})
 
 #-----------------------------------------------------------------------------
 # Update CMake module path
 #-----------------------------------------------------------------------------
 
 set(MITK_CMAKE_DIR ${MITK_SOURCE_DIR}/CMake)
 
 set(CMAKE_MODULE_PATH ${MITK_CMAKE_DIR})
 
 foreach(MITK_EXTENSION_DIR ${MITK_ABSOLUTE_EXTENSION_DIRS})
   set(MITK_CMAKE_EXTENSION_DIR "${MITK_EXTENSION_DIR}/CMake")
   if(EXISTS "${MITK_CMAKE_EXTENSION_DIR}")
     list(APPEND CMAKE_MODULE_PATH "${MITK_CMAKE_EXTENSION_DIR}")
   endif()
 endforeach()
 
 #-----------------------------------------------------------------------------
 # CMake function(s) and macro(s)
 #-----------------------------------------------------------------------------
 
 # Standard CMake macros
 include(FeatureSummary)
 include(CTest)
 include(CMakeParseArguments)
 include(FindPackageHandleStandardArgs)
 
 # MITK macros
 include(mitkFunctionGetGccVersion)
 include(mitkFunctionCheckCompilerFlags)
 include(mitkFunctionSuppressWarnings) # includes several functions
 include(mitkMacroEmptyExternalProject)
 include(mitkFunctionEnableBuildConfiguration)
 include(mitkFunctionWhitelists)
 include(mitkFunctionAddExternalProject)
 include(mitkFunctionAddLibrarySearchPaths)
 
 SUPPRESS_VC_DEPRECATED_WARNINGS()
 
 #-----------------------------------------------------------------------------
 # Set a default build type if none was specified
 #-----------------------------------------------------------------------------
 
 if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
   message(STATUS "Setting build type to 'Debug' as none was specified.")
   set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
 
   # Set the possible values of build type for cmake-gui
   set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
                STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
 endif()
 
 if(CMAKE_COMPILER_IS_GNUCXX)
   mitkFunctionGetGccVersion(${CMAKE_CXX_COMPILER} GCC_VERSION)
 else()
   set(GCC_VERSION 0)
 endif()
 
 set(MITK_CXX_STANDARD 17)
 
 set(CMAKE_CXX_EXTENSIONS 0)
 set(CMAKE_CXX_STANDARD ${MITK_CXX_STANDARD})
 set(CMAKE_CXX_STANDARD_REQUIRED 1)
 
 # This is necessary to avoid problems with compile feature checks.
 # CMAKE_CXX_STANDARD seems to only set the -std=c++<std> flag for targets.
 # However, compile flag checks also need to be done with -std=c++<std>.
 # The MITK_CXX<std>_FLAG variable is also used for external projects
 # build during the MITK super-build.
 mitkFunctionCheckCompilerFlags("-std=c++${MITK_CXX_STANDARD}" MITK_CXX${MITK_CXX_STANDARD}_FLAG)
 
 #-----------------------------------------------------------------------------
 # Warn if source or build path is too long
 #-----------------------------------------------------------------------------
 
 if(WIN32)
   set(_src_dir_length_max 50)
   set(_bin_dir_length_max 50)
   if(MITK_USE_SUPERBUILD)
     set(_src_dir_length_max 34) # _src_dir_length_max - strlen(ep/src/ITK-build)
     set(_bin_dir_length_max 40) # _bin_dir_length_max - strlen(MITK-build)
   endif()
 
   string(LENGTH "${MITK_SOURCE_DIR}" _src_n)
   string(LENGTH "${MITK_BINARY_DIR}" _bin_n)
 
   # The warnings should be converted to errors
   if(_src_n GREATER _src_dir_length_max)
     message(WARNING "MITK source code directory path length is too long (${_src_n} > ${_src_dir_length_max})."
                     "Please move the MITK source code directory to a directory with a shorter path." )
   endif()
   if(_bin_n GREATER _bin_dir_length_max)
     message(WARNING "MITK build directory path length is too long (${_bin_n} > ${_bin_dir_length_max})."
                     "Please move the MITK build directory to a directory with a shorter path." )
   endif()
 endif()
 
 #-----------------------------------------------------------------------------
 # Additional MITK Options (also shown during superbuild)
 #-----------------------------------------------------------------------------
 
 # -----------------------------------------
 # General build options
 option(BUILD_SHARED_LIBS "Build MITK with shared libraries" ON)
 option(WITH_COVERAGE "Enable/Disable coverage" OFF)
 option(BUILD_TESTING "Test the project" ON)
 option(MITK_FAST_TESTING "Disable long-running tests like packaging" OFF)
 option(MITK_XVFB_TESTING "Execute test drivers through xvfb-run" OFF)
 
 option(MITK_BUILD_ALL_APPS "Build all MITK applications" OFF)
 option(MITK_BUILD_EXAMPLES "Build the MITK Examples" OFF)
 
 mark_as_advanced(
   MITK_XVFB_TESTING
   MITK_FAST_TESTING
   MITK_BUILD_ALL_APPS
 )
 
 #-----------------------------------------------------------------------------
 # Set UI testing flags
 #-----------------------------------------------------------------------------
 if(MITK_XVFB_TESTING)
   set(MITK_XVFB_TESTING_COMMAND "xvfb-run" "--auto-servernum" CACHE STRING "Command and options to test through Xvfb")
   mark_as_advanced(MITK_XVFB_TESTING_COMMAND)
 endif(MITK_XVFB_TESTING)
 
 # -----------------------------------------
 # Other options
 set(MITK_CUSTOM_REVISION_DESC "" CACHE STRING "Override MITK revision description")
 mark_as_advanced(MITK_CUSTOM_REVISION_DESC)
 
 set_property(GLOBAL PROPERTY MITK_EXTERNAL_PROJECTS "")
 
 include(CMakeExternals/ExternalProjectList.cmake)
 
 foreach(MITK_EXTENSION_DIR ${MITK_ABSOLUTE_EXTENSION_DIRS})
   set(MITK_CMAKE_EXTERNALS_EXTENSION_DIR "${MITK_EXTENSION_DIR}/CMakeExternals")
   if(EXISTS "${MITK_CMAKE_EXTERNALS_EXTENSION_DIR}/ExternalProjectList.cmake")
     include("${MITK_CMAKE_EXTERNALS_EXTENSION_DIR}/ExternalProjectList.cmake")
   endif()
 endforeach()
 
 # -----------------------------------------
 # Other MITK_USE_* options not related to
 # external projects build via the
 # MITK superbuild
 
 option(MITK_USE_BLUEBERRY "Build the BlueBerry platform" ON)
 option(MITK_USE_OpenCL "Use OpenCL GPU-Computing library" OFF)
 option(MITK_USE_OpenMP "Use OpenMP" OFF)
 option(MITK_USE_Python3 "Use Python 3" OFF)
 
 #-----------------------------------------------------------------------------
 # Build configurations
 #-----------------------------------------------------------------------------
 
 set(_buildConfigs "Custom")
 
 file(GLOB _buildConfigFiles CMake/BuildConfigurations/*.cmake)
 
 foreach(_buildConfigFile ${_buildConfigFiles})
   get_filename_component(_buildConfigFile ${_buildConfigFile} NAME_WE)
   list(APPEND _buildConfigs ${_buildConfigFile})
 endforeach()
 
 foreach(MITK_EXTENSION_DIR ${MITK_ABSOLUTE_EXTENSION_DIRS})
   file(GLOB _extBuildConfigFiles "${MITK_EXTENSION_DIR}/CMake/BuildConfigurations/*.cmake")
 
   foreach(_extBuildConfigFile ${_extBuildConfigFiles})
     get_filename_component(_extBuildConfigFile "${_extBuildConfigFile}" NAME_WE)
     list(APPEND _buildConfigs "${_extBuildConfigFile}")
   endforeach()
 
   list(REMOVE_DUPLICATES _buildConfigs)
 endforeach()
 
 set(MITK_BUILD_CONFIGURATION "Custom" CACHE STRING "Use pre-defined MITK configurations")
 set_property(CACHE MITK_BUILD_CONFIGURATION PROPERTY STRINGS ${_buildConfigs})
 
 mitkFunctionEnableBuildConfiguration()
 
 mitkFunctionCreateWhitelistPaths(MITK)
 mitkFunctionFindWhitelists(MITK)
 
 # -----------------------------------------
 # Qt version related variables
 
 option(MITK_USE_Qt5 "Use Qt 5 library" ON)
 
 if(MITK_USE_Qt5)
   if(WIN32)
     set(MITK_QT5_MINIMUM_VERSION 5.12.9)
   else()
     set(MITK_QT5_MINIMUM_VERSION 5.12)
   endif()
   set(MITK_QT5_COMPONENTS Concurrent OpenGL PrintSupport Script Sql Svg Widgets Xml XmlPatterns WebEngineWidgets UiTools Help LinguistTools)
   if(APPLE)
     list(APPEND MITK_QT5_COMPONENTS DBus)
   elseif(UNIX)
     list(APPEND MITK_QT5_COMPONENTS X11Extras)
   endif()
 
   # Hint at default install locations of Qt
   if(NOT Qt5_DIR)
     if(MSVC)
       set(_dir_candidates "C:/Qt")
 
       if(CMAKE_GENERATOR MATCHES "^Visual Studio [0-9]+ ([0-9]+)")
         set(_compilers "msvc${CMAKE_MATCH_1}")
       elseif(CMAKE_GENERATOR MATCHES "Ninja")
         include(mitkFunctionGetMSVCVersion)
         mitkFunctionGetMSVCVersion()
         if(VISUAL_STUDIO_PRODUCT_NAME MATCHES "^Visual Studio ([0-9]+)")
           set(_compilers "msvc${CMAKE_MATCH_1}")
         endif()
       endif()
 
       if(_compilers MATCHES "[0-9]+")
         if (CMAKE_MATCH_0 EQUAL 2022)
           list(APPEND _compilers "msvc2019" "msvc2017") # Binary compatible
         elseif (CMAKE_MATCH_0 EQUAL 2019)
           list(APPEND _compilers "msvc2017") # Binary compatible
         endif()
       endif()
     else()
       set(_dir_candidates ~/Qt)
 
       if(APPLE)
         set(_compilers clang)
       else()
         list(APPEND _dir_candidates /opt/Qt)
         set(_compilers gcc)
       endif()
     endif()
 
     if(CMAKE_SIZEOF_VOID_P EQUAL 8)
       foreach(_compiler ${_compilers})
         list(APPEND _compilers64 "${_compiler}_64")
       endforeach()
       set(_compilers ${_compilers64})
     endif()
 
     foreach(_dir_candidate ${_dir_candidates})
       get_filename_component(_dir_candidate ${_dir_candidate} REALPATH)
       foreach(_compiler ${_compilers})
         set(_glob_expression "${_dir_candidate}/5.*/${_compiler}")
         file(GLOB _hints ${_glob_expression})
         list(SORT _hints)
         list(APPEND MITK_QT5_HINTS ${_hints})
       endforeach()
     endforeach()
   endif()
 
   find_package(Qt5 ${MITK_QT5_MINIMUM_VERSION} COMPONENTS ${MITK_QT5_COMPONENTS} REQUIRED HINTS ${MITK_QT5_HINTS})
 endif()
 
 # -----------------------------------------
 # Custom dependency logic
 
 if(WIN32 AND Qt5_DIR)
   set(_dir_candidate "${Qt5_DIR}/../../../../../Tools/OpenSSL/Win_x64")
   get_filename_component(_dir_candidate ${_dir_candidate} ABSOLUTE)
   if(EXISTS "${_dir_candidate}")
     set(OPENSSL_ROOT_DIR "${_dir_candidate}")
   endif()
 endif()
 
 find_package(OpenSSL)
 
 option(MITK_USE_SYSTEM_Boost "Use the system Boost" OFF)
 
 set(MITK_USE_Boost_LIBRARIES "" CACHE STRING "A semi-colon separated list of required Boost libraries")
 
 if(MITK_USE_cpprestsdk)
   if(NOT OpenSSL_FOUND)
     set(openssl_message "Could not find OpenSSL (dependency of C++ REST SDK).\n")
     if(UNIX)
       if(APPLE)
         set(openssl_message "${openssl_message}Please install it using your favorite package management "
                             "system (i.e. Homebrew or MacPorts).\n")
       else()
         set(openssl_message "${openssl_message}Please install the dev package of OpenSSL (i.e. libssl-dev).\n")
       endif()
     else()
       set(openssl_message "${openssl_message}Please either install Win32 OpenSSL:\n"
                           "  https://slproweb.com/products/Win32OpenSSL.html\n"
                           "Or use the Qt Maintenance tool to install:\n"
                           "  Developer and Designer Tools > OpenSSL Toolkit > OpenSSL 64-bit binaries\n")
     endif()
     set(openssl_message "${openssl_message}If it still cannot be found, you can hint CMake to find OpenSSL by "
                         "adding/setting the OPENSSL_ROOT_DIR variable to the root directory of an "
                         "OpenSSL installation. Make sure to clear variables of partly found "
                         "versions of OpenSSL before, or they will be mixed up.")
     message(FATAL_ERROR ${openssl_message})
   endif()
 
   list(APPEND MITK_USE_Boost_LIBRARIES date_time regex system)
   if(UNIX)
     list(APPEND MITK_USE_Boost_LIBRARIES atomic chrono filesystem random thread)
   endif()
   list(REMOVE_DUPLICATES MITK_USE_Boost_LIBRARIES)
   set(MITK_USE_Boost_LIBRARIES ${MITK_USE_Boost_LIBRARIES} CACHE STRING "A semi-colon separated list of required Boost libraries" FORCE)
 endif()
 
 if(MITK_USE_Python3)
   set(MITK_USE_ZLIB ON CACHE BOOL "" FORCE)
 
   if(APPLE AND CMAKE_FRAMEWORK_PATH AND CMAKE_FRAMEWORK_PATH MATCHES "python3\\.?([0-9]+)")
     find_package(Python3 3.${CMAKE_MATCH_1} EXACT REQUIRED COMPONENTS Interpreter Development NumPy)
   else()
     find_package(Python3 REQUIRED COMPONENTS Interpreter Development NumPy)
   endif()
 
   if(WIN32)
     string(REPLACE "\\" "/" Python3_STDARCH "${Python3_STDARCH}")
     string(REPLACE "\\" "/" Python3_STDLIB "${Python3_STDLIB}")
     string(REPLACE "\\" "/" Python3_SITELIB "${Python3_SITELIB}")
   endif()
 endif()
 
 if(BUILD_TESTING AND NOT MITK_USE_CppUnit)
   message("> Forcing MITK_USE_CppUnit to ON because BUILD_TESTING=ON")
   set(MITK_USE_CppUnit ON CACHE BOOL "Use CppUnit for unit tests" FORCE)
 endif()
 
 if(MITK_USE_BLUEBERRY)
   option(MITK_BUILD_ALL_PLUGINS "Build all MITK plugins" OFF)
   mark_as_advanced(MITK_BUILD_ALL_PLUGINS)
 
   if(NOT MITK_USE_CTK)
     message("> Forcing MITK_USE_CTK to ON because of MITK_USE_BLUEBERRY")
     set(MITK_USE_CTK ON CACHE BOOL "Use CTK in MITK" FORCE)
   endif()
 endif()
 
 #-----------------------------------------------------------------------------
 # Pixel type multiplexing
 #-----------------------------------------------------------------------------
 
 # Customize the default pixel types for multiplex macros
 
 set(MITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES
     "int, unsigned int, short, unsigned short, char, unsigned char"
     CACHE STRING "List of integral pixel types used in AccessByItk and InstantiateAccessFunction macros")
 
 set(MITK_ACCESSBYITK_FLOATING_PIXEL_TYPES
     "double, float"
     CACHE STRING "List of floating pixel types used in AccessByItk and InstantiateAccessFunction macros")
 
 set(MITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES
     "itk::RGBPixel<unsigned char>, itk::RGBAPixel<unsigned char>"
     CACHE STRING "List of composite pixel types used in AccessByItk and InstantiateAccessFunction macros")
 
 set(MITK_ACCESSBYITK_DIMENSIONS
     "2,3"
     CACHE STRING "List of dimensions used in AccessByItk and InstantiateAccessFunction macros")
 
 mark_as_advanced(MITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES
                  MITK_ACCESSBYITK_FLOATING_PIXEL_TYPES
                  MITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES
                  MITK_ACCESSBYITK_DIMENSIONS
                 )
 
 # consistency checks
 
 if(NOT MITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES)
   set(MITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES
       "int, unsigned int, short, unsigned short, char, unsigned char"
       CACHE STRING "List of integral pixel types used in AccessByItk and InstantiateAccessFunction macros" FORCE)
 endif()
 
 if(NOT MITK_ACCESSBYITK_FLOATING_PIXEL_TYPES)
   set(MITK_ACCESSBYITK_FLOATING_PIXEL_TYPES
       "double, float"
       CACHE STRING "List of floating pixel types used in AccessByItk and InstantiateAccessFunction macros" FORCE)
 endif()
 
 if(NOT MITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES)
   set(MITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES
     "itk::RGBPixel<unsigned char>, itk::RGBAPixel<unsigned char>"
     CACHE STRING "List of composite pixel types used in AccessByItk and InstantiateAccessFunction macros" FORCE)
 endif()
 
 if(NOT MITK_ACCESSBYITK_VECTOR_PIXEL_TYPES)
   string(REPLACE "," ";" _integral_types ${MITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES})
   string(REPLACE "," ";" _floating_types ${MITK_ACCESSBYITK_FLOATING_PIXEL_TYPES})
   foreach(_scalar_type ${_integral_types} ${_floating_types})
     set(MITK_ACCESSBYITK_VECTOR_PIXEL_TYPES
         "${MITK_ACCESSBYITK_VECTOR_PIXEL_TYPES}itk::VariableLengthVector<${_scalar_type}>,")
   endforeach()
   string(LENGTH "${MITK_ACCESSBYITK_VECTOR_PIXEL_TYPES}" _length)
   math(EXPR _length "${_length} - 1")
   string(SUBSTRING "${MITK_ACCESSBYITK_VECTOR_PIXEL_TYPES}" 0 ${_length} MITK_ACCESSBYITK_VECTOR_PIXEL_TYPES)
   set(MITK_ACCESSBYITK_VECTOR_PIXEL_TYPES ${MITK_ACCESSBYITK_VECTOR_PIXEL_TYPES}
       CACHE STRING "List of vector pixel types used in AccessByItk and InstantiateAccessFunction macros for itk::VectorImage types" FORCE)
 endif()
 
 if(NOT MITK_ACCESSBYITK_DIMENSIONS)
   set(MITK_ACCESSBYITK_DIMENSIONS
       "2,3"
       CACHE STRING "List of dimensions used in AccessByItk and InstantiateAccessFunction macros")
 endif()
 
 find_package(Git REQUIRED)
 
 #-----------------------------------------------------------------------------
 # Superbuild script
 #-----------------------------------------------------------------------------
 
 if(MITK_USE_SUPERBUILD)
   include("${CMAKE_CURRENT_SOURCE_DIR}/SuperBuild.cmake")
 
   # Print configuration summary
   message("\n\n")
   feature_summary(
     DESCRIPTION "------- FEATURE SUMMARY FOR ${PROJECT_NAME} -------"
     WHAT ALL)
   return()
 endif()
 
 #*****************************************************************************
 #****************************  END OF SUPERBUILD  ****************************
 #*****************************************************************************
 
 #-----------------------------------------------------------------------------
 # Organize MITK targets in folders
 #-----------------------------------------------------------------------------
 
 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
 set(MITK_ROOT_FOLDER "MITK" CACHE STRING "")
 mark_as_advanced(MITK_ROOT_FOLDER)
 
 #-----------------------------------------------------------------------------
 # CMake function(s) and macro(s)
 #-----------------------------------------------------------------------------
 
 include(WriteBasicConfigVersionFile)
 include(CheckCXXSourceCompiles)
 include(GenerateExportHeader)
 
 include(mitkFunctionAddManifest)
 include(mitkFunctionAddCustomModuleTest)
 include(mitkFunctionCheckModuleDependencies)
 include(mitkFunctionCompileSnippets)
 include(mitkFunctionConfigureVisualStudioUserProjectFile)
 include(mitkFunctionCreateBlueBerryApplication)
 include(mitkFunctionCreateCommandLineApp)
 include(mitkFunctionCreateModule)
 include(mitkFunctionCreatePlugin)
 include(mitkFunctionCreateProvisioningFile)
 include(mitkFunctionGetLibrarySearchPaths)
 include(mitkFunctionGetVersion)
 include(mitkFunctionGetVersionDescription)
 include(mitkFunctionInstallAutoLoadModules)
 include(mitkFunctionInstallCTKPlugin)
 include(mitkFunctionInstallProvisioningFiles)
 include(mitkFunctionInstallThirdPartyCTKPlugins)
 include(mitkFunctionOrganizeSources)
 include(mitkFunctionUseModules)
 if( ${MITK_USE_MatchPoint} )
   include(mitkFunctionCreateMatchPointDeployedAlgorithm)
 endif()
 include(mitkMacroConfigureItkPixelTypes)
 include(mitkMacroCreateExecutable)
 include(mitkMacroCreateModuleTests)
 include(mitkMacroGenerateToolsLibrary)
 include(mitkMacroGetLinuxDistribution)
 include(mitkMacroGetPMDPlatformString)
 include(mitkMacroInstall)
 include(mitkMacroInstallHelperApp)
 include(mitkMacroInstallTargets)
 include(mitkMacroMultiplexPicType)
 
 # Deprecated
 include(mitkMacroCreateCTKPlugin)
 
 #-----------------------------------------------------------------------------
 # Global CMake variables
 #-----------------------------------------------------------------------------
 
 if(NOT DEFINED CMAKE_DEBUG_POSTFIX)
   # We can't do this yet because the CTK Plugin Framework
   # cannot cope with a postfix yet.
   #set(CMAKE_DEBUG_POSTFIX d)
 endif()
 
 #-----------------------------------------------------------------------------
 # Output directories.
 #-----------------------------------------------------------------------------
 
 set(_default_LIBRARY_output_dir lib)
 set(_default_RUNTIME_output_dir bin)
 set(_default_ARCHIVE_output_dir lib)
 
 foreach(type LIBRARY RUNTIME ARCHIVE)
   # Make sure the directory exists
   if(MITK_CMAKE_${type}_OUTPUT_DIRECTORY
      AND NOT EXISTS ${MITK_CMAKE_${type}_OUTPUT_DIRECTORY})
     message("Creating directory MITK_CMAKE_${type}_OUTPUT_DIRECTORY: ${MITK_CMAKE_${type}_OUTPUT_DIRECTORY}")
     file(MAKE_DIRECTORY "${MITK_CMAKE_${type}_OUTPUT_DIRECTORY}")
   endif()
 
   if(MITK_CMAKE_${type}_OUTPUT_DIRECTORY)
     set(CMAKE_${type}_OUTPUT_DIRECTORY ${MITK_CMAKE_${type}_OUTPUT_DIRECTORY})
   else()
     set(CMAKE_${type}_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${_default_${type}_output_dir})
     set(MITK_CMAKE_${type}_OUTPUT_DIRECTORY ${CMAKE_${type}_OUTPUT_DIRECTORY})
   endif()
 
   set(CMAKE_${type}_OUTPUT_DIRECTORY ${CMAKE_${type}_OUTPUT_DIRECTORY} CACHE INTERNAL "Output directory for ${type} files.")
   mark_as_advanced(CMAKE_${type}_OUTPUT_DIRECTORY)
 endforeach()
 
 #-----------------------------------------------------------------------------
 # Set MITK specific options and variables (NOT available during superbuild)
 #-----------------------------------------------------------------------------
 
 if(OpenSSL_FOUND AND WIN32)
   #[[ On Windows, CMake is able to locate the link libraries for OpenSSL but it
       does not look for the corresponding DLLs that we need to copy to our
       binary directories and include in packaging.
 
       Setting these paths manually is cumbersome so we try to use a simple
       heuristic to automatically set them:
 
         - Based on the link libraries (usually located in a lib folder),
           try to find the "../bin" binary directory.
         - Use the base file names of the link libraries to find corresponding
           DLLs like "<base name>*.dll", that usually are named like
           "<base name>-1_1-x64.dll" or similar.
    ]]
   set(openssl_ssl_dll "")
   set(openssl_crypto_dll "")
 
   if(OPENSSL_SSL_LIBRARY AND EXISTS "${OPENSSL_SSL_LIBRARY}")
     get_filename_component(openssl_bin_dir "${OPENSSL_SSL_LIBRARY}" DIRECTORY)
     get_filename_component(openssl_bin_dir "${openssl_bin_dir}" DIRECTORY)
     set(openssl_bin_dir "${openssl_bin_dir}/bin")
 
     if(EXISTS "${openssl_bin_dir}")
       get_filename_component(openssl_ssl_basename "${OPENSSL_SSL_LIBRARY}" NAME_WE)
       file(GLOB openssl_ssl_dll "${openssl_bin_dir}/${openssl_ssl_basename}*.dll")
       list(LENGTH openssl_ssl_dll num_findings)
       if(num_findings GREATER 1)
         set(openssl_ssl_dll "")
       endif()
 
       get_filename_component(openssl_crypto_basename "${OPENSSL_CRYPTO_LIBRARY}" NAME_WE)
       file(GLOB openssl_crypto_dll "${openssl_bin_dir}/${openssl_crypto_basename}*.dll")
       list(LENGTH openssl_crypto_dll num_findings)
       if(num_findings GREATER 1)
         set(openssl_crypto_dll "")
       endif()
     endif()
   endif()
 
   set(MITK_OPENSSL_SSL_DLL "${openssl_ssl_dll}" CACHE FILEPATH "")
 
   if(DEFINED CACHE{MITK_OPENSSL_SSL_DLL} AND NOT MITK_OPENSSL_SSL_DLL AND openssl_ssl_dll)
     set(MITK_OPENSSL_SSL_DLL "${openssl_ssl_dll}" CACHE FILEPATH "" FORCE)
   endif()
 
   set(MITK_OPENSSL_CRYPTO_DLL "${openssl_crypto_dll}" CACHE FILEPATH "")
 
   if(DEFINED CACHE{MITK_OPENSSL_CRYPTO_DLL} AND NOT MITK_OPENSSL_CRYPTO_DLL AND openssl_crypto_dll)
     set(MITK_OPENSSL_CRYPTO_DLL "${openssl_crypto_dll}" CACHE FILEPATH "" FORCE)
   endif()
 
   if(MITK_OPENSSL_SSL_DLL AND EXISTS "${MITK_OPENSSL_SSL_DLL}" AND MITK_OPENSSL_CRYPTO_DLL AND EXISTS "${MITK_OPENSSL_CRYPTO_DLL}")
     foreach(config_type ${CMAKE_CONFIGURATION_TYPES})
       execute_process(COMMAND "${CMAKE_COMMAND}" -E make_directory "${MITK_BINARY_DIR}/bin/${config_type}")
       configure_file("${MITK_OPENSSL_SSL_DLL}" "${MITK_BINARY_DIR}/bin/${config_type}/" COPYONLY)
       configure_file("${MITK_OPENSSL_CRYPTO_DLL}" "${MITK_BINARY_DIR}/bin/${config_type}/" COPYONLY)
     endforeach()
 
     MITK_INSTALL(FILES
       "${MITK_OPENSSL_SSL_DLL}"
       "${MITK_OPENSSL_CRYPTO_DLL}"
     )
   endif()
 endif()
 
 # Look for optional Doxygen package
 find_package(Doxygen)
 
 option(BLUEBERRY_DEBUG_SMARTPOINTER "Enable code for debugging smart pointers" OFF)
 mark_as_advanced(BLUEBERRY_DEBUG_SMARTPOINTER)
 
 # Ask the user to show the console window for applications
 option(MITK_SHOW_CONSOLE_WINDOW "Use this to enable or disable the console window when starting MITK GUI Applications" ON)
 mark_as_advanced(MITK_SHOW_CONSOLE_WINDOW)
 
 if(NOT MITK_FAST_TESTING)
   if(MITK_CTEST_SCRIPT_MODE STREQUAL "Continuous" OR MITK_CTEST_SCRIPT_MODE STREQUAL "Experimental")
     set(MITK_FAST_TESTING ON)
   endif()
 endif()
 
 if(NOT UNIX)
   set(MITK_WIN32_FORCE_STATIC "STATIC" CACHE INTERNAL "Use this variable to always build static libraries on non-unix platforms")
 endif()
 
 if(MITK_BUILD_ALL_PLUGINS)
   set(MITK_BUILD_ALL_PLUGINS_OPTION "FORCE_BUILD_ALL")
 endif()
 
 # Configure pixel types used for ITK image access multiplexing
 mitkMacroConfigureItkPixelTypes()
 
 # Configure module naming conventions
 set(MITK_MODULE_NAME_REGEX_MATCH "^[A-Z].*$")
 set(MITK_MODULE_NAME_REGEX_NOT_MATCH "^[Mm][Ii][Tt][Kk].*$")
 set(MITK_DEFAULT_MODULE_NAME_PREFIX "Mitk")
 set(MITK_MODULE_NAME_PREFIX ${MITK_DEFAULT_MODULE_NAME_PREFIX})
 set(MITK_MODULE_NAME_DEFAULTS_TO_DIRECTORY_NAME 1)
 
 #-----------------------------------------------------------------------------
 # Get MITK version info
 #-----------------------------------------------------------------------------
 
 mitkFunctionGetVersion(${MITK_SOURCE_DIR} MITK)
 mitkFunctionGetVersionDescription(${MITK_SOURCE_DIR} MITK)
 
 # MITK_VERSION
 set(MITK_VERSION_STRING "${MITK_VERSION_MAJOR}.${MITK_VERSION_MINOR}.${MITK_VERSION_PATCH}")
 if(MITK_VERSION_PATCH STREQUAL "99")
   set(MITK_VERSION_STRING "${MITK_VERSION_STRING}-${MITK_REVISION_SHORTID}")
 endif()
 
 #-----------------------------------------------------------------------------
 # Installation preparation
 #
 # These should be set before any MITK install macros are used
 #-----------------------------------------------------------------------------
 
 # on macOS all BlueBerry plugins get copied into every
 # application bundle (.app directory) specified here
 if(MITK_USE_BLUEBERRY AND APPLE)
 
   foreach(MITK_EXTENSION_DIR ${MITK_DIR_PLUS_EXTENSION_DIRS})
     set(MITK_APPLICATIONS_EXTENSION_DIR "${MITK_EXTENSION_DIR}/Applications")
     if(EXISTS "${MITK_APPLICATIONS_EXTENSION_DIR}/AppList.cmake")
       set(MITK_APPS "")
       include("${MITK_APPLICATIONS_EXTENSION_DIR}/AppList.cmake")
       foreach(mitk_app ${MITK_APPS})
         # extract option_name
         string(REPLACE "^^" "\\;" target_info ${mitk_app})
         set(target_info_list ${target_info})
         list(GET target_info_list 1 option_name)
         list(GET target_info_list 0 app_name)
         # check if the application is enabled
         if(${option_name} OR MITK_BUILD_ALL_APPS)
           set(MACOSX_BUNDLE_NAMES ${MACOSX_BUNDLE_NAMES} Mitk${app_name})
         endif()
       endforeach()
     endif()
   endforeach()
 
 endif()
 
 #-----------------------------------------------------------------------------
 # Set coverage Flags
 #-----------------------------------------------------------------------------
 
 if(WITH_COVERAGE)
   if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
     set(coverage_flags "-g -fprofile-arcs -ftest-coverage -O0 -DNDEBUG")
     set(COVERAGE_CXX_FLAGS ${coverage_flags})
     set(COVERAGE_C_FLAGS ${coverage_flags})
   endif()
 endif()
 
 #-----------------------------------------------------------------------------
 # MITK C/CXX Flags
 #-----------------------------------------------------------------------------
 
 set(MITK_C_FLAGS "${COVERAGE_C_FLAGS}")
 set(MITK_C_FLAGS_DEBUG )
 set(MITK_C_FLAGS_RELEASE )
 set(MITK_CXX_FLAGS "${COVERAGE_CXX_FLAGS} ${MITK_CXX${MITK_CXX_STANDARD}_FLAG}")
 set(MITK_CXX_FLAGS_DEBUG )
 set(MITK_CXX_FLAGS_RELEASE )
 
 set(MITK_EXE_LINKER_FLAGS )
 set(MITK_SHARED_LINKER_FLAGS )
 
 if(WIN32)
   set(MITK_CXX_FLAGS "${MITK_CXX_FLAGS} -DWIN32_LEAN_AND_MEAN -DNOMINMAX")
   mitkFunctionCheckCompilerFlags("/wd4005" MITK_CXX_FLAGS) # warning C4005: macro redefinition
   mitkFunctionCheckCompilerFlags("/wd4231" MITK_CXX_FLAGS) # warning C4231: nonstandard extension used : 'extern' before template explicit instantiation
   # the following line should be removed after fixing bug 17637
   mitkFunctionCheckCompilerFlags("/wd4316" MITK_CXX_FLAGS) # warning C4316: object alignment on heap
   mitkFunctionCheckCompilerFlags("/wd4180" MITK_CXX_FLAGS) # warning C4180: qualifier applied to function type has no meaning
   mitkFunctionCheckCompilerFlags("/wd4251" MITK_CXX_FLAGS) # warning C4251: 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
 endif()
 
 if(APPLE)
   set(MITK_CXX_FLAGS "${MITK_CXX_FLAGS} -DGL_SILENCE_DEPRECATION") # Apple deprecated OpenGL in macOS 10.14
 endif()
 
 if(NOT MSVC_VERSION)
   foreach(_flag
     -Wall
     -Wextra
     -Wpointer-arith
     -Winvalid-pch
     -Wcast-align
     -Wwrite-strings
     -Wno-error=gnu
     -Wno-error=unknown-pragmas
     # The strict-overflow warning is generated by ITK template code
     -Wno-error=strict-overflow
     -Woverloaded-virtual
     -Wstrict-null-sentinel
     #-Wold-style-cast
     #-Wsign-promo
     -Wno-deprecated-copy
     -Wno-array-bounds
     -Wno-cast-function-type
     -Wno-maybe-uninitialized
     -Wno-error=stringop-overread
     -fdiagnostics-show-option
     )
     mitkFunctionCheckCAndCXXCompilerFlags(${_flag} MITK_C_FLAGS MITK_CXX_FLAGS)
   endforeach()
 endif()
 
 if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
   mitkFunctionCheckCompilerFlags("-Wl,--no-undefined" MITK_SHARED_LINKER_FLAGS)
   mitkFunctionCheckCompilerFlags("-Wl,--as-needed" MITK_SHARED_LINKER_FLAGS)
 endif()
 
 if(CMAKE_COMPILER_IS_GNUCXX)
   mitkFunctionCheckCAndCXXCompilerFlags("-fstack-protector-all" MITK_C_FLAGS MITK_CXX_FLAGS)
   set(MITK_CXX_FLAGS_RELEASE "-U_FORTIFY_SOURCES -D_FORTIFY_SOURCE=2 ${MITK_CXX_FLAGS_RELEASE}")
 endif()
 
 set(MITK_MODULE_LINKER_FLAGS ${MITK_SHARED_LINKER_FLAGS})
 set(MITK_EXE_LINKER_FLAGS ${MITK_SHARED_LINKER_FLAGS})
 
 #-----------------------------------------------------------------------------
 # MITK Packages
 #-----------------------------------------------------------------------------
 
 set(MITK_MODULES_PACKAGE_DEPENDS_DIR ${MITK_SOURCE_DIR}/CMake/PackageDepends)
 set(MODULES_PACKAGE_DEPENDS_DIRS ${MITK_MODULES_PACKAGE_DEPENDS_DIR})
 
 foreach(MITK_EXTENSION_DIR ${MITK_ABSOLUTE_EXTENSION_DIRS})
   set(MITK_PACKAGE_DEPENDS_EXTENSION_DIR "${MITK_EXTENSION_DIR}/CMake/PackageDepends")
   if(EXISTS "${MITK_PACKAGE_DEPENDS_EXTENSION_DIR}")
     list(APPEND MODULES_PACKAGE_DEPENDS_DIRS "${MITK_PACKAGE_DEPENDS_EXTENSION_DIR}")
   endif()
 endforeach()
 
 if(NOT MITK_USE_SYSTEM_Boost)
   set(Boost_NO_SYSTEM_PATHS 1)
 endif()
 
 set(Boost_USE_MULTITHREADED 1)
 set(Boost_USE_STATIC_LIBS 0)
 set(Boost_USE_STATIC_RUNTIME 0)
 set(Boost_ADDITIONAL_VERSIONS 1.74 1.74.0)
 
 # We need this later for a DCMTK workaround
 set(_dcmtk_dir_orig ${DCMTK_DIR})
 
 # This property is populated at the top half of this file
 get_property(MITK_EXTERNAL_PROJECTS GLOBAL PROPERTY MITK_EXTERNAL_PROJECTS)
 foreach(ep ${MITK_EXTERNAL_PROJECTS})
   get_property(_package GLOBAL PROPERTY MITK_${ep}_PACKAGE)
   get_property(_components GLOBAL PROPERTY MITK_${ep}_COMPONENTS)
   if(MITK_USE_${ep} AND _package)
     if(_components)
       find_package(${_package} COMPONENTS ${_components} REQUIRED CONFIG)
     else()
       # Prefer config mode first because it finds external
       # <proj>Config.cmake files pointed at by <proj>_DIR variables.
       # Otherwise, existing Find<proj>.cmake files could fail.
 
       if(DEFINED ${_package}_DIR)
         #we store the information because it will be overwritten by find_package
         #and would get lost for all EPs that use on Find<proj>.cmake instead of config
         #files.
         set(_temp_EP_${_package}_dir ${${_package}_DIR})
       endif(DEFINED ${_package}_DIR)
 
       find_package(${_package} QUIET CONFIG)
       string(TOUPPER "${_package}" _package_uc)
       if(NOT (${_package}_FOUND OR ${_package_uc}_FOUND))
         if(DEFINED _temp_EP_${_package}_dir)
             set(${_package}_DIR ${_temp_EP_${_package}_dir} CACHE PATH "externaly set dir of the package ${_package}" FORCE)
         endif(DEFINED _temp_EP_${_package}_dir)
 
         find_package(${_package} REQUIRED)
       endif()
     endif()
   endif()
 endforeach()
 
 # Ensure that the MITK CMake module path comes first
 set(CMAKE_MODULE_PATH
   ${MITK_CMAKE_DIR}
   ${CMAKE_MODULE_PATH}
   )
 
 if(MITK_USE_DCMTK)
   if(${_dcmtk_dir_orig} MATCHES "${MITK_EXTERNAL_PROJECT_PREFIX}.*")
     # Help our FindDCMTK.cmake script find our super-build DCMTK
     set(DCMTK_DIR ${MITK_EXTERNAL_PROJECT_PREFIX})
   else()
     # Use the original value
     set(DCMTK_DIR ${_dcmtk_dir_orig})
   endif()
 endif()
 
 if(MITK_USE_DCMQI)
   # Due to the preferred CONFIG mode in find_package calls above,
   # the DCMQIConfig.cmake file is read, which does not provide useful
   # package information. We explictly need MODULE mode to find DCMQI.
     # Help our FindDCMQI.cmake script find our super-build DCMQI
   set(DCMQI_DIR ${MITK_EXTERNAL_PROJECT_PREFIX})
   find_package(DCMQI REQUIRED)
 endif()
 
 if(MITK_USE_OpenIGTLink)
   link_directories(${OpenIGTLink_LIBRARY_DIRS})
 endif()
 
 if(MITK_USE_OpenCL)
   find_package(OpenCL REQUIRED)
 endif()
 
 if(MITK_USE_OpenMP)
   find_package(OpenMP REQUIRED COMPONENTS CXX)
 else()
   find_package(OpenMP QUIET COMPONENTS CXX)
 
   if(OpenMP_FOUND)
     set(MITK_USE_OpenMP ON CACHE BOOL "" FORCE)
   elseif(APPLE AND OpenMP_libomp_LIBRARY AND NOT OpenMP_CXX_LIB_NAMES)
     set(OpenMP_CXX_LIB_NAMES libomp CACHE STRING "" FORCE)
     get_filename_component(openmp_lib_dir "${OpenMP_libomp_LIBRARY}" DIRECTORY)
     set(openmp_include_dir "${openmp_lib_dir}/../include")
     if(EXISTS "${openmp_include_dir}")
       get_filename_component(openmp_include_dir "${openmp_include_dir}" REALPATH)
       set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp -I${openmp_include_dir}" CACHE STRING "" FORCE)
       find_package(OpenMP QUIET COMPONENTS CXX)
       if(OpenMP_FOUND)
         set(MITK_USE_OpenMP ON CACHE BOOL "" FORCE)
       endif()
     endif()
   endif()
 endif()
 
 # Qt support
 if(MITK_USE_Qt5)
   find_package(Qt5Core ${MITK_QT5_MINIMUM_VERSION} REQUIRED) # at least Core required
   get_target_property(_qmake_exec Qt5::qmake LOCATION)
   execute_process(COMMAND ${_qmake_exec} -query QT_INSTALL_BINS
     RESULT_VARIABLE _result
      OUTPUT_VARIABLE QT_BINARY_DIR
     ERROR_VARIABLE _error
   )
   string(STRIP "${QT_BINARY_DIR}" QT_BINARY_DIR)
   if(_result OR NOT EXISTS "${QT_BINARY_DIR}")
     message(FATAL_ERROR "Could not determine Qt binary directory: ${_result} ${QT_BINARY_DIR} ${_error}")
   endif()
 
   find_program(QT_HELPGENERATOR_EXECUTABLE
     NAMES qhelpgenerator qhelpgenerator-qt5 qhelpgenerator5
     PATHS ${QT_BINARY_DIR}
     NO_DEFAULT_PATH
   )
 
   find_program(QT_COLLECTIONGENERATOR_EXECUTABLE
     NAMES qcollectiongenerator qcollectiongenerator-qt5 qcollectiongenerator5
     PATHS ${QT_BINARY_DIR}
     NO_DEFAULT_PATH
   )
 
   find_program(QT_ASSISTANT_EXECUTABLE
     NAMES assistant assistant-qt5 assistant5
     PATHS ${QT_BINARY_DIR}
     NO_DEFAULT_PATH
   )
 
   find_program(QT_XMLPATTERNS_EXECUTABLE
     NAMES xmlpatterns
     PATHS ${QT_BINARY_DIR}
     NO_DEFAULT_PATH
   )
 
   mark_as_advanced(QT_HELPGENERATOR_EXECUTABLE
                    QT_COLLECTIONGENERATOR_EXECUTABLE
                    QT_ASSISTANT_EXECUTABLE
                    QT_XMLPATTERNS_EXECUTABLE
                   )
 
   if(MITK_USE_BLUEBERRY)
     option(BLUEBERRY_USE_QT_HELP "Enable support for integrating plugin documentation into Qt Help" ${DOXYGEN_FOUND})
     mark_as_advanced(BLUEBERRY_USE_QT_HELP)
 
     # Sanity checks for in-application BlueBerry plug-in help generation
     if(BLUEBERRY_USE_QT_HELP)
       set(_force_blueberry_use_qt_help_to_off 0)
       if(NOT DOXYGEN_FOUND)
         message("> Forcing BLUEBERRY_USE_QT_HELP to OFF because Doxygen was not found.")
         set(_force_blueberry_use_qt_help_to_off 1)
       endif()
       if(DOXYGEN_FOUND AND DOXYGEN_VERSION VERSION_LESS 1.8.7)
         message("> Forcing BLUEBERRY_USE_QT_HELP to OFF because Doxygen version 1.8.7 or newer not found.")
         set(_force_blueberry_use_qt_help_to_off 1)
       endif()
 
       if(NOT QT_HELPGENERATOR_EXECUTABLE)
         message("> Forcing BLUEBERRY_USE_QT_HELP to OFF because QT_HELPGENERATOR_EXECUTABLE is empty.")
         set(_force_blueberry_use_qt_help_to_off 1)
       endif()
 
       if(NOT MITK_USE_Qt5)
         message("> Forcing BLUEBERRY_USE_QT_HELP to OFF because MITK_USE_Qt5 is OFF.")
         set(_force_blueberry_use_qt_help_to_off 1)
       endif()
 
       if(NOT QT_XMLPATTERNS_EXECUTABLE)
         message("You have enabled Qt Help support, but QT_XMLPATTERNS_EXECUTABLE is empty")
         set(_force_blueberry_use_qt_help_to_off 1)
       endif()
 
       if(_force_blueberry_use_qt_help_to_off)
         set(BLUEBERRY_USE_QT_HELP OFF CACHE BOOL "Enable support for integrating plugin documentation into Qt Help" FORCE)
       endif()
     endif()
 
     if(BLUEBERRY_QT_HELP_REQUIRED AND NOT BLUEBERRY_USE_QT_HELP)
       message(FATAL_ERROR "BLUEBERRY_USE_QT_HELP is required to be set to ON")
     endif()
   endif()
 
 endif()
 
 #-----------------------------------------------------------------------------
 # Testing
 #-----------------------------------------------------------------------------
 
 if(BUILD_TESTING)
   # Configuration for the CMake-generated test driver
   set(CMAKE_TESTDRIVER_EXTRA_INCLUDES "#include <stdexcept>")
   set(CMAKE_TESTDRIVER_BEFORE_TESTMAIN "
     try
       {")
   set(CMAKE_TESTDRIVER_AFTER_TESTMAIN "
       }
       catch (const std::exception& e)
       {
         fprintf(stderr, \"%s\\n\", e.what());
         return EXIT_FAILURE;
       }
       catch (...)
       {
         printf(\"Exception caught in the test driver\\n\");
         return EXIT_FAILURE;
       }")
 
   set(MITK_TEST_OUTPUT_DIR "${MITK_BINARY_DIR}/test_output")
   if(NOT EXISTS ${MITK_TEST_OUTPUT_DIR})
     file(MAKE_DIRECTORY ${MITK_TEST_OUTPUT_DIR})
   endif()
 
   # Test the package target
   include(mitkPackageTest)
 endif()
 
 configure_file(mitkTestingConfig.h.in ${MITK_BINARY_DIR}/mitkTestingConfig.h)
 
 #-----------------------------------------------------------------------------
 # MITK_SUPERBUILD_BINARY_DIR
 #-----------------------------------------------------------------------------
 
 # If MITK_SUPERBUILD_BINARY_DIR isn't defined, it means MITK is *NOT* build using Superbuild.
 # In that specific case, MITK_SUPERBUILD_BINARY_DIR should default to MITK_BINARY_DIR
 if(NOT DEFINED MITK_SUPERBUILD_BINARY_DIR)
   set(MITK_SUPERBUILD_BINARY_DIR ${MITK_BINARY_DIR})
 endif()
 
 #-----------------------------------------------------------------------------
 # Set C/CXX and linker flags for MITK code
 #-----------------------------------------------------------------------------
 
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MITK_CXX_FLAGS}")
 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${MITK_CXX_FLAGS_DEBUG}")
 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${MITK_CXX_FLAGS_RELEASE}")
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MITK_C_FLAGS}")
 set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${MITK_C_FLAGS_DEBUG}")
 set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${MITK_C_FLAGS_RELEASE}")
 
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MITK_EXE_LINKER_FLAGS}")
 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${MITK_SHARED_LINKER_FLAGS}")
 set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${MITK_MODULE_LINKER_FLAGS}")
 
 #-----------------------------------------------------------------------------
 # Add subdirectories
 #-----------------------------------------------------------------------------
 
 add_subdirectory(Utilities)
 
 add_subdirectory(Modules)
 
 include("${CMAKE_CURRENT_SOURCE_DIR}/Modules/ModuleList.cmake")
 mitkFunctionWhitelistModules(MITK MITK_MODULES)
 
 set(MITK_ROOT_FOLDER_BACKUP "${MITK_ROOT_FOLDER}")
 foreach(MITK_EXTENSION_DIR ${MITK_ABSOLUTE_EXTENSION_DIRS})
   get_filename_component(MITK_ROOT_FOLDER "${MITK_EXTENSION_DIR}" NAME)
   set(MITK_MODULES_EXTENSION_DIR "${MITK_EXTENSION_DIR}/Modules")
   if(EXISTS "${MITK_MODULES_EXTENSION_DIR}/ModuleList.cmake")
     set(MITK_MODULES "")
     include("${MITK_MODULES_EXTENSION_DIR}/ModuleList.cmake")
     foreach(mitk_module ${MITK_MODULES})
       add_subdirectory("${MITK_MODULES_EXTENSION_DIR}/${mitk_module}" "Modules/${mitk_module}")
     endforeach()
   endif()
   set(MITK_MODULE_NAME_PREFIX ${MITK_DEFAULT_MODULE_NAME_PREFIX})
 endforeach()
 set(MITK_ROOT_FOLDER "${MITK_ROOT_FOLDER_BACKUP}")
 
 add_subdirectory(Wrapping)
 
 set(MITK_DOXYGEN_OUTPUT_DIR "${PROJECT_BINARY_DIR}/Documentation/Doxygen" CACHE PATH
   "Output directory for doxygen generated documentation.")
 
 if(MITK_USE_BLUEBERRY)
   include("${CMAKE_CURRENT_SOURCE_DIR}/Plugins/PluginList.cmake")
   mitkFunctionWhitelistPlugins(MITK MITK_PLUGINS)
 
   set(mitk_plugins_fullpath "")
   foreach(mitk_plugin ${MITK_PLUGINS})
     list(APPEND mitk_plugins_fullpath Plugins/${mitk_plugin})
   endforeach()
 
   set(MITK_PLUGIN_REGEX_LIST "")
   foreach(MITK_EXTENSION_DIR ${MITK_ABSOLUTE_EXTENSION_DIRS})
     set(MITK_PLUGINS_EXTENSION_DIR "${MITK_EXTENSION_DIR}/Plugins")
     if(EXISTS "${MITK_PLUGINS_EXTENSION_DIR}/PluginList.cmake")
       set(MITK_PLUGINS "")
       include("${MITK_PLUGINS_EXTENSION_DIR}/PluginList.cmake")
       foreach(mitk_plugin ${MITK_PLUGINS})
         list(APPEND mitk_plugins_fullpath "${MITK_PLUGINS_EXTENSION_DIR}/${mitk_plugin}")
       endforeach()
     endif()
   endforeach()
 
   if(EXISTS ${MITK_PRIVATE_MODULES}/PluginList.cmake)
     include(${MITK_PRIVATE_MODULES}/PluginList.cmake)
 
     foreach(mitk_plugin ${MITK_PRIVATE_PLUGINS})
       list(APPEND mitk_plugins_fullpath ${MITK_PRIVATE_MODULES}/${mitk_plugin})
     endforeach()
   endif()
 
   if(MITK_BUILD_EXAMPLES)
     include("${CMAKE_CURRENT_SOURCE_DIR}/Examples/Plugins/PluginList.cmake")
     set(mitk_example_plugins_fullpath )
     foreach(mitk_example_plugin ${MITK_EXAMPLE_PLUGINS})
       list(APPEND mitk_example_plugins_fullpath Examples/Plugins/${mitk_example_plugin})
       list(APPEND mitk_plugins_fullpath Examples/Plugins/${mitk_example_plugin})
     endforeach()
   endif()
 
   # Specify which plug-ins belong to this project
   macro(GetMyTargetLibraries all_target_libraries varname)
     set(re_ctkplugin_mitk "^org_mitk_[a-zA-Z0-9_]+$")
     set(re_ctkplugin_bb "^org_blueberry_[a-zA-Z0-9_]+$")
     set(_tmp_list)
     list(APPEND _tmp_list ${all_target_libraries})
     ctkMacroListFilter(_tmp_list re_ctkplugin_mitk re_ctkplugin_bb MITK_PLUGIN_REGEX_LIST OUTPUT_VARIABLE ${varname})
   endmacro()
 
   # Get infos about application directories and build options
   set(mitk_apps_fullpath "")
   foreach(MITK_EXTENSION_DIR ${MITK_DIR_PLUS_EXTENSION_DIRS})
     set(MITK_APPLICATIONS_EXTENSION_DIR "${MITK_EXTENSION_DIR}/Applications")
     if(EXISTS "${MITK_APPLICATIONS_EXTENSION_DIR}/AppList.cmake")
       set(MITK_APPS "")
       include("${MITK_APPLICATIONS_EXTENSION_DIR}/AppList.cmake")
       foreach(mitk_app ${MITK_APPS})
         # extract option_name
         string(REPLACE "^^" "\\;" target_info ${mitk_app})
         set(target_info_list ${target_info})
         list(GET target_info_list 0 directory_name)
         list(GET target_info_list 1 option_name)
         if(${option_name})
           list(APPEND mitk_apps_fullpath "${MITK_APPLICATIONS_EXTENSION_DIR}/${directory_name}^^${option_name}")
         endif()
       endforeach()
     endif()
   endforeach()
 
   if (mitk_plugins_fullpath)
     ctkMacroSetupPlugins(${mitk_plugins_fullpath}
                          BUILD_OPTION_PREFIX MITK_BUILD_
                          APPS ${mitk_apps_fullpath}
                          BUILD_ALL ${MITK_BUILD_ALL_PLUGINS}
                          COMPACT_OPTIONS)
   endif()
 
   set(MITK_PLUGIN_USE_FILE "${MITK_BINARY_DIR}/MitkPluginUseFile.cmake")
   if(${PROJECT_NAME}_PLUGIN_LIBRARIES)
     ctkFunctionGeneratePluginUseFile(${MITK_PLUGIN_USE_FILE})
   else()
     file(REMOVE ${MITK_PLUGIN_USE_FILE})
     set(MITK_PLUGIN_USE_FILE )
   endif()
 endif()
 
 #-----------------------------------------------------------------------------
 # Documentation
 #-----------------------------------------------------------------------------
 
 set(MITK_DOXYGEN_ADDITIONAL_INPUT_DIRS)
 set(MITK_DOXYGEN_ADDITIONAL_IMAGE_PATHS)
 
 foreach(MITK_EXTENSION_DIR ${MITK_DIR_PLUS_EXTENSION_DIRS})
   set(MITK_DOXYGEN_ADDITIONAL_INPUT_DIRS "${MITK_DOXYGEN_ADDITIONAL_INPUT_DIRS} \"${MITK_EXTENSION_DIR}\"")
   set(MITK_DOXYGEN_ADDITIONAL_IMAGE_PATHS "${MITK_DOXYGEN_ADDITIONAL_IMAGE_PATHS} \"${MITK_EXTENSION_DIR}\"")
 endforeach()
 
 if(DOXYGEN_FOUND)
   add_subdirectory(Documentation)
 endif()
 
 #-----------------------------------------------------------------------------
 # Installation
 #-----------------------------------------------------------------------------
 
 
 # set MITK cpack variables
 # These are the default variables, which can be overwritten ( see below )
 include(mitkSetupCPack)
 
 set(use_default_config ON)
 
 set(ALL_MITK_APPS "")
 set(activated_apps_no 0)
 
 foreach(MITK_EXTENSION_DIR ${MITK_DIR_PLUS_EXTENSION_DIRS})
   set(MITK_APPLICATIONS_EXTENSION_DIR "${MITK_EXTENSION_DIR}/Applications")
   if(EXISTS "${MITK_APPLICATIONS_EXTENSION_DIR}/AppList.cmake")
     set(MITK_APPS "")
     include("${MITK_APPLICATIONS_EXTENSION_DIR}/AppList.cmake")
     foreach(mitk_app ${MITK_APPS})
       string(REPLACE "^^" "\\;" target_info ${mitk_app})
       set(target_info_list ${target_info})
       list(GET target_info_list 0 directory_name)
       list(GET target_info_list 1 option_name)
       list(GET target_info_list 2 executable_name)
       list(APPEND ALL_MITK_APPS "${MITK_EXTENSION_DIR}/Applications/${directory_name}^^${option_name}^^${executable_name}")
       if(${option_name} OR MITK_BUILD_ALL_APPS)
         MATH(EXPR activated_apps_no "${activated_apps_no} + 1")
       endif()
     endforeach()
   endif()
 endforeach()
 
 list(LENGTH ALL_MITK_APPS app_count)
 
 if(app_count EQUAL 1 AND (activated_apps_no EQUAL 1 OR MITK_BUILD_ALL_APPS))
   # Corner case if there is only one app in total
   set(use_project_cpack ON)
 elseif(activated_apps_no EQUAL 1 AND NOT MITK_BUILD_ALL_APPS)
   # Only one app is enabled (no "build all" flag set)
   set(use_project_cpack ON)
 else()
   # Less or more then one app is enabled
   set(use_project_cpack OFF)
 endif()
 
 foreach(mitk_app ${ALL_MITK_APPS})
   # extract target_dir and option_name
   string(REPLACE "^^" "\\;" target_info ${mitk_app})
   set(target_info_list ${target_info})
   list(GET target_info_list 0 target_dir)
   list(GET target_info_list 1 option_name)
   list(GET target_info_list 2 executable_name)
   # check if the application is enabled
   if(${option_name} OR MITK_BUILD_ALL_APPS)
     # check whether application specific configuration files will be used
     if(use_project_cpack)
       # use files if they exist
       if(EXISTS "${target_dir}/CPackOptions.cmake")
         include("${target_dir}/CPackOptions.cmake")
       endif()
 
       if(EXISTS "${target_dir}/CPackConfig.cmake.in")
         set(CPACK_PROJECT_CONFIG_FILE "${target_dir}/CPackConfig.cmake")
         configure_file(${target_dir}/CPackConfig.cmake.in
                        ${CPACK_PROJECT_CONFIG_FILE} @ONLY)
         set(use_default_config OFF)
       endif()
     endif()
   # add link to the list
   list(APPEND CPACK_CREATE_DESKTOP_LINKS "${executable_name}")
   endif()
 endforeach()
 
 # if no application specific configuration file was used, use default
 if(use_default_config)
   configure_file(${MITK_SOURCE_DIR}/MITKCPackOptions.cmake.in
                  ${MITK_BINARY_DIR}/MITKCPackOptions.cmake @ONLY)
   set(CPACK_PROJECT_CONFIG_FILE "${MITK_BINARY_DIR}/MITKCPackOptions.cmake")
 endif()
 
 # include CPack model once all variables are set
 include(CPack)
 
 # Additional installation rules
 include(mitkInstallRules)
 
 #-----------------------------------------------------------------------------
 # Last configuration steps
 #-----------------------------------------------------------------------------
 
 # ---------------- Export targets -----------------
 
 set(MITK_EXPORTS_FILE "${MITK_BINARY_DIR}/MitkExports.cmake")
 file(REMOVE ${MITK_EXPORTS_FILE})
 
 set(targets_to_export)
 get_property(module_targets GLOBAL PROPERTY MITK_MODULE_TARGETS)
 if(module_targets)
   list(APPEND targets_to_export ${module_targets})
 endif()
 
 if(MITK_USE_BLUEBERRY)
   if(MITK_PLUGIN_LIBRARIES)
     list(APPEND targets_to_export ${MITK_PLUGIN_LIBRARIES})
   endif()
 endif()
 
 export(TARGETS ${targets_to_export} APPEND
        FILE ${MITK_EXPORTS_FILE})
 
 set(MITK_EXPORTED_TARGET_PROPERTIES )
 foreach(target_to_export ${targets_to_export})
   get_target_property(autoload_targets ${target_to_export} MITK_AUTOLOAD_TARGETS)
   if(autoload_targets)
     set(MITK_EXPORTED_TARGET_PROPERTIES "${MITK_EXPORTED_TARGET_PROPERTIES}
 set_target_properties(${target_to_export} PROPERTIES MITK_AUTOLOAD_TARGETS \"${autoload_targets}\")")
   endif()
   get_target_property(autoload_dir ${target_to_export} MITK_AUTOLOAD_DIRECTORY)
   if(autoload_dir)
     set(MITK_EXPORTED_TARGET_PROPERTIES "${MITK_EXPORTED_TARGET_PROPERTIES}
 set_target_properties(${target_to_export} PROPERTIES MITK_AUTOLOAD_DIRECTORY \"${autoload_dir}\")")
   endif()
 
   get_target_property(deprecated_module ${target_to_export} MITK_MODULE_DEPRECATED_SINCE)
   if(deprecated_module)
     set(MITK_EXPORTED_TARGET_PROPERTIES "${MITK_EXPORTED_TARGET_PROPERTIES}
 set_target_properties(${target_to_export} PROPERTIES MITK_MODULE_DEPRECATED_SINCE \"${deprecated_module}\")")
   endif()
 endforeach()
 
 # ---------------- External projects -----------------
 
 get_property(MITK_ADDITIONAL_LIBRARY_SEARCH_PATHS_CONFIG GLOBAL PROPERTY MITK_ADDITIONAL_LIBRARY_SEARCH_PATHS)
 
 set(MITK_CONFIG_EXTERNAL_PROJECTS )
 #string(REPLACE "^^" ";" _mitk_external_projects ${MITK_EXTERNAL_PROJECTS})
 
 foreach(ep ${MITK_EXTERNAL_PROJECTS})
   get_property(_components GLOBAL PROPERTY MITK_${ep}_COMPONENTS)
   set(MITK_CONFIG_EXTERNAL_PROJECTS "${MITK_CONFIG_EXTERNAL_PROJECTS}
 set(MITK_USE_${ep} ${MITK_USE_${ep}})
 set(MITK_${ep}_DIR \"${${ep}_DIR}\")
 set(MITK_${ep}_COMPONENTS ${_components})
 ")
 endforeach()
 
 foreach(ep ${MITK_EXTERNAL_PROJECTS})
   get_property(_package GLOBAL PROPERTY MITK_${ep}_PACKAGE)
   get_property(_components GLOBAL PROPERTY MITK_${ep}_COMPONENTS)
   if(_components)
       set(_components_arg COMPONENTS \${_components})
   else()
     set(_components_arg)
   endif()
 
   if(_package)
     set(MITK_CONFIG_EXTERNAL_PROJECTS "${MITK_CONFIG_EXTERNAL_PROJECTS}
 if(MITK_USE_${ep})
   set(${ep}_DIR \${MITK_${ep}_DIR})
   if(MITK_${ep}_COMPONENTS)
     mitkMacroFindDependency(${_package} COMPONENTS \${MITK_${ep}_COMPONENTS})
   else()
     mitkMacroFindDependency(${_package})
   endif()
 endif()")
   endif()
 endforeach()
 
 
 # ---------------- Tools -----------------
 
 configure_file(${MITK_SOURCE_DIR}/CMake/ToolExtensionITKFactory.cpp.in
                ${MITK_BINARY_DIR}/ToolExtensionITKFactory.cpp.in COPYONLY)
 configure_file(${MITK_SOURCE_DIR}/CMake/ToolExtensionITKFactoryLoader.cpp.in
                ${MITK_BINARY_DIR}/ToolExtensionITKFactoryLoader.cpp.in COPYONLY)
 configure_file(${MITK_SOURCE_DIR}/CMake/ToolGUIExtensionITKFactory.cpp.in
                ${MITK_BINARY_DIR}/ToolGUIExtensionITKFactory.cpp.in COPYONLY)
 
 # ---------------- Configure files -----------------
 
 configure_file(mitkVersion.h.in ${MITK_BINARY_DIR}/mitkVersion.h)
 configure_file(mitkConfig.h.in ${MITK_BINARY_DIR}/mitkConfig.h)
 
 set(IPFUNC_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Utilities/ipFunc)
 set(UTILITIES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Utilities)
 
 configure_file(mitkConfig.h.in ${MITK_BINARY_DIR}/mitkConfig.h)
 configure_file(MITKConfig.cmake.in ${MITK_BINARY_DIR}/MITKConfig.cmake @ONLY)
 
 write_basic_config_version_file(${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
   VERSION ${MITK_VERSION_STRING} COMPATIBILITY AnyNewerVersion)
 
 #-----------------------------------------------------------------------------
 # MITK Applications
 #-----------------------------------------------------------------------------
 
 # This must come after MITKConfig.h was generated, since applications
 # might do a find_package(MITK REQUIRED).
 add_subdirectory(Applications)
 
 if(MSVC AND TARGET MitkWorkbench)
   set_directory_properties(PROPERTIES VS_STARTUP_PROJECT MitkWorkbench)
 endif()
 
 foreach(MITK_EXTENSION_DIR ${MITK_ABSOLUTE_EXTENSION_DIRS})
   set(MITK_APPLICATIONS_EXTENSION_DIR "${MITK_EXTENSION_DIR}/Applications")
   if(EXISTS "${MITK_APPLICATIONS_EXTENSION_DIR}/CMakeLists.txt")
     add_subdirectory("${MITK_APPLICATIONS_EXTENSION_DIR}" "Applications")
   endif()
 endforeach()
 
 #-----------------------------------------------------------------------------
 # MITK Examples
 #-----------------------------------------------------------------------------
 
 if(MITK_BUILD_EXAMPLES)
   # This must come after MITKConfig.h was generated, since applications
   # might do a find_package(MITK REQUIRED).
   add_subdirectory(Examples)
 endif()
 
 #-----------------------------------------------------------------------------
 # Print configuration summary
 #-----------------------------------------------------------------------------
 
 message("\n\n")
 feature_summary(
   DESCRIPTION "------- FEATURE SUMMARY FOR ${PROJECT_NAME} -------"
   WHAT ALL
 )
diff --git a/MITKConfig.cmake.in b/MITKConfig.cmake.in
index 530ee7c6e3..4e7ef7c55b 100644
--- a/MITKConfig.cmake.in
+++ b/MITKConfig.cmake.in
@@ -1,314 +1,314 @@
 if(CMAKE_VERSION VERSION_LESS @MITK_CMAKE_MINIMUM_REQUIRED_VERSION@)
   message(FATAL_ERROR "MITK requires at least CMake Version @MITK_CMAKE_MINIMUM_REQUIRED_VERSION@")
 endif()
 
 # The MITK version number
 set(MITK_VERSION_MAJOR "@MITK_VERSION_MAJOR@")
 set(MITK_VERSION_MINOR "@MITK_VERSION_MINOR@")
 set(MITK_VERSION_PATCH "@MITK_VERSION_PATCH@")
 set(MITK_VERSION_STRING "@MITK_VERSION_STRING@")
 
 #-----------------------------------------------------------------------------
 # C++ language standard
 #-----------------------------------------------------------------------------
 
 set(MITK_CXX_STANDARD @MITK_CXX_STANDARD@)
 
 #-----------------------------------------------------------------------------
 # Include required CMake scripts
 #-----------------------------------------------------------------------------
 
 # Update the CMake module path
 set(MITK_CMAKE_MODULE_PATH "@MITK_SOURCE_DIR@/CMake")
 list(APPEND CMAKE_MODULE_PATH ${MITK_CMAKE_MODULE_PATH})
 
 # Standard CMake macros
 include(CMakeParseArguments)
 include(FeatureSummary)
 include(FindPackageHandleStandardArgs)
 include(GenerateExportHeader)
 
 # Include MITK macros
 include(MacroParseArguments)
 include(mitkFunctionAddManifest)
 include(mitkFunctionAddCustomModuleTest)
 include(mitkFunctionCheckMitkCompatibility)
 include(mitkFunctionCheckModuleDependencies)
 include(mitkFunctionConfigureVisualStudioUserProjectFile)
 include(mitkFunctionCreateBlueBerryApplication)
 include(mitkFunctionCreateCommandLineApp)
 include(mitkFunctionCreateModule)
 include(mitkFunctionCreatePlugin)
 include(mitkFunctionCreateProvisioningFile)
 include(mitkFunctionCreateWindowsBatchScript)
 include(mitkFunctionGetLibrarySearchPaths)
 include(mitkFunctionInstallAutoLoadModules)
 include(mitkFunctionInstallCTKPlugin)
 include(mitkFunctionInstallProvisioningFiles)
 include(mitkFunctionInstallThirdPartyCTKPlugins)
 include(mitkFunctionOrganizeSources)
 include(mitkFunctionUseModules)
 include(mitkMacroCreateExecutable)
 include(mitkMacroCreateModuleTests)
 include(mitkMacroFindDependency)
 include(mitkMacroGenerateToolsLibrary)
 include(mitkMacroGetPMDPlatformString)
 include(mitkMacroInstall)
 include(mitkMacroInstallHelperApp)
 include(mitkMacroInstallTargets)
 include(mitkMacroMultiplexPicType)
 
 #-----------------------------------------------------------------------------
 # MITK flags and directories
 #-----------------------------------------------------------------------------
 
 # MITK compiler flags
 set(MITK_C_FLAGS "@MITK_C_FLAGS@")
 set(MTTK_C_FLAGS_DEBUG "@MITK_C_FLAGS_DEBUG@")
 set(MITK_C_FLAGS_RELEASE "@MITK_C_FLAGS_RELEASE@")
 set(MITK_CXX_FLAGS "@MITK_CXX_FLAGS@")
 set(MTTK_CXX_FLAGS_DEBUG "@MITK_CXX_FLAGS_DEBUG@")
 set(MITK_CXX_FLAGS_RELEASE "@MITK_CXX_FLAGS_RELEASE@")
 
 # MITK linker flags
 set(MITK_EXE_LINKER_FLAGS "@MITK_EXE_LINKER_FLAGS@")
 set(MITK_SHARED_LINKER_FLAGS "@MITK_SHARED_LINKER_FLAGS@")
 set(MITK_MODULE_LINKER_FLAGS "@MITK_MODULE_LINKER_FLAGS@")
 
 # MITK specific directories
 set(MITK_SOURCE_DIR "@MITK_SOURCE_DIR@")
 set(MITK_BINARY_DIR "@MITK_BINARY_DIR@")
 set(MITK_CMAKE_DIR "@MITK_CMAKE_DIR@")
 
 # MITK output directories
 set(MITK_CMAKE_RUNTIME_OUTPUT_DIRECTORY "@MITK_CMAKE_RUNTIME_OUTPUT_DIRECTORY@")
 set(MITK_CMAKE_ARCHIVE_OUTPUT_DIRECTORY "@MITK_CMAKE_ARCHIVE_OUTPUT_DIRECTORY@")
 set(MITK_CMAKE_LIBRARY_OUTPUT_DIRECTORY "@MITK_CMAKE_LIBRARY_OUTPUT_DIRECTORY@")
 
 #-----------------------------------------------------------------------------
 # Miscellaneous variables
 #-----------------------------------------------------------------------------
 
 # Internal version numbers, used for approximate compatibility checks
 # of a MITK development version (non-release).
 set(MITK_VERSION_PLUGIN_SYSTEM 2) # dropped legacy BlueBerry plug-in CMake support
 
 set(MITK_DATA_DIR "@MITK_DATA_DIR@")
 set(UTILITIES_DIR "@UTILITIES_DIR@")
 set(REGISTER_QFUNCTIONALITY_CPP_IN "@REGISTER_QFUNCTIONALITY_CPP_IN@")
 set(MITK_DOXYGEN_TAGFILE_NAME "@MITK_DOXYGEN_TAGFILE_NAME@")
 set(MITK_LEGACY_EXPORT_MACRO_NAME 1)
 
 set(DCMTK_CMAKE_DEBUG_POSTFIX @DCMTK_CMAKE_DEBUG_POSTFIX@)
 
 # Get the canonical name of the directory to avoid potential case mismatch,
 # e.g. in the drive letter on Windows.
 get_filename_component(CMAKE_CURRENT_LIST_DIR_REALPATH ${CMAKE_CURRENT_LIST_DIR} REALPATH)
 if(CMAKE_CURRENT_LIST_DIR_REALPATH STREQUAL MITK_BINARY_DIR)
   set(MITK_EXTERNAL_PROJECT_PREFIX @MITK_EXTERNAL_PROJECT_PREFIX@)
 endif()
 
 set(MITK_MODULES_PACKAGE_DEPENDS_DIR "@MITK_MODULES_PACKAGE_DEPENDS_DIR@")
 if(MODULES_PACKAGE_DEPENDS_DIRS)
   list(APPEND MODULES_PACKAGE_DEPENDS_DIRS ${MITK_MODULES_PACKAGE_DEPENDS_DIR})
   list(REMOVE_DUPLICATES MODULES_PACKAGE_DEPENDS_DIRS)
 else()
   set(MODULES_PACKAGE_DEPENDS_DIRS ${MITK_MODULES_PACKAGE_DEPENDS_DIR})
 endif()
 
 #-----------------------------------------------------------------------------
 # External dependencies
 #-----------------------------------------------------------------------------
 
 list(APPEND CMAKE_PREFIX_PATH "@MITK_EXTERNAL_PROJECT_PREFIX@")
 
 # -----------------------------------------
 # Qt variables and dependencies
 
 set(MITK_USE_Qt5 @MITK_USE_Qt5@)
 
 if(MITK_USE_Qt5)
   set(MITK_QT5_MINIMUM_VERSION @MITK_QT5_MINIMUM_VERSION@)
   set(MITK_QT5_COMPONENTS @MITK_QT5_COMPONENTS@)
   mitkMacroFindDependency(Qt5 ${MITK_QT5_MINIMUM_VERSION} COMPONENTS ${MITK_QT5_COMPONENTS})
 endif()
 
 # -----------------------------------------
 # Special Python variables
 
 set(MITK_USE_Python3 @MITK_USE_Python3@)
 if(MITK_USE_Python3)
   set(PYTHON_EXECUTABLE "@PYTHON_EXECUTABLE@" CACHE FILEPATH "")
   set(PYTHON_INCLUDE_DIR "@PYTHON_INCLUDE_DIR@" CACHE PATH "")
   set(PYTHON_LIBRARY "@PYTHON_LIBRARY@" CACHE FILEPATH "")
   set(PYTHON_INCLUDE_DIR2 "@PYTHON_INCLUDE_DIR2@" CACHE PATH "")
 
   mitkMacroFindDependency(Python3 COMPONENTS Interpreter Development NumPy)
 endif()
 
 # -----------------------------------------
 # Special Boost variables
 
 set(MITK_USE_Boost_LIBRARIES @MITK_USE_Boost_LIBRARIES@)
 set(MITK_USE_SYSTEM_Boost @MITK_USE_SYSTEM_Boost@)
-set(BOOST_ROOT "@BOOST_ROOT@" CACHE PATH "")
+set(Boost_ROOT "@Boost_ROOT@" CACHE PATH "")
 set(BOOST_LIBRARYDIR "@BOOST_LIBRARYDIR@" CACHE PATH "")
 set(Boost_ADDITIONAL_VERSIONS 1.74 1.74.0)
 
 # We need this later for a DCMTK workaround
 set(_dcmtk_dir_orig "@DCMTK_DIR@")
 
 # -----------------------------------------
 # External dependencies from the superbuild
 # or injected from somewhere else via
 # <project>_DIR variables.
 
 @MITK_CONFIG_EXTERNAL_PROJECTS@
 
 # Ensure the MITK module path comes first
 set(CMAKE_MODULE_PATH ${MITK_CMAKE_MODULE_PATH} ${CMAKE_MODULE_PATH})
 
 # -----------------------------------------
 # Special handling for DCMTK
 
 if(MITK_USE_DCMTK)
   # Due to the preferred CONFIG mode in find_package calls above,
   # the DCMTKConfig.cmake file is read, which does not provide useful
   # package information. We explictly need MODULE mode to find DCMTK.
   if(${_dcmtk_dir_orig} MATCHES "${MITK_EXTERNAL_PROJECT_PREFIX}.*")
     # Help our FindDCMTK.cmake script find our super-build DCMTK
     set(DCMTK_DIR ${MITK_EXTERNAL_PROJECT_PREFIX})
   else()
     # Use the original value
     set(DCMTK_DIR ${_dcmtk_dir_orig})
   endif()
   find_package(DCMTK REQUIRED MODULE)
 endif()
 
 # -----------------------------------------
 # Special handling for DCMQI
 if(MITK_USE_DCMQI)
   # Due to the preferred CONFIG mode in find_package calls above,
   # the DCMQIConfig.cmake file is read, which does not provide useful
   # package information. We explictly need MODULE mode to find DCMQI.
     # Help our FindDCMQI.cmake script find our super-build DCMQI
   set(DCMQI_DIR ${MITK_EXTERNAL_PROJECT_PREFIX})
   find_package(DCMQI REQUIRED)
 endif()
 
 # -----------------------------------------
 # Special handling for Boost
 
 if(MITK_USE_Boost)
   link_directories(${Boost_LIBRARY_DIRS})
 endif()
 
 # -----------------------------------------
 # Special handling for OpenIGTLink
 
 if(MITK_USE_OpenIGTLink)
   link_directories(${OpenIGTLink_LIBRARY_DIRS})
 endif()
 
 # -----------------------------------------
 # Internal project dependencies
 
 set(CppMicroServices_DIR "@CppMicroServices_DIR@")
 mitkMacroFindDependency(CppMicroServices)
 
 set(MITK_USE_BLUEBERRY @MITK_USE_BLUEBERRY@)
 if(MITK_USE_BLUEBERRY)
 
   set(MITK_PLUGIN_USE_FILE "@MITK_PLUGIN_USE_FILE@")
   if(MITK_PLUGIN_USE_FILE)
     if(EXISTS "${MITK_PLUGIN_USE_FILE}")
       include("${MITK_PLUGIN_USE_FILE}")
     endif()
   endif()
 
   set(MITK_PLUGIN_PROVISIONING_FILE "@MITK_EXTAPP_PROVISIONING_FILE@")
   set(MITK_PROVISIONING_FILES
       "${BLUEBERRY_PLUGIN_PROVISIONING_FILE}"
       "${MITK_PLUGIN_PROVISIONING_FILE}")
 
 endif()
 
 set(BLUEBERRY_USE_QT_HELP @BLUEBERRY_USE_QT_HELP@)
 if(BLUEBERRY_USE_QT_HELP AND DOXYGEN_VERSION VERSION_LESS "1.8.7")
   message("Setting BLUEBERRY_USE_QT_HELP to OFF because Doxygen version 1.8.7 or newer not found.")
   set(BLUEBERRY_USE_QT_HELP OFF)
 endif()
 
 set(BLUEBERRY_QTPLUGIN_PATH "@BLUEBERRY_QTPLUGIN_PATH@")
 
 set(QT_HELPGENERATOR_EXECUTABLE "@QT_HELPGENERATOR_EXECUTABLE@")
 set(QT_COLLECTIONGENERATOR_EXECUTABLE "@QT_COLLECTIONGENERATOR_EXECUTABLE@")
 set(QT_ASSISTANT_EXECUTABLE "@QT_ASSISTANT_EXECUTABLE@")
 set(QT_XMLPATTERNS_EXECUTABLE "@QT_XMLPATTERNS_EXECUTABLE@")
 
 
 #-----------------------------------------------------------------------------
 # MITK sub-project variables
 #-----------------------------------------------------------------------------
 
 # External SDK directories
 set(MITK_PMD_SDK_DIR @MITK_PMD_SDK_DIR@)
 
 # MITK ToF use variables
 
 set(MITK_TOF_PMDCAMCUBE_AVAILABLE @MITK_USE_TOF_PMDCAMCUBE@)
 if(MITK_TOF_PMDCAMCUBE_AVAILABLE AND NOT ${PROJECT_NAME} STREQUAL "MITK")
   option(MITK_USE_TOF_PMDCAMCUBE "Enable support for PMD Cam Cube" @MITK_USE_TOF_PMDCAMCUBE@)
   mark_as_advanced(MITK_USE_TOF_PMDCAMCUBE)
 endif()
 
 set(MITK_TOF_PMDCAMBOARD_AVAILABLE @MITK_USE_TOF_PMDCAMBOARD@)
 if(MITK_TOF_PMDCAMBOARD_AVAILABLE AND NOT ${PROJECT_NAME} STREQUAL "MITK")
   option(MITK_USE_TOF_PMDCAMBOARD "Enable support for PMD Cam Board" @MITK_USE_TOF_PMDCAMBOARD@)
   mark_as_advanced(MITK_USE_TOF_PMDCAMBOARD)
 endif()
 
 set(MITK_TOF_PMDO3_AVAILABLE @MITK_USE_TOF_PMDO3@)
 if(MITK_TOF_PMDO3_AVAILABLE AND NOT ${PROJECT_NAME} STREQUAL "MITK")
   option(MITK_USE_TOF_PMDO3 "Enable support for PMD =3" @MITK_USE_TOF_PMDO3@)
   mark_as_advanced(MITK_USE_TOF_PMDO3)
 endif()
 
 set(MITK_TOF_KINECT_AVAILABLE @MITK_USE_TOF_KINECT@)
 if(MITK_TOF_KINECT_AVAILABLE AND NOT ${PROJECT_NAME} STREQUAL "MITK")
   option(MITK_USE_TOF_KINECT "Enable support for Kinect" @MITK_USE_TOF_KINECT@)
   mark_as_advanced(MITK_USE_TOF_KINECT)
 endif()
 
 set(MITK_TOF_MESASR4000_AVAILABLE @MITK_USE_TOF_MESASR4000@)
 if(MITK_TOF_MESASR4000_AVAILABLE AND NOT ${PROJECT_NAME} STREQUAL "MITK")
   option(MITK_USE_TOF_MESASR4000 "Enable support for MESA SR4000" @MITK_USE_TOF_MESASR4000@)
   mark_as_advanced(MITK_USE_TOF_MESASR4000)
 endif()
 
 if(MITK_USE_IGT)
   #include("${MITK_DIR}/mitkIGTConfig.cmake")
 endif()
 
 #-----------------------------------------------------------------------------
 # Import MITK targets and set custom properties
 #-----------------------------------------------------------------------------
 
 if(NOT MITK_EXPORTS_FILE_INCLUDED)
   if(EXISTS "@MITK_EXPORTS_FILE@")
     set(MITK_EXPORTS_FILE_INCLUDED 1)
     include("@MITK_EXPORTS_FILE@")
   endif()
 endif()
 
 # Set properties on exported targets
 @MITK_EXPORTED_TARGET_PROPERTIES@
 
 #-----------------------------------------------------------------------------
 # Install rules
 #-----------------------------------------------------------------------------
 
 # Install rules for ToF libraries loaded at runtime
 if(EXISTS "@MITK_BINARY_DIR@/mitkToFHardwareInstallRules.cmake")
   include("@MITK_BINARY_DIR@/mitkToFHardwareInstallRules.cmake")
 endif()
diff --git a/Modules/CppMicroServices/CMakeLists.txt b/Modules/CppMicroServices/CMakeLists.txt
index 4a7d9ca897..4a026cf4e3 100644
--- a/Modules/CppMicroServices/CMakeLists.txt
+++ b/Modules/CppMicroServices/CMakeLists.txt
@@ -1,440 +1,438 @@
 project(CppMicroServices)
 
 set(${PROJECT_NAME}_MAJOR_VERSION 2)
 set(${PROJECT_NAME}_MINOR_VERSION 99)
 set(${PROJECT_NAME}_PATCH_VERSION 0)
 set(${PROJECT_NAME}_VERSION ${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}.${${PROJECT_NAME}_PATCH_VERSION})
 
-cmake_minimum_required(VERSION 2.8.12)
-cmake_policy(VERSION 2.8.12)
-cmake_policy(SET CMP0017 NEW)
+cmake_minimum_required(VERSION ${MITK_CMAKE_MINIMUM_REQUIRED_VERSION})
 
 #-----------------------------------------------------------------------------
 # Update CMake module path
 #------------------------------------------------------------------------------
 
 set(US_CMAKE_DIR ${PROJECT_SOURCE_DIR}/cmake)
 
 set(CMAKE_MODULE_PATH
   ${US_CMAKE_DIR}
   ${CMAKE_MODULE_PATH}
   )
 
 #-----------------------------------------------------------------------------
 # CMake function(s) and macro(s)
 #-----------------------------------------------------------------------------
 
 include(CMakeParseArguments)
 include(CMakePackageConfigHelpers)
 include(CheckCXXSourceCompiles)
 include(usFunctionAddResources)
 include(usFunctionEmbedResources)
 include(usFunctionGetResourceSource)
 include(usFunctionCheckResourceLinking)
 include(usFunctionCheckCompilerFlags)
 include(usFunctionGetGccVersion)
 include(usFunctionGenerateModuleInit)
 include(usMacroCreateModule)
 
 if(US_BUILD_TESTING)
   include(usFunctionCompileSnippets)
 endif()
 
 #-----------------------------------------------------------------------------
 # Init output directories
 #-----------------------------------------------------------------------------
 
 set(US_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
 set(US_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
 set(US_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
 
 foreach(_type ARCHIVE LIBRARY RUNTIME)
   if(NOT CMAKE_${_type}_OUTPUT_DIRECTORY)
     set(CMAKE_${_type}_OUTPUT_DIRECTORY ${US_${_type}_OUTPUT_DIRECTORY})
   endif()
 endforeach()
 
 #-----------------------------------------------------------------------------
 # Set a default build type if none was specified
 #-----------------------------------------------------------------------------
 
 if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
   message(STATUS "Setting build type to 'Debug' as none was specified.")
   set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
 
   # Set the possible values of build type for cmake-gui
   set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
                STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
 endif()
 
 #-----------------------------------------------------------------------------
 # CMake options
 #-----------------------------------------------------------------------------
 
 function(us_cache_var _var_name _var_default _var_type _var_help)
   set(_advanced 0)
   set(_force)
   foreach(_argn ${ARGN})
     if(_argn STREQUAL ADVANCED)
       set(_advanced 1)
     elseif(_argn STREQUAL FORCE)
       set(_force FORCE)
     endif()
   endforeach()
 
   if(US_IS_EMBEDDED)
     if(NOT DEFINED ${_var_name} OR _force)
       set(${_var_name} ${_var_default} PARENT_SCOPE)
     endif()
   else()
     set(${_var_name} ${_var_default} CACHE ${_var_type} "${_var_help}" ${_force})
     if(_advanced)
       mark_as_advanced(${_var_name})
     endif()
   endif()
 endfunction()
 
 # Determine if we are being build inside a larger project
 if(NOT DEFINED US_IS_EMBEDDED)
   if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
     set(US_IS_EMBEDDED 0)
   else()
     set(US_IS_EMBEDDED 1)
   endif()
 endif()
 
 # Determine the name of the install component for "SDK" artifacts.
 # The default is "sdk"
 if(NOT DEFINED US_SDK_INSTALL_COMPONENT)
   set(US_SDK_INSTALL_COMPONENT COMPONENT sdk)
 elseif(US_SDK_INSTALL_COMPONENT)
   set(US_SDK_INSTALL_COMPONENT COMPONENT ${US_SDK_INSTALL_COMPONENT})
 endif()
 
 us_cache_var(US_ENABLE_AUTOLOADING_SUPPORT OFF BOOL "Enable module auto-loading support")
 us_cache_var(US_ENABLE_THREADING_SUPPORT OFF BOOL "Enable threading support")
 us_cache_var(US_ENABLE_DEBUG_OUTPUT OFF BOOL "Enable debug messages" ADVANCED)
 us_cache_var(US_BUILD_SHARED_LIBS ON BOOL "Build shared libraries")
 us_cache_var(US_BUILD_TESTING OFF BOOL "Build tests")
 us_cache_var(US_BUILD_EXAMPLES OFF BOOL "Build example projects")
 
 if(US_BUILD_TESTING)
   enable_testing()
 endif()
 
 if(WIN32 AND NOT CYGWIN)
   set(default_runtime_install_dir bin/)
   set(default_library_install_dir bin/)
   set(default_archive_install_dir lib/)
   set(default_header_install_dir include/)
   set(default_auxiliary_install_dir share/)
 else()
   set(default_runtime_install_dir bin/)
   set(default_library_install_dir lib/${PROJECT_NAME})
   set(default_archive_install_dir lib/${PROJECT_NAME})
   set(default_header_install_dir include/${PROJECT_NAME})
   set(default_auxiliary_install_dir share/${PROJECT_NAME})
 endif()
 
 us_cache_var(RUNTIME_INSTALL_DIR ${default_runtime_install_dir} STRING "Relative install location for binaries" ADVANCED)
 us_cache_var(LIBRARY_INSTALL_DIR ${default_library_install_dir} STRING "Relative install location for libraries" ADVANCED)
 us_cache_var(ARCHIVE_INSTALL_DIR ${default_archive_install_dir} STRING "Relative install location for archives" ADVANCED)
 us_cache_var(HEADER_INSTALL_DIR ${default_header_install_dir} STRING "Relative install location for headers" ADVANCED)
 us_cache_var(AUXILIARY_INSTALL_DIR ${default_auxiliary_install_dir} STRING "Relative install location for auxiliary files" ADVANCED)
 set(AUXILIARY_CMAKE_INSTALL_DIR ${AUXILIARY_INSTALL_DIR}/cmake)
 
 us_cache_var(US_NAMESPACE "us" STRING "The namespace for the C++ Micro Services symbols")
 
 set(BUILD_SHARED_LIBS ${US_BUILD_SHARED_LIBS})
 
 set(US_MODULE_INIT_TEMPLATE "${US_CMAKE_DIR}/usModuleInit.cpp" CACHE INTERNAL "The module initialization template code")
 set(US_RESOURCE_RC_TEMPLATE "${US_CMAKE_DIR}/us_resources.rc.in" CACHE INTERNAL "The Windows RC resource template")
 set(US_CMAKE_RESOURCE_DEPENDENCIES_CPP "${US_CMAKE_DIR}/usCMakeResourceDependencies.cpp" CACHE INTERNAL "The dummy resource dependencies code")
 
 #-----------------------------------------------------------------------------
 # US C/CXX Flags
 #-----------------------------------------------------------------------------
 
 if(US_IS_EMBEDDED)
   set(CMAKE_C_FLAGS)
   set(CMAKE_C_FLAGS_RELEASE)
   set(CMAKE_C_FLAGS_DEBUG)
   set(CMAKE_CXX_FLAGS)
   set(CMAKE_CXX_FLAGS_RELEASE)
   set(CMAKE_CXX_FLAGS_DEBUG)
   set(CMAKE_LINK_FLAGS)
   set(CMAKE_LINK_FLAGS_RELEASE)
   set(CMAKE_LINK_FLAGS_DEBUG)
 endif()
 
 # Set C++ compiler flags
 if(NOT MSVC)
   foreach(_cxxflag -Werror -Wall -Wextra -Wpointer-arith -Winvalid-pch -Wcast-align -Wwrite-strings -Woverloaded-virtual -Wnon-virtual-dtor
                    -Wstrict-null-sentinel -Wsign-promo -fdiagnostics-show-option -Wno-error=deprecated-copy
                    -Wno-error=implicit-int-float-conversion)
     usFunctionCheckCompilerFlags(${_cxxflag} US_CXX_FLAGS)
   endforeach()
 endif()
 
 set(US_HAVE_VISIBILITY_ATTRIBUTE 0)
 usFunctionCheckCompilerFlags("-fvisibility=hidden -fvisibility-inlines-hidden" _have_visibility)
 if(_have_visibility)
   set(US_HAVE_VISIBILITY_ATTRIBUTE 1)
 endif()
 
 if(CMAKE_COMPILER_IS_GNUCXX)
 
   usFunctionGetGccVersion(${CMAKE_CXX_COMPILER} GCC_VERSION)
   if(${GCC_VERSION} VERSION_LESS "4.0.0")
     message(FATAL_ERROR "gcc version ${GCC_VERSION} not supported. Please use gcc >= 4.")
   endif()
 
   # With older versions of gcc the flag -fstack-protector-all requires an extra dependency to libssp.so.
   # If the gcc version is lower than 4.4.0 and the build type is Release let's not include the flag.
   if(${GCC_VERSION} VERSION_GREATER "4.4.0" OR (CMAKE_BUILD_TYPE STREQUAL "Debug" AND ${GCC_VERSION} VERSION_LESS "4.4.0"))
     usFunctionCheckCompilerFlags("-fstack-protector-all" US_CXX_FLAGS)
   endif()
 
   # Enable visibility support (only for gcc >= 4.5)
   # We only support hidden visibility with gcc for now.
   #
   # Clang has troubles with correctly marking template declarations and explicit template
   # instantiations as exported across shared library boundaries. Specifically, comparing
   # type_info objects from STL types does not work (used in us::Any::Type() == typeid(std::string))
   # which could be related to the default visibility of STL types declared in libstdc++ and/or libc++
   # but also to using RTLD_LOCAL or RTLD_GLOBAL when loading shared libraries via dlopen().
   #
   if(_have_visibility AND NOT ${GCC_VERSION} VERSION_LESS "4.5")
     set(US_CXX_FLAGS "${US_CXX_FLAGS} ${_have_visibility}")
   else()
     set(US_GCC_RTTI_WORKAROUND_NEEDED 1)
   endif()
 
   usFunctionCheckCompilerFlags("-O1 -D_FORTIFY_SOURCE=2" _fortify_source_flag)
   if(_fortify_source_flag)
     set(US_CXX_FLAGS_RELEASE "${US_CXX_FLAGS_RELEASE} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2")
   endif()
 endif()
 
 if(MSVC)
   set(US_CXX_FLAGS "/MP /WX /wd4180 /wd4996 /wd4251 /wd4503 ${US_CXX_FLAGS}")
 endif()
 
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${US_CXX_FLAGS}")
 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${US_CXX_FLAGS_RELEASE}")
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${US_C_FLAGS}")
 set(CMAKE_C_FLAGS_REALEASE "${CMAKE_C_FLAGS_RELEASE} ${US_C_FLAGS_RELEASE}")
 
 #-----------------------------------------------------------------------------
 # US Link Flags
 #-----------------------------------------------------------------------------
 
 set(US_LINK_FLAGS )
 if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
   foreach(_linkflag -Wl,--no-undefined)
     set(_add_flag)
     usFunctionCheckCompilerFlags("${_linkflag}" _add_flag)
     if(_add_flag)
       set(US_LINK_FLAGS "${US_LINK_FLAGS} ${_linkflag}")
     endif()
   endforeach()
 endif()
 
 usFunctionCheckResourceLinking()
 
 #-----------------------------------------------------------------------------
 # US Header Checks
 #-----------------------------------------------------------------------------
 
 include(CheckIncludeFileCXX)
 include(CheckCXXSourceCompiles)
 
 CHECK_INCLUDE_FILE_CXX(cxxabi.h US_HAVE_CXXABI_H)
 CHECK_INCLUDE_FILE_CXX(stdint.h US_HAVE_STDINT_H)
 CHECK_INCLUDE_FILE_CXX(tr1/unordered_map US_HAVE_TR1_UNORDERED_MAP_H)
 CHECK_INCLUDE_FILE_CXX(tr1/unordered_set US_HAVE_TR1_UNORDERED_SET_H)
 CHECK_INCLUDE_FILE_CXX(tr1/functional US_HAVE_TR1_FUNCTIONAL_H)
 CHECK_INCLUDE_FILE_CXX(unordered_map US_HAVE_UNORDERED_MAP_H)
 CHECK_INCLUDE_FILE_CXX(unordered_set US_HAVE_UNORDERED_SET_H)
 CHECK_INCLUDE_FILE_CXX(functional US_HAVE_FUNCTIONAL_H)
 
 if(US_HAVE_UNORDERED_MAP_H)
   CHECK_CXX_SOURCE_COMPILES("#include <unordered_map>\nint main() { std::tr1::unordered_map<int,int> m; return 0; }"
                             US_HAVE_TR1_UNORDERED_MAP)
   CHECK_CXX_SOURCE_COMPILES("#include <unordered_map>\nint main() { std::unordered_map<int,int> m; return 0; }"
                             US_HAVE_STD_UNORDERED_MAP)
   CHECK_CXX_SOURCE_COMPILES("#include <unordered_map>\nint main() { std::tr1::hash<int>(); return 0; }"
                             US_HAVE_TR1_HASH)
   CHECK_CXX_SOURCE_COMPILES("#include <unordered_map>\nint main() { std::hash<int>(); return 0; }"
                             US_HAVE_STD_HASH)
   if(US_HAVE_STD_HASH)
     CHECK_CXX_SOURCE_COMPILES("#include <unordered_map>\nstruct A { friend struct std::hash<int>; }; int main() { return 0; }"
                               US_HAVE_STD_HASH_STRUCT)
     CHECK_CXX_SOURCE_COMPILES("#include <unordered_map>\nstruct A { friend class std::hash<int>; }; int main() { return 0; }"
                               US_HAVE_STD_HASH_CLASS)
   elseif(US_HAVE_TR1_HASH)
     CHECK_CXX_SOURCE_COMPILES("#include <unordered_map>\nstruct A { friend struct std::tr1::hash<int>; }; int main() { return 0; }"
                               US_HAVE_TR1_HASH_STRUCT)
     CHECK_CXX_SOURCE_COMPILES("#include <unordered_map>\nstruct A { friend class std::tr1::hash<int>; }; int main() { return 0; }"
                               US_HAVE_TR1_HASH_CLASS)
   endif()
 elseif(US_HAVE_TR1_UNORDERED_MAP_H)
   CHECK_CXX_SOURCE_COMPILES("#include <tr1/unordered_map>\nint main() { std::tr1::unordered_map<int,int> m; return 0; }"
                             US_HAVE_TR1_UNORDERED_MAP)
   CHECK_CXX_SOURCE_COMPILES("#include <tr1/unordered_map>\nint main() { std::unordered_map<int,int> m; return 0; }"
                             US_HAVE_STD_UNORDERED_MAP)
   CHECK_CXX_SOURCE_COMPILES("#include <tr1/unordered_map>\nint main() { std::tr1::hash<int>(); return 0; }"
                             US_HAVE_TR1_HASH)
   CHECK_CXX_SOURCE_COMPILES("#include <tr1/unordered_map>\nint main() { std::hash<int>(); return 0; }"
                             US_HAVE_STD_HASH)
   if(US_HAVE_STD_HASH)
     CHECK_CXX_SOURCE_COMPILES("#include <tr1/unordered_map>\nstruct A { friend struct std::hash<int>; }; int main() { return 0; }"
                               US_HAVE_STD_HASH_STRUCT)
     CHECK_CXX_SOURCE_COMPILES("#include <tr1/unordered_map>\nstruct A { friend class std::hash<int>; }; int main() { return 0; }"
                               US_HAVE_STD_HASH_CLASS)
   elseif(US_HAVE_TR1_HASH)
     CHECK_CXX_SOURCE_COMPILES("#include <tr1/unordered_map>\nstruct A { friend struct std::tr1::hash<int>; }; int main() { return 0; }"
                               US_HAVE_TR1_HASH_STRUCT)
     CHECK_CXX_SOURCE_COMPILES("#include <tr1/unordered_map>\nstruct A { friend class std::tr1::hash<int>; }; int main() { return 0; }"
                               US_HAVE_TR1_HASH_CLASS)
   endif()
 else()
   message(SEND_ERROR "The header file \"unordered_map\" is not available.")
 endif()
 if(NOT (US_HAVE_TR1_UNORDERED_MAP OR US_HAVE_STD_UNORDERED_MAP))
   message(SEND_ERROR "The \"unordered_map\" type is not available.")
 endif()
 
 if(US_HAVE_UNORDERED_SET_H)
   CHECK_CXX_SOURCE_COMPILES("#include <unordered_set>\nint main() { std::tr1::unordered_set<int> s; return 0; }"
                             US_HAVE_TR1_UNORDERED_SET)
   CHECK_CXX_SOURCE_COMPILES("#include <unordered_set>\nint main() { std::unordered_set<int> s; return 0; }"
                             US_HAVE_STD_UNORDERED_SET)
 elseif(US_HAVE_TR1_UNORDERED_SET_H)
   CHECK_CXX_SOURCE_COMPILES("#include <tr1/unordered_set>\nint main() { std::tr1::unordered_set<int> s; return 0; }"
                             US_HAVE_TR1_UNORDERED_SET)
   CHECK_CXX_SOURCE_COMPILES("#include <tr1/unordered_set>\nint main() { std::unordered_set<int> s; return 0; }"
                             US_HAVE_STD_UNORDERED_SET)
 else()
   message(SEND_ERROR "The header file \"unordered_set\" is not available.")
 endif()
 if(NOT (US_HAVE_TR1_UNORDERED_SET OR US_HAVE_STD_UNORDERED_SET))
   message(SEND_ERROR "The \"unordered_set\" type is not available.")
 endif()
 
 if(NOT (US_HAVE_FUNCTIONAL_H OR US_HAVE_TR1_FUNCTIONAL_H))
   message(SEND_ERROR "The header file \"functional\" is not available.")
 endif()
 
 if(US_HAVE_FUNCTIONAL_H)
   CHECK_CXX_SOURCE_COMPILES("#include <functional>\nint main() { std::tr1::function<int(void)> f(main); return 0; }"
                             US_HAVE_TR1_FUNCTION)
   CHECK_CXX_SOURCE_COMPILES("#include <functional>\nint main() { std::function<int(void)> f(main); return 0; }"
                             US_HAVE_STD_FUNCTION)
 endif()
 if((NOT (US_HAVE_STD_FUNCTION OR US_HAVE_TR1_FUNCTION)) AND US_HAVE_TR1_FUNCTIONAL_H)
   unset(US_HAVE_TR1_FUNCTION CACHE)
   unset(US_HAVE_STD_FUNCTION CACHE)
   CHECK_CXX_SOURCE_COMPILES("#include <tr1/functional>\nint main() { std::tr1::function<int(void)> f(main); return 0; }"
                             US_HAVE_TR1_FUNCTION)
   CHECK_CXX_SOURCE_COMPILES("#include <tr1/functional>\nint main() { std::function<int(void)> f(main); return 0; }"
                             US_HAVE_STD_FUNCTION)
 endif()
 
 if(NOT (US_HAVE_STD_FUNCTION OR US_HAVE_TR1_FUNCTION))
   message(SEND_ERROR "The \"function\" type is not available.")
 endif()
 
 #-----------------------------------------------------------------------------
 # Source directory
 #-----------------------------------------------------------------------------
 
 set(US_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/third_party ${PROJECT_BINARY_DIR}/include)
 
 # Configure CppMicroServicesConfig.cmake for the build tree.
 # The file is used in sub-directories.
 
 set(PACKAGE_CONFIG_INCLUDE_DIR ${US_INCLUDE_DIRS})
 set(PACKAGE_CONFIG_RUNTIME_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
 set(PACKAGE_CONFIG_CMAKE_DIR ${US_CMAKE_DIR})
 
 set(US_RCC_EXECUTABLE_NAME usResourceCompiler CACHE INTERNAL "The target name of the usResourceCompiler executable.")
 
 configure_file(
   ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in
   ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
   @ONLY
   )
 
 set(us_global_config_h_file "${PROJECT_BINARY_DIR}/include/usGlobalConfig.h")
 configure_file(${US_CMAKE_DIR}/usGlobalConfig.h.in ${us_global_config_h_file})
 
 include_directories(${US_INCLUDE_DIRS})
 
 add_subdirectory(tools)
 
 add_subdirectory(core)
 
 #-----------------------------------------------------------------------------
 # Documentation
 #-----------------------------------------------------------------------------
 
 add_subdirectory(doc)
 
 #-----------------------------------------------------------------------------
 # Last configuration and install steps
 #-----------------------------------------------------------------------------
 
 # Version information
 configure_file(
   ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}ConfigVersion.cmake.in
   ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
   @ONLY
   )
 
 export(TARGETS ${US_RCC_EXECUTABLE_NAME}
        FILE ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake)
 
 if(NOT US_NO_INSTALL)
 
   install(EXPORT ${PROJECT_NAME}Targets
           FILE ${PROJECT_NAME}Targets.cmake
           DESTINATION ${AUXILIARY_CMAKE_INSTALL_DIR})
 
   set(_install_cmake_scripts
     ${US_MODULE_INIT_TEMPLATE}
     ${US_CMAKE_RESOURCE_DEPENDENCIES_CPP}
     ${US_CMAKE_DIR}/usFunctionGenerateModuleInit.cmake
     ${US_CMAKE_DIR}/usFunctionAddResources.cmake
     ${US_CMAKE_DIR}/usFunctionEmbedResources.cmake
     ${US_CMAKE_DIR}/usFunctionGetResourceSource.cmake
     ${US_CMAKE_DIR}/usFunctionCheckResourceLinking.cmake
     ${US_CMAKE_DIR}/usFunctionCheckCompilerFlags.cmake
     )
 
   install(FILES ${_install_cmake_scripts}
           DESTINATION ${AUXILIARY_CMAKE_INSTALL_DIR})
 
   install(FILES ${us_global_config_h_file}
           DESTINATION ${HEADER_INSTALL_DIR})
 
   # Configure CppMicroServicesConfig.cmake for the install tree
   set(CONFIG_INCLUDE_DIR ${HEADER_INSTALL_DIR})
   set(CONFIG_RUNTIME_DIR ${RUNTIME_INSTALL_DIR})
   set(CONFIG_CMAKE_DIR ${AUXILIARY_CMAKE_INSTALL_DIR})
   configure_package_config_file(
     ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in
     ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PROJECT_NAME}Config.cmake
     INSTALL_DESTINATION ${AUXILIARY_CMAKE_INSTALL_DIR}
     PATH_VARS CONFIG_INCLUDE_DIR CONFIG_RUNTIME_DIR CONFIG_CMAKE_DIR
     NO_SET_AND_CHECK_MACRO
     NO_CHECK_REQUIRED_COMPONENTS_MACRO
     )
 
   install(FILES ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PROJECT_NAME}Config.cmake
                 ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
           DESTINATION ${AUXILIARY_CMAKE_INSTALL_DIR}
           ${US_SDK_INSTALL_COMPONENT}
     )
 
 endif()
diff --git a/SuperBuild.cmake b/SuperBuild.cmake
index 1ab1ad5f59..c02d3fc7b3 100644
--- a/SuperBuild.cmake
+++ b/SuperBuild.cmake
@@ -1,502 +1,502 @@
 #-----------------------------------------------------------------------------
 # Convenient macro allowing to download a file
 #-----------------------------------------------------------------------------
 
 if(NOT MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL)
   set(MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL https://www.mitk.org/download/thirdparty)
 endif()
 
 macro(downloadFile url dest)
   file(DOWNLOAD ${url} ${dest} STATUS status)
   list(GET status 0 error_code)
   list(GET status 1 error_msg)
   if(error_code)
     message(FATAL_ERROR "error: Failed to download ${url} - ${error_msg}")
   endif()
 endmacro()
 
 #-----------------------------------------------------------------------------
 # MITK Prerequisites
 #-----------------------------------------------------------------------------
 
 if(UNIX AND NOT APPLE)
 
   include(mitkFunctionCheckPackageHeader)
 
   # Check for libxt-dev
   mitkFunctionCheckPackageHeader(StringDefs.h libxt-dev /usr/include/X11/)
 
   # Check for libtiff4-dev
   mitkFunctionCheckPackageHeader(tiff.h libtiff4-dev)
 
 endif()
 
 # We need a proper patch program. On Linux and MacOS, we assume
 # that "patch" is available. On Windows, we download patch.exe
 # if not patch program is found.
 find_program(PATCH_COMMAND patch)
 if((NOT PATCH_COMMAND OR NOT EXISTS ${PATCH_COMMAND}) AND WIN32)
   downloadFile(${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/patch.exe
                ${CMAKE_CURRENT_BINARY_DIR}/patch.exe)
   find_program(PATCH_COMMAND patch ${CMAKE_CURRENT_BINARY_DIR})
 endif()
 if(NOT PATCH_COMMAND)
   message(FATAL_ERROR "No patch program found.")
 endif()
 
 #-----------------------------------------------------------------------------
 # ExternalProjects
 #-----------------------------------------------------------------------------
 
 get_property(external_projects GLOBAL PROPERTY MITK_EXTERNAL_PROJECTS)
 
 if(MITK_CTEST_SCRIPT_MODE)
   # Write a file containing the list of enabled external project targets.
   # This file can be read by a ctest script to separately build projects.
   set(SUPERBUILD_TARGETS )
   foreach(proj ${external_projects})
     if(MITK_USE_${proj})
       list(APPEND SUPERBUILD_TARGETS ${proj})
     endif()
   endforeach()
   file(WRITE "${CMAKE_BINARY_DIR}/SuperBuildTargets.cmake" "set(SUPERBUILD_TARGETS ${SUPERBUILD_TARGETS})")
 endif()
 
 # A list of "nice" external projects, playing well together with CMake
 set(nice_external_projects ${external_projects})
 list(REMOVE_ITEM nice_external_projects Boost)
 foreach(proj ${nice_external_projects})
   if(MITK_USE_${proj})
     set(EXTERNAL_${proj}_DIR "${${proj}_DIR}" CACHE PATH "Path to ${proj} build directory")
     mark_as_advanced(EXTERNAL_${proj}_DIR)
     if(EXTERNAL_${proj}_DIR)
       set(${proj}_DIR ${EXTERNAL_${proj}_DIR})
     endif()
   endif()
 endforeach()
 
-set(EXTERNAL_BOOST_ROOT "${BOOST_ROOT}" CACHE PATH "Path to Boost directory")
-mark_as_advanced(EXTERNAL_BOOST_ROOT)
-if(EXTERNAL_BOOST_ROOT)
-  set(BOOST_ROOT ${EXTERNAL_BOOST_ROOT})
+set(EXTERNAL_Boost_ROOT "${Boost_ROOT}" CACHE PATH "Path to Boost directory")
+mark_as_advanced(EXTERNAL_Boost_ROOT)
+if(EXTERNAL_Boost_ROOT)
+  set(Boost_ROOT ${EXTERNAL_Boost_ROOT})
 endif()
 
 if(BUILD_TESTING)
   set(EXTERNAL_MITK_DATA_DIR "${MITK_DATA_DIR}" CACHE PATH "Path to the MITK data directory")
   mark_as_advanced(EXTERNAL_MITK_DATA_DIR)
   if(EXTERNAL_MITK_DATA_DIR)
     set(MITK_DATA_DIR ${EXTERNAL_MITK_DATA_DIR})
   endif()
 endif()
 
 #-----------------------------------------------------------------------------
 # External project settings
 #-----------------------------------------------------------------------------
 
 include(ExternalProject)
 include(mitkMacroQueryCustomEPVars)
 include(mitkFunctionInstallExternalCMakeProject)
 include(mitkFunctionCleanExternalProject)
 
 option(MITK_AUTOCLEAN_EXTERNAL_PROJECTS "Experimental: Clean external project builds if updated" ON)
 
 set(ep_prefix "${CMAKE_BINARY_DIR}/ep")
 set_property(DIRECTORY PROPERTY EP_PREFIX ${ep_prefix})
 
 # Compute -G arg for configuring external projects with the same CMake generator:
 if(CMAKE_EXTRA_GENERATOR)
   set(gen "${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}")
 else()
   set(gen "${CMAKE_GENERATOR}")
 endif()
 
 set(gen_platform ${CMAKE_GENERATOR_PLATFORM})
 
 # Use this value where semi-colons are needed in ep_add args:
 set(sep "^^")
 
 ##
 
 if(MSVC_VERSION)
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /bigobj /MP")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj /MP")
 endif()
 
 # This is a workaround for passing linker flags
 # actually down to the linker invocation
 set(_cmake_required_flags_orig ${CMAKE_REQUIRED_FLAGS})
 set(CMAKE_REQUIRED_FLAGS "-Wl,-rpath")
 mitkFunctionCheckCompilerFlags(${CMAKE_REQUIRED_FLAGS} _has_rpath_flag)
 set(CMAKE_REQUIRED_FLAGS ${_cmake_required_flags_orig})
 
 set(_install_rpath_linkflag )
 if(_has_rpath_flag)
   if(APPLE)
     set(_install_rpath_linkflag "-Wl,-rpath,@loader_path/../lib")
   else()
     set(_install_rpath_linkflag "-Wl,-rpath='$ORIGIN/../lib'")
   endif()
 endif()
 
 set(_install_rpath)
 if(APPLE)
   set(_install_rpath "@loader_path/../lib")
 elseif(UNIX)
   # this work for libraries as well as executables
   set(_install_rpath "\$ORIGIN/../lib")
 endif()
 
 set(ep_common_args
   -DCMAKE_POLICY_DEFAULT_CMP0091:STRING=OLD
   -DCMAKE_CXX_EXTENSIONS:STRING=${CMAKE_CXX_EXTENSIONS}
   -DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD}
   -DCMAKE_CXX_STANDARD_REQUIRED:BOOL=${CMAKE_CXX_STANDARD_REQUIRED}
   -DCMAKE_MACOSX_RPATH:BOOL=TRUE
   "-DCMAKE_INSTALL_RPATH:STRING=${_install_rpath}"
   -DBUILD_TESTING:BOOL=OFF
   -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
   -DBUILD_SHARED_LIBS:BOOL=ON
   -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
   -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
   -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
   -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
   "-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} ${MITK_CXX${MITK_CXX_STANDARD}_FLAG}"
   #debug flags
   -DCMAKE_CXX_FLAGS_DEBUG:STRING=${CMAKE_CXX_FLAGS_DEBUG}
   -DCMAKE_C_FLAGS_DEBUG:STRING=${CMAKE_C_FLAGS_DEBUG}
   #release flags
   -DCMAKE_CXX_FLAGS_RELEASE:STRING=${CMAKE_CXX_FLAGS_RELEASE}
   -DCMAKE_C_FLAGS_RELEASE:STRING=${CMAKE_C_FLAGS_RELEASE}
   #relwithdebinfo
   -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
   -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING=${CMAKE_C_FLAGS_RELWITHDEBINFO}
   #link flags
   -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
   -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
   -DCMAKE_MODULE_LINKER_FLAGS:STRING=${CMAKE_MODULE_LINKER_FLAGS}
 )
 
 if(MSVC_VERSION)
   list(APPEND ep_common_args
     -DCMAKE_DEBUG_POSTFIX:STRING=d
   )
 
   set(DCMTK_CMAKE_DEBUG_POSTFIX d)
 endif()
 
 set(ep_common_cache_args
 )
 
 set(ep_common_cache_default_args
   "-DCMAKE_PREFIX_PATH:PATH=<INSTALL_DIR>;${CMAKE_PREFIX_PATH}"
   "-DCMAKE_INCLUDE_PATH:PATH=${CMAKE_INCLUDE_PATH}"
   "-DCMAKE_LIBRARY_PATH:PATH=${CMAKE_LIBRARY_PATH}"
 )
 
 # Pass the CMAKE_OSX variables to external projects
 if(APPLE)
   set(MAC_OSX_ARCHITECTURE_ARGS
         -DCMAKE_OSX_ARCHITECTURES:PATH=${CMAKE_OSX_ARCHITECTURES}
         -DCMAKE_OSX_DEPLOYMENT_TARGET:PATH=${CMAKE_OSX_DEPLOYMENT_TARGET}
         -DCMAKE_OSX_SYSROOT:PATH=${CMAKE_OSX_SYSROOT}
   )
   set(ep_common_args
         ${MAC_OSX_ARCHITECTURE_ARGS}
         ${ep_common_args}
   )
 endif()
 
 set(mitk_superbuild_ep_args)
 set(mitk_depends )
 
 # Include external projects
 include(CMakeExternals/MITKData.cmake)
 foreach(p ${external_projects})
   set(p_hash "")
 
   set(p_file "${CMAKE_SOURCE_DIR}/CMakeExternals/${p}.cmake")
   if(EXISTS ${p_file})
     file(MD5 ${p_file} p_hash)
   else()
     foreach(MITK_EXTENSION_DIR ${MITK_ABSOLUTE_EXTENSION_DIRS})
       set(MITK_CMAKE_EXTERNALS_EXTENSION_DIR "${MITK_EXTENSION_DIR}/CMakeExternals")
       set(p_file "${MITK_CMAKE_EXTERNALS_EXTENSION_DIR}/${p}.cmake")
       if(EXISTS "${p_file}")
         file(MD5 "${p_file}" p_hash)
         break()
       endif()
     endforeach()
   endif()
 
   if(p_hash)
     set(p_hash_file "${ep_prefix}/tmp/${p}-hash.txt")
     if(MITK_AUTOCLEAN_EXTERNAL_PROJECTS)
       if(EXISTS "${p_hash_file}")
         file(READ "${p_hash_file}" p_prev_hash)
         if(NOT p_hash STREQUAL p_prev_hash)
           mitkCleanExternalProject(${p})
         endif()
       endif()
     endif()
     file(WRITE "${p_hash_file}" ${p_hash})
   endif()
 
   include("${p_file}" OPTIONAL)
 
   list(APPEND mitk_superbuild_ep_args
        -DMITK_USE_${p}:BOOL=${MITK_USE_${p}}
       )
   get_property(_package GLOBAL PROPERTY MITK_${p}_PACKAGE)
   if(_package)
     list(APPEND mitk_superbuild_ep_args -D${p}_DIR:PATH=${${p}_DIR})
   endif()
 
   list(APPEND mitk_depends ${${p}_DEPENDS})
 endforeach()
 if (SWIG_EXECUTABLE)
   list(APPEND mitk_superbuild_ep_args -DSWIG_EXECUTABLE=${SWIG_EXECUTABLE})
 endif()
 
 #-----------------------------------------------------------------------------
 # Set superbuild boolean args
 #-----------------------------------------------------------------------------
 
 set(mitk_cmake_boolean_args
   BUILD_SHARED_LIBS
   WITH_COVERAGE
   BUILD_TESTING
   MITK_BUILD_ALL_PLUGINS
   MITK_BUILD_ALL_APPS
   MITK_BUILD_EXAMPLES
   MITK_USE_Qt5
   MITK_USE_SYSTEM_Boost
   MITK_USE_BLUEBERRY
   MITK_USE_OpenCL
   MITK_USE_OpenMP
   )
 
 #-----------------------------------------------------------------------------
 # Create the final variable containing superbuild boolean args
 #-----------------------------------------------------------------------------
 
 set(mitk_superbuild_boolean_args)
 foreach(mitk_cmake_arg ${mitk_cmake_boolean_args})
   list(APPEND mitk_superbuild_boolean_args -D${mitk_cmake_arg}:BOOL=${${mitk_cmake_arg}})
 endforeach()
 
 if(MITK_BUILD_ALL_PLUGINS)
   list(APPEND mitk_superbuild_boolean_args -DBLUEBERRY_BUILD_ALL_PLUGINS:BOOL=ON)
 endif()
 
 #-----------------------------------------------------------------------------
 # MITK Utilities
 #-----------------------------------------------------------------------------
 
 set(proj MITK-Utilities)
 ExternalProject_Add(${proj}
   DOWNLOAD_COMMAND ""
   CONFIGURE_COMMAND ""
   BUILD_COMMAND ""
   INSTALL_COMMAND ""
   DEPENDS
     ${mitk_depends}
 )
 #-----------------------------------------------------------------------------
 # Additional MITK CXX/C Flags
 #-----------------------------------------------------------------------------
 
 set(MITK_ADDITIONAL_C_FLAGS "" CACHE STRING "Additional C Flags for MITK")
 set(MITK_ADDITIONAL_C_FLAGS_RELEASE "" CACHE STRING "Additional Release C Flags for MITK")
 set(MITK_ADDITIONAL_C_FLAGS_DEBUG "" CACHE STRING "Additional Debug C Flags for MITK")
 mark_as_advanced(MITK_ADDITIONAL_C_FLAGS MITK_ADDITIONAL_C_FLAGS_DEBUG MITK_ADDITIONAL_C_FLAGS_RELEASE)
 
 set(MITK_ADDITIONAL_CXX_FLAGS "" CACHE STRING "Additional CXX Flags for MITK")
 set(MITK_ADDITIONAL_CXX_FLAGS_RELEASE "" CACHE STRING "Additional Release CXX Flags for MITK")
 set(MITK_ADDITIONAL_CXX_FLAGS_DEBUG "" CACHE STRING "Additional Debug CXX Flags for MITK")
 mark_as_advanced(MITK_ADDITIONAL_CXX_FLAGS MITK_ADDITIONAL_CXX_FLAGS_DEBUG MITK_ADDITIONAL_CXX_FLAGS_RELEASE)
 
 set(MITK_ADDITIONAL_EXE_LINKER_FLAGS "" CACHE STRING "Additional exe linker flags for MITK")
 set(MITK_ADDITIONAL_SHARED_LINKER_FLAGS "" CACHE STRING "Additional shared linker flags for MITK")
 set(MITK_ADDITIONAL_MODULE_LINKER_FLAGS "" CACHE STRING "Additional module linker flags for MITK")
 mark_as_advanced(MITK_ADDITIONAL_EXE_LINKER_FLAGS MITK_ADDITIONAL_SHARED_LINKER_FLAGS MITK_ADDITIONAL_MODULE_LINKER_FLAGS)
 
 #-----------------------------------------------------------------------------
 # MITK Configure
 #-----------------------------------------------------------------------------
 
 if(MITK_INITIAL_CACHE_FILE)
   set(mitk_initial_cache_arg -C "${MITK_INITIAL_CACHE_FILE}")
 endif()
 
 set(mitk_optional_cache_args )
 foreach(type RUNTIME ARCHIVE LIBRARY)
   if(DEFINED CTK_PLUGIN_${type}_OUTPUT_DIRECTORY)
     list(APPEND mitk_optional_cache_args -DCTK_PLUGIN_${type}_OUTPUT_DIRECTORY:PATH=${CTK_PLUGIN_${type}_OUTPUT_DIRECTORY})
   endif()
 endforeach()
 
 if(MITK_USE_OpenCV)
   list(APPEND mitk_optional_cache_args "-DCMAKE_CONFIGURATION_TYPES:STRING=Debug$<SEMICOLON>Release")
 endif()
 
 # Optional python variables
 if(MITK_USE_Python3)
   list(APPEND mitk_optional_cache_args
        -DMITK_USE_Python3:BOOL=${MITK_USE_Python3}
        "-DPython3_EXECUTABLE:FILEPATH=${Python3_EXECUTABLE}"
        "-DPython3_INCLUDE_DIR:PATH=${Python3_INCLUDE_DIRS}"
        "-DPython3_LIBRARY:FILEPATH=${Python3_LIBRARY}"
        "-DPython3_STDLIB:FILEPATH=${Python3_STDLIB}"
        "-DPython3_SITELIB:FILEPATH=${Python3_SITELIB}"
       )
 endif()
 
 if(OPENSSL_ROOT_DIR)
   list(APPEND mitk_optional_cache_args
     "-DOPENSSL_ROOT_DIR:PATH=${OPENSSL_ROOT_DIR}"
   )
 endif()
 
 if(CMAKE_FRAMEWORK_PATH)
   list(APPEND mitk_optional_cache_args
     "-DCMAKE_FRAMEWORK_PATH:PATH=${CMAKE_FRAMEWORK_PATH}"
   )
 endif()
 
 if(Eigen_INCLUDE_DIR)
     list(APPEND mitk_optional_cache_args
       -DEigen_INCLUDE_DIR:PATH=${Eigen_INCLUDE_DIR}
     )
 endif()
 
 # Optional pass through of Doxygen
 if(DOXYGEN_EXECUTABLE)
   list(APPEND mitk_optional_cache_args
        -DDOXYGEN_EXECUTABLE:FILEPATH=${DOXYGEN_EXECUTABLE}
   )
 endif()
 
 if(MITK_DOXYGEN_BUILD_ALWAYS)
   list(APPEND mitk_optional_cache_args
     -DMITK_DOXYGEN_BUILD_ALWAYS:BOOL=${MITK_DOXYGEN_BUILD_ALWAYS}
   )
 endif()
 
 set(proj MITK-Configure)
 
 ExternalProject_Add(${proj}
   LIST_SEPARATOR ${sep}
   DOWNLOAD_COMMAND ""
   CMAKE_GENERATOR ${gen}
   CMAKE_GENERATOR_PLATFORM ${gen_platform}
   CMAKE_CACHE_ARGS
     # --------------- Build options ----------------
     -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
     -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
     "-DCMAKE_PREFIX_PATH:PATH=${ep_prefix};${CMAKE_PREFIX_PATH}"
     "-DCMAKE_LIBRARY_PATH:PATH=${CMAKE_LIBRARY_PATH}"
     "-DCMAKE_INCLUDE_PATH:PATH=${CMAKE_INCLUDE_PATH}"
     # --------------- Compile options ----------------
     -DCMAKE_CXX_EXTENSIONS:STRING=${CMAKE_CXX_EXTENSIONS}
     -DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD}
     -DCMAKE_CXX_STANDARD_REQUIRED:BOOL=${CMAKE_CXX_STANDARD_REQUIRED}
     -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
     -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
     "-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS} ${MITK_ADDITIONAL_C_FLAGS}"
     "-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} ${MITK_ADDITIONAL_CXX_FLAGS}"
     # debug flags
     "-DCMAKE_CXX_FLAGS_DEBUG:STRING=${CMAKE_CXX_FLAGS_DEBUG} ${MITK_ADDITIONAL_CXX_FLAGS_DEBUG}"
     "-DCMAKE_C_FLAGS_DEBUG:STRING=${CMAKE_C_FLAGS_DEBUG} ${MITK_ADDITIONAL_C_FLAGS_DEBUG}"
     # release flags
     "-DCMAKE_CXX_FLAGS_RELEASE:STRING=${CMAKE_CXX_FLAGS_RELEASE} ${MITK_ADDITIONAL_CXX_FLAGS_RELEASE}"
     "-DCMAKE_C_FLAGS_RELEASE:STRING=${CMAKE_C_FLAGS_RELEASE} ${MITK_ADDITIONAL_C_FLAGS_RELEASE}"
     # relwithdebinfo
     -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
     -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING=${CMAKE_C_FLAGS_RELWITHDEBINFO}
     # link flags
     "-DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS} ${MITK_ADDITIONAL_EXE_LINKER_FLAGS}"
     "-DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS} ${MITK_ADDITIONAL_SHARED_LINKER_FLAGS}"
     "-DCMAKE_MODULE_LINKER_FLAGS:STRING=${CMAKE_MODULE_LINKER_FLAGS} ${MITK_ADDITIONAL_MODULE_LINKER_FLAGS}"
     # Output directories
     -DMITK_CMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${MITK_CMAKE_LIBRARY_OUTPUT_DIRECTORY}
     -DMITK_CMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${MITK_CMAKE_RUNTIME_OUTPUT_DIRECTORY}
     -DMITK_CMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${MITK_CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
     # ------------- Boolean build options --------------
     ${mitk_superbuild_boolean_args}
     ${mitk_optional_cache_args}
     -DMITK_USE_SUPERBUILD:BOOL=OFF
     -DMITK_BUILD_CONFIGURATION:STRING=${MITK_BUILD_CONFIGURATION}
     -DMITK_FAST_TESTING:BOOL=${MITK_FAST_TESTING}
     -DMITK_XVFB_TESTING:BOOL=${MITK_XVFB_TESTING}
     -DMITK_XVFB_TESTING_COMMAND:STRING=${MITK_XVFB_TESTING_COMMAND}
     -DCTEST_USE_LAUNCHERS:BOOL=${CTEST_USE_LAUNCHERS}
     # ----------------- Miscellaneous ---------------
     -DCMAKE_LIBRARY_PATH:PATH=${CMAKE_LIBRARY_PATH}
     -DCMAKE_INCLUDE_PATH:PATH=${CMAKE_INCLUDE_PATH}
     -DMITK_CTEST_SCRIPT_MODE:STRING=${MITK_CTEST_SCRIPT_MODE}
     -DMITK_SUPERBUILD_BINARY_DIR:PATH=${MITK_BINARY_DIR}
     -DMITK_MODULES_TO_BUILD:INTERNAL=${MITK_MODULES_TO_BUILD}
     -DMITK_WHITELIST:STRING=${MITK_WHITELIST}
     -DMITK_WHITELISTS_EXTERNAL_PATH:STRING=${MITK_WHITELISTS_EXTERNAL_PATH}
     -DMITK_WHITELISTS_INTERNAL_PATH:STRING=${MITK_WHITELISTS_INTERNAL_PATH}
     -DMITK_EXTENSION_DIRS:STRING=${MITK_EXTENSION_DIRS}
     -DMITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES:STRING=${MITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES}
     -DMITK_ACCESSBYITK_FLOATING_PIXEL_TYPES:STRING=${MITK_ACCESSBYITK_FLOATING_PIXEL_TYPES}
     -DMITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES:STRING=${MITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES}
     -DMITK_ACCESSBYITK_VECTOR_PIXEL_TYPES:STRING=${MITK_ACCESSBYITK_VECTOR_PIXEL_TYPES}
     -DMITK_ACCESSBYITK_DIMENSIONS:STRING=${MITK_ACCESSBYITK_DIMENSIONS}
     -DMITK_CUSTOM_REVISION_DESC:STRING=${MITK_CUSTOM_REVISION_DESC}
     # --------------- External project options ---------------
     -DMITK_DATA_DIR:PATH=${MITK_DATA_DIR}
     -DMITK_EXTERNAL_PROJECT_PREFIX:PATH=${ep_prefix}
     -DCppMicroServices_DIR:PATH=${CppMicroServices_DIR}
     -DDCMTK_CMAKE_DEBUG_POSTFIX:STRING=${DCMTK_CMAKE_DEBUG_POSTFIX}
-    -DBOOST_ROOT:PATH=${BOOST_ROOT}
+    -DBoost_ROOT:PATH=${Boost_ROOT}
     -DBOOST_LIBRARYDIR:PATH=${BOOST_LIBRARYDIR}
     -DMITK_USE_Boost_LIBRARIES:STRING=${MITK_USE_Boost_LIBRARIES}
     -DQt5_DIR:PATH=${Qt5_DIR}
   CMAKE_ARGS
     ${mitk_initial_cache_arg}
     ${MAC_OSX_ARCHITECTURE_ARGS}
     ${mitk_superbuild_ep_args}
   SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
   BINARY_DIR ${CMAKE_BINARY_DIR}/MITK-build
   BUILD_COMMAND ""
   INSTALL_COMMAND ""
   DEPENDS
     MITK-Utilities
   )
 
 mitkFunctionInstallExternalCMakeProject(${proj})
 
 #-----------------------------------------------------------------------------
 # MITK
 #-----------------------------------------------------------------------------
 
 if(CMAKE_GENERATOR MATCHES ".*Makefiles.*")
   set(mitk_build_cmd "$(MAKE)")
 else()
   set(mitk_build_cmd ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/MITK-build --config ${CMAKE_CFG_INTDIR})
 endif()
 
 if(NOT DEFINED SUPERBUILD_EXCLUDE_MITKBUILD_TARGET OR NOT SUPERBUILD_EXCLUDE_MITKBUILD_TARGET)
   set(MITKBUILD_TARGET_ALL_OPTION "ALL")
 else()
   set(MITKBUILD_TARGET_ALL_OPTION "")
 endif()
 
 add_custom_target(MITK-build ${MITKBUILD_TARGET_ALL_OPTION}
   COMMAND ${mitk_build_cmd}
   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/MITK-build
   DEPENDS MITK-Configure
   )
 
 #-----------------------------------------------------------------------------
 # Custom target allowing to drive the build of the MITK project itself
 #-----------------------------------------------------------------------------
 
 add_custom_target(MITK
   COMMAND ${mitk_build_cmd}
   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/MITK-build
 )