CMakeLists.txt 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. project(CTKCommandLineModules)
  2. #
  3. # 3rd party dependencies
  4. #
  5. #
  6. # See CTK/CMake/ctkMacroBuildLib.cmake for details
  7. #
  8. set(KIT_export_directive "CTK_CMDLINEMODULE_EXPORT")
  9. # Additional directories to include
  10. # Source files
  11. set(KIT_SRCS
  12. ctkCmdLineModuleDescription.cpp
  13. ctkCmdLineModuleManager.cpp
  14. ctkCmdLineModuleObjectHierarchyReader.cpp
  15. ctkCmdLineModuleParameter.cpp
  16. ctkCmdLineModuleParameterGroup.cpp
  17. ctkCmdLineModuleParameterParsers_p.h
  18. ctkCmdLineModuleProcessException.cpp
  19. ctkCmdLineModuleProcessFuture.cpp
  20. ctkCmdLineModuleProcessRunner.cpp
  21. ctkCmdLineModuleProcessRunner_p.h
  22. ctkCmdLineModuleReference.cpp
  23. ctkCmdLineModuleReferencePrivate.cpp
  24. ctkCmdLineModuleXmlParser.cpp
  25. ctkCmdLineModuleXmlValidator.cpp
  26. )
  27. # Headers that should run through moc
  28. set(KIT_MOC_SRCS
  29. ctkCmdLineModuleProcessRunner_p.h
  30. ctkCmdLineModuleReferencePrivate.h
  31. )
  32. # UI files
  33. set(KIT_UI_FORMS
  34. )
  35. # Resources
  36. set(KIT_resources
  37. Resources/ctkCmdLineModules.qrc
  38. )
  39. set(QT_USE_QTXMLPATTERNS 1)
  40. include(${QT_USE_FILE})
  41. # Target libraries - See CMake/ctkFunctionGetTargetLibraries.cmake
  42. # The following macro will read the target libraries from the file 'target_libraries.cmake'
  43. ctkFunctionGetTargetLibraries(KIT_target_libraries)
  44. ctkMacroBuildLib(
  45. NAME ${PROJECT_NAME}
  46. EXPORT_DIRECTIVE ${KIT_export_directive}
  47. INCLUDE_DIRECTORIES ${KIT_include_directories}
  48. SRCS ${KIT_SRCS}
  49. MOC_SRCS ${KIT_MOC_SRCS}
  50. UI_FORMS ${KIT_UI_FORMS}
  51. TARGET_LIBRARIES ${KIT_target_libraries}
  52. RESOURCES ${KIT_resources}
  53. LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  54. )
  55. target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES})
  56. if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
  57. ctkMacroBuildLibWrapper(
  58. TARGET ${PROJECT_NAME}
  59. SRCS ${KIT_SRCS}
  60. WRAPPER_LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  61. )
  62. endif()
  63. # Testing
  64. if(BUILD_TESTING)
  65. add_subdirectory(Testing)
  66. endif()