CMakeLists.txt 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. ctkCmdLineModuleInstance.cpp
  18. ctkCmdLineModuleInstanceFactory.cpp
  19. ctkCmdLineModuleManager.cpp
  20. ctkCmdLineModuleParameter.cpp
  21. ctkCmdLineModuleParameterGroup.cpp
  22. ctkCmdLineModuleParameterGroup_p.h
  23. ctkCmdLineModuleParameterParsers_p.h
  24. ctkCmdLineModulePathBuilder.cpp
  25. ctkCmdLineModuleProcessTask.cpp
  26. ctkCmdLineModuleXmlProgressWatcher.cpp
  27. ctkCmdLineModuleReference.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. ctkCmdLineModuleDirectoryWatcher.h
  40. ctkCmdLineModuleDirectoryWatcher_p.h
  41. ctkCmdLineModuleManager.h
  42. ctkCmdLineModuleInstance.h
  43. ctkCmdLineModuleProcessTask.h
  44. )
  45. qt4_wrap_cpp(_dummy ctkCmdLineModuleXmlProgressWatcher.h)
  46. set_source_files_properties(ctkCmdLineModuleXmlProgressWatcher.cpp
  47. PROPERTIES OBJECT_DEPENDS ${_dummy})
  48. # UI files
  49. set(KIT_UI_FORMS
  50. )
  51. # Resources
  52. set(KIT_resources
  53. Resources/ctkCmdLineModules.qrc
  54. )
  55. set(QT_USE_QTXMLPATTERNS 1)
  56. include(${QT_USE_FILE})
  57. # Target libraries - See CMake/ctkFunctionGetTargetLibraries.cmake
  58. # The following macro will read the target libraries from the file 'target_libraries.cmake'
  59. ctkFunctionGetTargetLibraries(KIT_target_libraries)
  60. ctkMacroBuildLib(
  61. NAME ${PROJECT_NAME}
  62. EXPORT_DIRECTIVE ${KIT_export_directive}
  63. INCLUDE_DIRECTORIES ${KIT_include_directories}
  64. SRCS ${KIT_SRCS}
  65. MOC_SRCS ${KIT_MOC_SRCS}
  66. UI_FORMS ${KIT_UI_FORMS}
  67. TARGET_LIBRARIES ${KIT_target_libraries}
  68. RESOURCES ${KIT_resources}
  69. LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  70. )
  71. target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES})
  72. if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
  73. ctkMacroBuildLibWrapper(
  74. TARGET ${PROJECT_NAME}
  75. SRCS ${KIT_SRCS}
  76. WRAPPER_LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  77. )
  78. endif()
  79. # Testing
  80. if(BUILD_TESTING)
  81. add_subdirectory(Testing)
  82. endif()