CMakeLists.txt 1.9 KB

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