CMakeLists.txt 2.5 KB

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