CMakeLists.txt 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. project(CTKCommandLineModulesCore)
  2. #
  3. # 3rd party dependencies
  4. #
  5. #
  6. # See CTK/CMake/ctkMacroBuildLib.cmake for details
  7. #
  8. set(KIT_export_directive "CTK_CMDLINEMODULECORE_EXPORT")
  9. # Additional directories to include
  10. # Source files
  11. set(KIT_SRCS
  12. ctkCmdLineModuleDescription.cpp
  13. ctkCmdLineModuleDescriptionPrivate.h
  14. ctkCmdLineModuleInstance.cpp
  15. ctkCmdLineModuleInstanceFactory.cpp
  16. ctkCmdLineModuleManager.cpp
  17. ctkCmdLineModuleParameter.cpp
  18. ctkCmdLineModuleParameterPrivate.cpp
  19. ctkCmdLineModuleParameterGroup.cpp
  20. ctkCmdLineModuleParameterGroupPrivate.h
  21. ctkCmdLineModuleParameterParsers_p.h
  22. ctkCmdLineModuleProcessTask.cpp
  23. ctkCmdLineModuleReference.cpp
  24. ctkCmdLineModuleReferencePrivate.cpp
  25. ctkCmdLineModuleRunException.cpp
  26. ctkCmdLineModuleXmlException.cpp
  27. ctkCmdLineModuleXmlMsgHandler_p.h
  28. ctkCmdLineModuleXmlMsgHandler.cpp
  29. ctkCmdLineModuleXmlParser_p.h
  30. ctkCmdLineModuleXmlParser.cpp
  31. ctkCmdLineModuleXmlValidator.cpp
  32. ctkCmdLineModuleXslTransform.cpp
  33. )
  34. # Headers that should run through moc
  35. set(KIT_MOC_SRCS
  36. ctkCmdLineModuleInstance.h
  37. ctkCmdLineModuleProcessTask.h
  38. )
  39. # UI files
  40. set(KIT_UI_FORMS
  41. )
  42. # Resources
  43. set(KIT_resources
  44. Resources/ctkCmdLineModules.qrc
  45. )
  46. set(QT_USE_QTXMLPATTERNS 1)
  47. include(${QT_USE_FILE})
  48. # Target libraries - See CMake/ctkFunctionGetTargetLibraries.cmake
  49. # The following macro will read the target libraries from the file 'target_libraries.cmake'
  50. ctkFunctionGetTargetLibraries(KIT_target_libraries)
  51. ctkMacroBuildLib(
  52. NAME ${PROJECT_NAME}
  53. EXPORT_DIRECTIVE ${KIT_export_directive}
  54. INCLUDE_DIRECTORIES ${KIT_include_directories}
  55. SRCS ${KIT_SRCS}
  56. MOC_SRCS ${KIT_MOC_SRCS}
  57. UI_FORMS ${KIT_UI_FORMS}
  58. TARGET_LIBRARIES ${KIT_target_libraries}
  59. RESOURCES ${KIT_resources}
  60. LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  61. )
  62. target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES})
  63. if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
  64. ctkMacroBuildLibWrapper(
  65. TARGET ${PROJECT_NAME}
  66. SRCS ${KIT_SRCS}
  67. WRAPPER_LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  68. )
  69. endif()
  70. # Testing
  71. if(BUILD_TESTING)
  72. add_subdirectory(Testing)
  73. endif()