CMakeLists.txt 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. ctkVTKTextPropertyWidget.cpp
  32. ctkVTKTextPropertyWidget.h
  33. )
  34. # Headers that should run through moc
  35. SET(KIT_MOC_SRCS
  36. ctkVTKAbstractMatrixWidget_p.h
  37. ctkVTKMatrixWidget.h
  38. ctkVTKRenderView.h
  39. ctkVTKRenderView_p.h
  40. ctkVTKSliceView.h
  41. ctkVTKSliceView_p.h
  42. ctkVTKTextPropertyWidget.h
  43. )
  44. # UI files
  45. SET(KIT_UI_FORMS
  46. Resources/UI/ctkVTKTextPropertyWidget.ui
  47. )
  48. # Resources
  49. SET(KIT_resources
  50. )
  51. # Set VTK_LIBRARIES variable
  52. SET(VTK_LIBRARIES
  53. QVTK
  54. )
  55. # Target libraries - See CMake/ctkMacroGetTargetLibraries.cmake
  56. # The following macro will read the target libraries from the file 'target_libraries.cmake'
  57. ctkMacroGetTargetLibraries(KIT_target_libraries)
  58. ctkMacroBuildLib(
  59. NAME ${PROJECT_NAME}
  60. EXPORT_DIRECTIVE ${KIT_export_directive}
  61. INCLUDE_DIRECTORIES ${KIT_include_directories}
  62. SRCS ${KIT_SRCS}
  63. MOC_SRCS ${KIT_MOC_SRCS}
  64. UI_FORMS ${KIT_UI_FORMS}
  65. TARGET_LIBRARIES ${KIT_target_libraries}
  66. RESOURCES ${KIT_resources}
  67. LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  68. )
  69. # Plugins
  70. ADD_SUBDIRECTORY(Plugins)
  71. # Testing
  72. IF(BUILD_TESTING)
  73. ADD_SUBDIRECTORY(Testing)
  74. ENDIF(BUILD_TESTING)