CMakeLists.txt 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. ctkCmdLineModuleBackend.cpp
  13. ctkCmdLineModuleCache.cpp
  14. ctkCmdLineModuleCache_p.h
  15. ctkCmdLineModuleDefaultPathBuilder.cpp
  16. ctkCmdLineModuleDescription.cpp
  17. ctkCmdLineModuleDescription_p.h
  18. ctkCmdLineModuleDirectoryWatcher.cpp
  19. ctkCmdLineModuleDirectoryWatcher_p.h
  20. ctkCmdLineModuleFrontend.cpp
  21. ctkCmdLineModuleFrontendFactory.cpp
  22. ctkCmdLineModuleFuture.h
  23. ctkCmdLineModuleFutureInterface.h
  24. ctkCmdLineModuleManager.cpp
  25. ctkCmdLineModuleParameter.cpp
  26. ctkCmdLineModuleParameterGroup.cpp
  27. ctkCmdLineModuleParameterGroup_p.h
  28. ctkCmdLineModuleParameterParsers_p.h
  29. ctkCmdLineModulePathBuilder.cpp
  30. ctkCmdLineModuleResult.h
  31. ctkCmdLineModuleXmlProgressWatcher.cpp
  32. ctkCmdLineModuleReference.cpp
  33. ctkCmdLineModuleRunException.cpp
  34. ctkCmdLineModuleXmlException.cpp
  35. ctkCmdLineModuleXmlMsgHandler_p.h
  36. ctkCmdLineModuleXmlMsgHandler.cpp
  37. ctkCmdLineModuleXmlParser_p.h
  38. ctkCmdLineModuleXmlParser.cpp
  39. ctkCmdLineModuleXmlValidator.cpp
  40. ctkCmdLineModuleXslTransform.cpp
  41. )
  42. # Headers that should run through moc
  43. set(KIT_MOC_SRCS
  44. ctkCmdLineModuleDirectoryWatcher.h
  45. ctkCmdLineModuleDirectoryWatcher_p.h
  46. ctkCmdLineModuleFrontend.h
  47. ctkCmdLineModuleManager.h
  48. )
  49. qt4_wrap_cpp(_dummy ctkCmdLineModuleXmlProgressWatcher.h)
  50. set_source_files_properties(ctkCmdLineModuleXmlProgressWatcher.cpp
  51. PROPERTIES OBJECT_DEPENDS ${_dummy})
  52. # UI files
  53. set(KIT_UI_FORMS
  54. )
  55. # Resources
  56. set(KIT_resources
  57. Resources/ctkCmdLineModules.qrc
  58. )
  59. set(QT_USE_QTXMLPATTERNS 1)
  60. include(${QT_USE_FILE})
  61. # Target libraries - See CMake/ctkFunctionGetTargetLibraries.cmake
  62. # The following macro will read the target libraries from the file 'target_libraries.cmake'
  63. ctkFunctionGetTargetLibraries(KIT_target_libraries)
  64. ctkMacroBuildLib(
  65. NAME ${PROJECT_NAME}
  66. EXPORT_DIRECTIVE ${KIT_export_directive}
  67. INCLUDE_DIRECTORIES ${KIT_include_directories}
  68. SRCS ${KIT_SRCS}
  69. MOC_SRCS ${KIT_MOC_SRCS}
  70. UI_FORMS ${KIT_UI_FORMS}
  71. TARGET_LIBRARIES ${KIT_target_libraries}
  72. RESOURCES ${KIT_resources}
  73. LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  74. )
  75. target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES})
  76. if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
  77. ctkMacroBuildLibWrapper(
  78. TARGET ${PROJECT_NAME}
  79. SRCS ${KIT_SRCS}
  80. WRAPPER_LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  81. )
  82. endif()
  83. # Testing
  84. if(BUILD_TESTING)
  85. add_subdirectory(Testing)
  86. endif()