CMakeLists.txt 3.3 KB

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