CMakeLists.txt 2.0 KB

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