CMakeLists.txt 1.9 KB

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