CMakeLists.txt 2.0 KB

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