CMakeLists.txt 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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. ctkBackTrace.cpp
  28. ctkBooleanMapper.cpp
  29. ctkBooleanMapper.h
  30. ctkCallback.cpp
  31. ctkCallback.h
  32. ctkCheckableModelHelper.cpp
  33. ctkCheckableModelHelper.h
  34. ctkCommandLineParser.cpp
  35. ctkCommandLineParser.h
  36. ctkDependencyGraph.cpp
  37. ctkDependencyGraph.h
  38. ctkErrorLogModel.cpp
  39. ctkErrorLogModel.h
  40. ctkErrorLogFDMessageHandler.cpp
  41. ctkErrorLogFDMessageHandler.h
  42. ctkErrorLogFDMessageHandler_p.h
  43. ctkErrorLogQtMessageHandler.cpp
  44. ctkErrorLogQtMessageHandler.h
  45. ctkErrorLogStreamMessageHandler.cpp
  46. ctkErrorLogStreamMessageHandler.h
  47. ctkException.cpp
  48. ctkException.h
  49. ctkLogger.cpp
  50. ctkLogger.h
  51. ctkHistogram.cpp
  52. ctkHistogram.h
  53. ctkModelTester.cpp
  54. ctkModelTester.h
  55. ctkPimpl.h
  56. ctkScopedCurrentDir.cpp
  57. ctkScopedCurrentDir.h
  58. ctkSingleton.h
  59. ctkTransferFunction.cpp
  60. ctkTransferFunction.h
  61. ctkTransferFunctionRepresentation.cpp
  62. ctkTransferFunctionRepresentation.h
  63. ctkUtils.cpp
  64. ctkUtils.h
  65. ctkWorkflow.h
  66. ctkWorkflow.cpp
  67. ctkWorkflow_p.h
  68. ctkWorkflowStep.h
  69. ctkWorkflowStep.cpp
  70. ctkWorkflowStep_p.h
  71. ctkWorkflowTransitions.h
  72. ctkSetName.cpp
  73. ctkSetName.h
  74. )
  75. if(HAVE_BFD)
  76. list(APPEND KIT_SRCS
  77. ctkBinaryFileDescriptor.cpp
  78. ctkBinaryFileDescriptor.h
  79. )
  80. endif()
  81. # Headers that should run through moc
  82. set(KIT_MOC_SRCS
  83. ctkBooleanMapper.h
  84. ctkCallback.h
  85. ctkCheckableModelHelper.h
  86. ctkCommandLineParser.h
  87. ctkErrorLogFDMessageHandler_p.h
  88. ctkErrorLogModel.h
  89. ctkLogger.h
  90. ctkHistogram.h
  91. ctkModelTester.h
  92. ctkTransferFunction.h
  93. ctkTransferFunctionRepresentation.h
  94. ctkWorkflow.h
  95. ctkWorkflow_p.h
  96. ctkWorkflowStep_p.h
  97. ctkWorkflowTransitions.h
  98. )
  99. # UI files
  100. set(KIT_UI_FORMS
  101. )
  102. # Resources
  103. set(KIT_resources
  104. )
  105. # Target libraries - See CMake/ctkFunctionGetTargetLibraries.cmake
  106. # The following macro will read the target libraries from the file 'target_libraries.cmake'
  107. set(KIT_target_libraries)
  108. ctkFunctionGetTargetLibraries(KIT_target_libraries)
  109. ctkMacroBuildLib(
  110. NAME ${PROJECT_NAME}
  111. EXPORT_DIRECTIVE ${KIT_export_directive}
  112. SRCS ${KIT_SRCS}
  113. MOC_SRCS ${KIT_MOC_SRCS}
  114. UI_FORMS ${KIT_UI_FORMS}
  115. TARGET_LIBRARIES ${KIT_target_libraries}
  116. RESOURCES ${KIT_resources}
  117. LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  118. )
  119. # Needed for ctkBackTrace
  120. if(UNIX)
  121. target_link_libraries(${PROJECT_NAME} dl)
  122. elseif(WIN32 AND NOT MINGW)
  123. target_link_libraries(${PROJECT_NAME} dbghelp)
  124. endif()
  125. if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
  126. ctkMacroBuildLibWrapper(
  127. TARGET ${PROJECT_NAME}
  128. SRCS ${KIT_SRCS}
  129. WRAPPER_LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  130. )
  131. endif()
  132. # Testing
  133. if(BUILD_TESTING)
  134. add_subdirectory(Testing)
  135. # Compile source code snippets
  136. add_subdirectory(Documentation/Snippets)
  137. endif()