CMakeLists.txt 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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. ctkLogger.cpp
  47. ctkLogger.h
  48. ctkHistogram.cpp
  49. ctkHistogram.h
  50. ctkModelTester.cpp
  51. ctkModelTester.h
  52. ctkPimpl.h
  53. ctkScopedCurrentDir.cpp
  54. ctkScopedCurrentDir.h
  55. ctkSingleton.h
  56. ctkTransferFunction.cpp
  57. ctkTransferFunction.h
  58. ctkTransferFunctionRepresentation.cpp
  59. ctkTransferFunctionRepresentation.h
  60. ctkUtils.cpp
  61. ctkUtils.h
  62. ctkWorkflow.h
  63. ctkWorkflow.cpp
  64. ctkWorkflow_p.h
  65. ctkWorkflowStep.h
  66. ctkWorkflowStep.cpp
  67. ctkWorkflowStep_p.h
  68. ctkWorkflowTransitions.h
  69. ctkSetName.cpp
  70. ctkSetName.h
  71. )
  72. if(HAVE_BFD)
  73. list(APPEND KIT_SRCS
  74. ctkBinaryFileDescriptor.cpp
  75. ctkBinaryFileDescriptor.h
  76. )
  77. endif()
  78. # Headers that should run through moc
  79. set(KIT_MOC_SRCS
  80. ctkBooleanMapper.h
  81. ctkCallback.h
  82. ctkCheckableModelHelper.h
  83. ctkCommandLineParser.h
  84. ctkErrorLogFDMessageHandler_p.h
  85. ctkErrorLogModel.h
  86. ctkLogger.h
  87. ctkHistogram.h
  88. ctkModelTester.h
  89. ctkTransferFunction.h
  90. ctkTransferFunctionRepresentation.h
  91. ctkWorkflow.h
  92. ctkWorkflow_p.h
  93. ctkWorkflowStep_p.h
  94. ctkWorkflowTransitions.h
  95. )
  96. # UI files
  97. set(KIT_UI_FORMS
  98. )
  99. # Resources
  100. set(KIT_resources
  101. )
  102. # Target libraries - See CMake/ctkFunctionGetTargetLibraries.cmake
  103. # The following macro will read the target libraries from the file 'target_libraries.cmake'
  104. set(KIT_target_libraries)
  105. ctkFunctionGetTargetLibraries(KIT_target_libraries)
  106. ctkMacroBuildLib(
  107. NAME ${PROJECT_NAME}
  108. EXPORT_DIRECTIVE ${KIT_export_directive}
  109. SRCS ${KIT_SRCS}
  110. MOC_SRCS ${KIT_MOC_SRCS}
  111. UI_FORMS ${KIT_UI_FORMS}
  112. TARGET_LIBRARIES ${KIT_target_libraries}
  113. RESOURCES ${KIT_resources}
  114. LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  115. )
  116. if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
  117. ctkMacroBuildLibWrapper(
  118. TARGET ${PROJECT_NAME}
  119. SRCS ${KIT_SRCS}
  120. WRAPPER_LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  121. )
  122. endif()
  123. # Testing
  124. if(BUILD_TESTING)
  125. add_subdirectory(Testing)
  126. # Compile source code snippets
  127. add_subdirectory(Documentation/Snippets)
  128. endif()