CMakeLists.txt 3.5 KB

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