CMakeLists.txt 1.6 KB

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