CMakeLists.txt 1.9 KB

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