CMakeLists.txt 1.8 KB

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