CMakeLists.txt 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. project(CTKCore)
  2. #
  3. # 3rd party dependencies
  4. #
  5. # CMake modules
  6. set(CMAKE_MODULE_PATH ${CTKCore_SOURCE_DIR}/CMake ${CMAKE_MODULE_PATH})
  7. # CMake Macros
  8. include(CMake/ctkMacroBFDCheck.cmake) # HAVE_BFD will be set to True if it applies
  9. #
  10. # See CTK/CMake/ctkMacroBuildLib.cmake for details
  11. #
  12. set(KIT_export_directive "CTK_CORE_EXPORT")
  13. # Source files
  14. set(KIT_SRCS
  15. ctkAbstractFactory.h
  16. ctkAbstractFactory.tpp
  17. ctkAbstractFileBasedFactory.h
  18. ctkAbstractFileBasedFactory.tpp
  19. ctkAbstractObjectFactory.h
  20. ctkAbstractObjectFactory.tpp
  21. ctkAbstractPluginFactory.h
  22. ctkAbstractPluginFactory.tpp
  23. ctkAbstractQObjectFactory.h
  24. ctkAbstractQObjectFactory.tpp
  25. ctkAbstractLibraryFactory.h
  26. ctkAbstractLibraryFactory.tpp
  27. ctkBooleanMapper.cpp
  28. ctkBooleanMapper.h
  29. ctkCallback.cpp
  30. ctkCallback.h
  31. ctkCheckableModelHelper.cpp
  32. ctkCheckableModelHelper.h
  33. ctkCommandLineParser.cpp
  34. ctkCommandLineParser.h
  35. ctkDependencyGraph.cpp
  36. ctkDependencyGraph.h
  37. ctkErrorLogModel.cpp
  38. ctkErrorLogModel.h
  39. ctkErrorLogFDMessageHandler.cpp
  40. ctkErrorLogFDMessageHandler.h
  41. ctkErrorLogFDMessageHandler_p.h
  42. ctkErrorLogQtMessageHandler.cpp
  43. ctkErrorLogQtMessageHandler.h
  44. ctkErrorLogStreamMessageHandler.cpp
  45. ctkErrorLogStreamMessageHandler.h
  46. ctkException.cpp
  47. ctkException.h
  48. ctkLogger.cpp
  49. ctkLogger.h
  50. ctkHistogram.cpp
  51. ctkHistogram.h
  52. ctkModelTester.cpp
  53. ctkModelTester.h
  54. ctkPimpl.h
  55. ctkScopedCurrentDir.cpp
  56. ctkScopedCurrentDir.h
  57. ctkSingleton.h
  58. ctkTransferFunction.cpp
  59. ctkTransferFunction.h
  60. ctkTransferFunctionRepresentation.cpp
  61. ctkTransferFunctionRepresentation.h
  62. ctkUtils.cpp
  63. ctkUtils.h
  64. ctkWorkflow.h
  65. ctkWorkflow.cpp
  66. ctkWorkflow_p.h
  67. ctkWorkflowStep.h
  68. ctkWorkflowStep.cpp
  69. ctkWorkflowStep_p.h
  70. ctkWorkflowTransitions.h
  71. ctkSetName.cpp
  72. ctkSetName.h
  73. )
  74. if(HAVE_BFD)
  75. list(APPEND KIT_SRCS
  76. ctkBinaryFileDescriptor.cpp
  77. ctkBinaryFileDescriptor.h
  78. )
  79. endif()
  80. # Headers that should run through moc
  81. set(KIT_MOC_SRCS
  82. ctkBooleanMapper.h
  83. ctkCallback.h
  84. ctkCheckableModelHelper.h
  85. ctkCommandLineParser.h
  86. ctkErrorLogFDMessageHandler_p.h
  87. ctkErrorLogModel.h
  88. ctkLogger.h
  89. ctkHistogram.h
  90. ctkModelTester.h
  91. ctkTransferFunction.h
  92. ctkTransferFunctionRepresentation.h
  93. ctkWorkflow.h
  94. ctkWorkflow_p.h
  95. ctkWorkflowStep_p.h
  96. ctkWorkflowTransitions.h
  97. )
  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. if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
  119. ctkMacroBuildLibWrapper(
  120. TARGET ${PROJECT_NAME}
  121. SRCS ${KIT_SRCS}
  122. WRAPPER_LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  123. )
  124. endif()
  125. # Testing
  126. if(BUILD_TESTING)
  127. add_subdirectory(Testing)
  128. # Compile source code snippets
  129. add_subdirectory(Documentation/Snippets)
  130. endif()