CMakeLists.txt 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. PROJECT(CTKVisualizationVTKCore)
  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_CORE_EXPORT")
  15. # Additional directories to include
  16. SET(KIT_include_directories
  17. )
  18. # Source files
  19. SET(KIT_SRCS
  20. ctkVTKColorTransferFunction.cpp
  21. ctkVTKColorTransferFunction.h
  22. ctkVTKCommandOptions.cpp
  23. ctkVTKCommandOptions.h
  24. ctkVTKCompositeFunction.cpp
  25. ctkVTKCompositeFunction.h
  26. ctkVTKConnection.cpp
  27. ctkVTKConnection.h
  28. ctkVTKHistogram.cpp
  29. ctkVTKHistogram.h
  30. ctkVTKLookupTable.cpp
  31. ctkVTKLookupTable.h
  32. ctkVTKObject.h
  33. ctkVTKObjectEventsObserver.cpp
  34. ctkVTKObjectEventsObserver.h
  35. ctkVTKPiecewiseFunction.cpp
  36. ctkVTKPiecewiseFunction.h
  37. )
  38. # Headers that should run through moc
  39. SET(KIT_MOC_SRCS
  40. ctkVTKColorTransferFunction.h
  41. ctkVTKConnection.h
  42. ctkVTKCompositeFunction.h
  43. ctkVTKLookupTable.h
  44. ctkVTKHistogram.h
  45. ctkVTKObjectEventsObserver.h
  46. ctkVTKPiecewiseFunction.h
  47. )
  48. # UI files
  49. SET(KIT_UI_FORMS
  50. )
  51. # Resources
  52. SET(KIT_resources
  53. )
  54. # Set VTK_LIBRARIES variable
  55. SET(VTK_LIBRARIES
  56. vtkCommon
  57. vtkFiltering
  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)