CMakeLists.txt 2.3 KB

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