CMakeLists.txt 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. PROJECT(CTKVisualizationVTKWidgets)
  2. #
  3. # 3rd party dependencies
  4. #
  5. FIND_PACKAGE(VTK)
  6. # TODO In case VTK is passed directly using VTK_DIR, check expected options
  7. IF(NOT VTK_FOUND)
  8. MESSAGE(FATAL_ERROR "error: VTK package is required to build ${PROJECT_NAME}")
  9. ENDIF()
  10. INCLUDE(${VTK_USE_FILE})
  11. #
  12. # See CTK/CMake/ctkMacroBuildLib.cmake for details
  13. #
  14. SET(KIT_export_directive "CTK_VISUALIZATION_VTK_WIDGETS_EXPORT")
  15. # Additional directories to include
  16. SET(KIT_include_directories
  17. )
  18. # Source files
  19. SET(KIT_SRCS
  20. ctkVTKAbstractMatrixWidget.cpp
  21. ctkVTKAbstractMatrixWidget.h
  22. ctkVTKAbstractMatrixWidget_p.h
  23. ctkVTKMatrixWidget.cpp
  24. ctkVTKMatrixWidget.h
  25. ctkVTKRenderView.cpp
  26. ctkVTKRenderView.h
  27. ctkVTKRenderView_p.h
  28. ctkVTKSliceView.cpp
  29. ctkVTKSliceView.h
  30. ctkVTKSliceView_p.h
  31. )
  32. # Headers that should run through moc
  33. SET(KIT_MOC_SRCS
  34. ctkVTKAbstractMatrixWidget_p.h
  35. ctkVTKMatrixWidget.h
  36. ctkVTKRenderView.h
  37. ctkVTKRenderView_p.h
  38. ctkVTKSliceView.h
  39. ctkVTKSliceView_p.h
  40. )
  41. # UI files
  42. SET(KIT_UI_FORMS
  43. )
  44. # Resources
  45. SET(KIT_resources
  46. )
  47. # Set VTK_LIBRARIES variable
  48. SET(VTK_LIBRARIES
  49. QVTK
  50. )
  51. # Target libraries - See CMake/ctkMacroGetTargetLibraries.cmake
  52. # The following macro will read the target libraries from the file 'target_libraries.cmake'
  53. ctkMacroGetTargetLibraries(KIT_target_libraries)
  54. ctkMacroBuildLib(
  55. NAME ${PROJECT_NAME}
  56. EXPORT_DIRECTIVE ${KIT_export_directive}
  57. INCLUDE_DIRECTORIES ${KIT_include_directories}
  58. SRCS ${KIT_SRCS}
  59. MOC_SRCS ${KIT_MOC_SRCS}
  60. UI_FORMS ${KIT_UI_FORMS}
  61. TARGET_LIBRARIES ${KIT_target_libraries}
  62. RESOURCES ${KIT_resources}
  63. LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  64. )
  65. # Plugins
  66. ADD_SUBDIRECTORY(Plugins)
  67. # Testing
  68. IF(BUILD_TESTING)
  69. ADD_SUBDIRECTORY(Testing)
  70. ENDIF(BUILD_TESTING)