Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
FindVMTK.cmake
Go to the documentation of this file.
1 include(FindPackageHandleStandardArgs)
2 include(SelectLibraryConfigurations)
3 
4 find_path(VMTK_INCLUDE_DIR
5  NAMES vtkvmtkConfigure.h
6  PATHS ${MITK_EXTERNAL_PROJECT_PREFIX}
7  PATH_SUFFIXES include/vmtk
8 )
9 
10 set(VMTK_LIBRARY_DIR "${MITK_EXTERNAL_PROJECT_PREFIX}/lib/vmtk")
11 
12 foreach(lib Common ComputationalGeometry DifferentialGeometry IO ITK Misc Segmentation)
13  string(TOUPPER ${lib} LIB)
14  if(NOT VMTK_${LIB}_LIBRARIES)
15  find_library(VMTK_${LIB}_LIBRARY_RELEASE vtkvmtk${lib} ${VMTK_LIBRARY_DIR})
16  find_library(VMTK_${LIB}_LIBRARY_DEBUG vtkvmtk${lib}d ${VMTK_LIBRARY_DIR})
17  select_library_configurations(VMTK_${LIB})
18  endif()
19 endforeach()
20 
21 find_package_handle_standard_args(VMTK DEFAULT_MSG
22  VMTK_INCLUDE_DIR
23  VMTK_COMMON_LIBRARIES
24  VMTK_COMPUTATIONALGEOMETRY_LIBRARIES
25  VMTK_DIFFERENTIALGEOMETRY_LIBRARIES
26  VMTK_IO_LIBRARIES
27  VMTK_ITK_LIBRARIES
28  VMTK_MISC_LIBRARIES
29  VMTK_SEGMENTATION_LIBRARIES
30 )
31 
32 if(VMTK_FOUND)
33  set(VMTK_INCLUDE_DIRS ${VMTK_INCLUDE_DIR})
34  set(VMTK_LIBRARIES
35  ${VMTK_COMMON_LIBRARIES}
36  ${VMTK_COMPUTATIONALGEOMETRY_LIBRARIES}
37  ${VMTK_DIFFERENTIALGEOMETRY_LIBRARIES}
38  ${VMTK_IO_LIBRARIES}
39  ${VMTK_ITK_LIBRARIES}
40  ${VMTK_MISC_LIBRARIES}
41  ${VMTK_SEGMENTATION_LIBRARIES}
42  )
43 endif()
44 
45 mark_as_advanced(
46  VMTK_INCLUDE_DIR
47 )