if(BUILD_TESTING)
  include_directories(${MITK_INCLUDE_DIRS} ${ITK_INCLUDE_DIRS} ${VTK_INCLUDE_DIRS})
  link_directories(${MITK_LINK_DIRECTORIES})
  mitkFunctionCompileSnippets("${CMAKE_CURRENT_SOURCE_DIR}" ${MITK_LIBRARIES})
endif()

if(BUILD_TESTING)
  MITK_USE_MODULE(Mitk)
  include_directories(${ALL_INCLUDE_DIRECTORIES})
  link_directories(${ALL_LIBRARY_DIRS})
  mitkFunctionCompileSnippets("${CMAKE_CURRENT_SOURCE_DIR}" ${ALL_LIBRARIES})
endif()

Use more generic way to set-up include and lib paths for snippets.
Use more generic way to set-up include and lib paths for snippets.
