CMakeLists.txt 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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) # HAVE_BFD will be set to True if it applies
  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. ctkErrorLogModel.cpp
  29. ctkErrorLogModel.h
  30. ctkErrorLogFDMessageHandler.cpp
  31. ctkErrorLogFDMessageHandler.h
  32. ctkErrorLogFDMessageHandler_p.h
  33. ctkErrorLogQtMessageHandler.cpp
  34. ctkErrorLogQtMessageHandler.h
  35. ctkErrorLogStreamMessageHandler.cpp
  36. ctkErrorLogStreamMessageHandler.h
  37. ctkLogger.cpp
  38. ctkLogger.h
  39. ctkHistogram.cpp
  40. ctkHistogram.h
  41. ctkModelTester.cpp
  42. ctkModelTester.h
  43. ctkPimpl.h
  44. ctkSingleton.h
  45. ctkTransferFunction.cpp
  46. ctkTransferFunction.h
  47. ctkTransferFunctionRepresentation.cpp
  48. ctkTransferFunctionRepresentation.h
  49. ctkUtils.cpp
  50. ctkUtils.h
  51. ctkWorkflow.h
  52. ctkWorkflow.cpp
  53. ctkWorkflow_p.h
  54. ctkWorkflowStep.h
  55. ctkWorkflowStep.cpp
  56. ctkWorkflowStep_p.h
  57. ctkWorkflowTransitions.h
  58. )
  59. IF(HAVE_BFD)
  60. LIST(APPEND KIT_SRCS
  61. ctkBinaryFileDescriptor.cpp
  62. ctkBinaryFileDescriptor.h
  63. )
  64. ENDIF()
  65. IF(CTK_WRAP_PYTHONQT_LIGHT)
  66. LIST(APPEND KIT_SRCS
  67. ctkCorePythonQtDecorators.h
  68. )
  69. # Let's make sure the decorator are not wrapped !
  70. SET_SOURCE_FILES_PROPERTIES(
  71. ctkCorePythonQtDecorators.h
  72. WRAP_EXCLUDE
  73. )
  74. ENDIF()
  75. # Headers that should run through moc
  76. SET(KIT_MOC_SRCS
  77. ctkCommandLineParser.h
  78. ctkErrorLogFDMessageHandler_p.h
  79. ctkErrorLogModel.h
  80. ctkLogger.h
  81. ctkHistogram.h
  82. ctkModelTester.h
  83. ctkTransferFunction.h
  84. ctkTransferFunctionRepresentation.h
  85. ctkWorkflow.h
  86. ctkWorkflow_p.h
  87. ctkWorkflowStep_p.h
  88. ctkWorkflowTransitions.h
  89. )
  90. IF(CTK_WRAP_PYTHONQT_LIGHT)
  91. LIST(APPEND KIT_MOC_SRCS
  92. ctkCorePythonQtDecorators.h
  93. )
  94. ENDIF()
  95. # UI files
  96. SET(KIT_UI_FORMS
  97. )
  98. # Resources
  99. SET(KIT_resources
  100. )
  101. # Target libraries - See CMake/ctkFunctionGetTargetLibraries.cmake
  102. # The following macro will read the target libraries from the file 'target_libraries.cmake'
  103. SET(KIT_target_libraries)
  104. ctkFunctionGetTargetLibraries(KIT_target_libraries)
  105. ctkMacroBuildLib(
  106. NAME ${PROJECT_NAME}
  107. EXPORT_DIRECTIVE ${KIT_export_directive}
  108. SRCS ${KIT_SRCS}
  109. MOC_SRCS ${KIT_MOC_SRCS}
  110. UI_FORMS ${KIT_UI_FORMS}
  111. TARGET_LIBRARIES ${KIT_target_libraries}
  112. RESOURCES ${KIT_resources}
  113. LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  114. )
  115. # Testing
  116. IF(BUILD_TESTING)
  117. ADD_SUBDIRECTORY(Testing)
  118. ENDIF(BUILD_TESTING)