CMakeLists.txt 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. ctkCmdLineModuleXmlProgressWatcher.cpp
  24. ctkCmdLineModuleReference.cpp
  25. ctkCmdLineModuleReferencePrivate.cpp
  26. ctkCmdLineModuleRunException.cpp
  27. ctkCmdLineModuleXmlException.cpp
  28. ctkCmdLineModuleXmlMsgHandler_p.h
  29. ctkCmdLineModuleXmlMsgHandler.cpp
  30. ctkCmdLineModuleXmlParser_p.h
  31. ctkCmdLineModuleXmlParser.cpp
  32. ctkCmdLineModuleXmlValidator.cpp
  33. ctkCmdLineModuleXslTransform.cpp
  34. )
  35. # Headers that should run through moc
  36. set(KIT_MOC_SRCS
  37. ctkCmdLineModuleInstance.h
  38. ctkCmdLineModuleProcessTask.h
  39. )
  40. qt4_wrap_cpp(_dummy ctkCmdLineModuleXmlProgressWatcher.h)
  41. set_source_files_properties(ctkCmdLineModuleXmlProgressWatcher.cpp
  42. PROPERTIES OBJECT_DEPENDS ${_dummy})
  43. # UI files
  44. set(KIT_UI_FORMS
  45. )
  46. # Resources
  47. set(KIT_resources
  48. Resources/ctkCmdLineModules.qrc
  49. )
  50. set(QT_USE_QTXMLPATTERNS 1)
  51. include(${QT_USE_FILE})
  52. # Target libraries - See CMake/ctkFunctionGetTargetLibraries.cmake
  53. # The following macro will read the target libraries from the file 'target_libraries.cmake'
  54. ctkFunctionGetTargetLibraries(KIT_target_libraries)
  55. ctkMacroBuildLib(
  56. NAME ${PROJECT_NAME}
  57. EXPORT_DIRECTIVE ${KIT_export_directive}
  58. INCLUDE_DIRECTORIES ${KIT_include_directories}
  59. SRCS ${KIT_SRCS}
  60. MOC_SRCS ${KIT_MOC_SRCS}
  61. UI_FORMS ${KIT_UI_FORMS}
  62. TARGET_LIBRARIES ${KIT_target_libraries}
  63. RESOURCES ${KIT_resources}
  64. LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  65. )
  66. target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES})
  67. if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
  68. ctkMacroBuildLibWrapper(
  69. TARGET ${PROJECT_NAME}
  70. SRCS ${KIT_SRCS}
  71. WRAPPER_LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  72. )
  73. endif()
  74. # Testing
  75. if(BUILD_TESTING)
  76. add_subdirectory(Testing)
  77. endif()