CMakeLists.txt 2.9 KB

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