CMakeLists.txt 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. ctkModuleParameter.h
  16. ctkModuleParameter.cpp
  17. ctkModuleParameterGroup.h
  18. ctkModuleParameterGroup.cpp
  19. ctkModuleParameterParsers_p.h
  20. )
  21. # Headers that should run through moc
  22. set(KIT_MOC_SRCS
  23. #ctkModuleDescriptionConverterInterface.h
  24. #ctkModuleDescriptionConverter.h
  25. #ctkModuleDescriptionExecutionInterface.h
  26. #ctkModuleDescriptionExecution.h
  27. )
  28. # UI files
  29. set(KIT_UI_FORMS
  30. )
  31. # Resources
  32. set(KIT_resources
  33. Resources/ctkModuleDescription.qrc
  34. )
  35. set(QT_USE_QTXMLPATTERNS 1)
  36. include(${QT_USE_FILE})
  37. # Target libraries - See CMake/ctkFunctionGetTargetLibraries.cmake
  38. # The following macro will read the target libraries from the file 'target_libraries.cmake'
  39. ctkFunctionGetTargetLibraries(KIT_target_libraries)
  40. ctkMacroBuildLib(
  41. NAME ${PROJECT_NAME}
  42. EXPORT_DIRECTIVE ${KIT_export_directive}
  43. INCLUDE_DIRECTORIES ${KIT_include_directories}
  44. SRCS ${KIT_SRCS}
  45. MOC_SRCS ${KIT_MOC_SRCS}
  46. UI_FORMS ${KIT_UI_FORMS}
  47. TARGET_LIBRARIES ${KIT_target_libraries}
  48. RESOURCES ${KIT_resources}
  49. LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  50. )
  51. target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES})
  52. if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
  53. ctkMacroBuildLibWrapper(
  54. TARGET ${PROJECT_NAME}
  55. SRCS ${KIT_SRCS}
  56. WRAPPER_LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  57. )
  58. endif()
  59. # Testing
  60. if(BUILD_TESTING)
  61. add_subdirectory(Testing)
  62. endif()