CMakeLists.txt 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. PROJECT(CTKCore)
  2. # CMake modules
  3. SET(CMAKE_MODULE_PATH ${CTKCore_SOURCE_DIR}/CMake ${CMAKE_MODULE_PATH})
  4. # CMake Macros
  5. INCLUDE(CMake/ctkMacroBFDCheck.cmake)
  6. #
  7. # See CTK/CMake/ctkMacroBuildLib.cmake for details
  8. #
  9. SET(KIT_export_directive "CTK_CORE_EXPORT")
  10. # Source files
  11. SET(KIT_SRCS
  12. ctkAbstractFactory.h
  13. ctkAbstractFactory.tpp
  14. ctkAbstractFileBasedFactory.h
  15. ctkAbstractFileBasedFactory.tpp
  16. ctkAbstractObjectFactory.h
  17. ctkAbstractObjectFactory.tpp
  18. ctkAbstractPluginFactory.h
  19. ctkAbstractPluginFactory.tpp
  20. ctkAbstractQObjectFactory.h
  21. ctkAbstractQObjectFactory.tpp
  22. ctkAbstractLibraryFactory.h
  23. ctkAbstractLibraryFactory.tpp
  24. ctkCommandLineParser.cpp
  25. ctkCommandLineParser.h
  26. ctkDependencyGraph.cpp
  27. ctkDependencyGraph.h
  28. ctkLogger.cpp
  29. ctkLogger.h
  30. ctkHistogram.cpp
  31. ctkHistogram.h
  32. ctkModelTester.cpp
  33. ctkModelTester.h
  34. ctkPimpl.h
  35. ctkSingleton.h
  36. ctkTransferFunction.cpp
  37. ctkTransferFunction.h
  38. ctkTransferFunctionRepresentation.cpp
  39. ctkTransferFunctionRepresentation.h
  40. ctkUtils.cpp
  41. ctkUtils.h
  42. ctkWorkflow.h
  43. ctkWorkflow.cpp
  44. ctkWorkflow_p.h
  45. ctkWorkflowStep.h
  46. ctkWorkflowStep.cpp
  47. ctkWorkflowStep_p.h
  48. ctkWorkflowTransitions.h
  49. )
  50. IF(CTK_HAVE_BFD)
  51. LIST(APPEND KIT_SRCS
  52. ctkBinaryFileDescriptor.cpp
  53. ctkBinaryFileDescriptor.h
  54. )
  55. ENDIF()
  56. IF(CTK_WRAP_PYTHONQT_LIGHT)
  57. LIST(APPEND KIT_SRCS
  58. ctkCorePythonQtDecorators.h
  59. )
  60. # Let's make sure the decorator are not wrapped !
  61. SET_SOURCE_FILES_PROPERTIES(
  62. ctkCorePythonQtDecorators.h
  63. WRAP_EXCLUDE
  64. )
  65. ENDIF()
  66. # Headers that should run through moc
  67. SET(KIT_MOC_SRCS
  68. ctkCommandLineParser.h
  69. ctkLogger.h
  70. ctkHistogram.h
  71. ctkModelTester.h
  72. ctkTransferFunction.h
  73. ctkTransferFunctionRepresentation.h
  74. ctkWorkflow.h
  75. ctkWorkflow_p.h
  76. ctkWorkflowStep_p.h
  77. ctkWorkflowTransitions.h
  78. )
  79. IF(CTK_WRAP_PYTHONQT_LIGHT)
  80. LIST(APPEND KIT_MOC_SRCS
  81. ctkCorePythonQtDecorators.h
  82. )
  83. ENDIF()
  84. # UI files
  85. SET(KIT_UI_FORMS
  86. )
  87. # Resources
  88. SET(KIT_resources
  89. )
  90. # Target libraries - See CMake/ctkFunctionGetTargetLibraries.cmake
  91. # The following macro will read the target libraries from the file 'target_libraries.cmake'
  92. SET(KIT_target_libraries)
  93. ctkFunctionGetTargetLibraries(KIT_target_libraries)
  94. ctkMacroBuildLib(
  95. NAME ${PROJECT_NAME}
  96. EXPORT_DIRECTIVE ${KIT_export_directive}
  97. SRCS ${KIT_SRCS}
  98. MOC_SRCS ${KIT_MOC_SRCS}
  99. UI_FORMS ${KIT_UI_FORMS}
  100. TARGET_LIBRARIES ${KIT_target_libraries}
  101. RESOURCES ${KIT_resources}
  102. LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  103. )
  104. # Testing
  105. IF(BUILD_TESTING)
  106. ADD_SUBDIRECTORY(Testing)
  107. ENDIF(BUILD_TESTING)