CMakeLists.txt 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. project(CTKCommandLineModulesFrontendQtGui)
  2. #
  3. # 3rd party dependencies
  4. #
  5. #
  6. # See CTK/CMake/ctkMacroBuildLib.cmake for details
  7. #
  8. set(KIT_export_directive "CTK_CMDLINEMODULEQTGUI_EXPORT")
  9. # Additional directories to include
  10. # Source files
  11. set(KIT_SRCS
  12. ctkCmdLineModuleFrontendFactoryQtGui.cpp
  13. ctkCmdLineModuleFrontendQtGui.cpp
  14. ctkCmdLineModuleQtUiLoader.cpp
  15. ctkCmdLineModuleQtComboBox.cpp
  16. ctkCmdLineModuleObjectTreeWalker_p.h
  17. ctkCmdLineModuleObjectTreeWalker.cpp
  18. )
  19. # Headers that should run through moc
  20. set(KIT_MOC_SRCS
  21. ctkCmdLineModuleQtComboBox_p.h
  22. ctkCmdLineModuleQtUiLoader.h
  23. )
  24. # UI files
  25. set(KIT_UI_FORMS
  26. )
  27. # Resources
  28. set(KIT_resources
  29. Resources/ctkCmdLineModulesFrontendQtGui.qrc
  30. )
  31. set(QT_USE_QTUITOOLS 1)
  32. include(${QT_USE_FILE})
  33. # Target libraries - See CMake/ctkFunctionGetTargetLibraries.cmake
  34. # The following macro will read the target libraries from the file 'target_libraries.cmake'
  35. ctkFunctionGetTargetLibraries(KIT_target_libraries)
  36. ctkMacroBuildLib(
  37. NAME ${PROJECT_NAME}
  38. EXPORT_DIRECTIVE ${KIT_export_directive}
  39. INCLUDE_DIRECTORIES ${KIT_include_directories}
  40. SRCS ${KIT_SRCS}
  41. MOC_SRCS ${KIT_MOC_SRCS}
  42. UI_FORMS ${KIT_UI_FORMS}
  43. TARGET_LIBRARIES ${KIT_target_libraries}
  44. RESOURCES ${KIT_resources}
  45. LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  46. )
  47. target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES})
  48. if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
  49. ctkMacroBuildLibWrapper(
  50. TARGET ${PROJECT_NAME}
  51. SRCS ${KIT_SRCS}
  52. WRAPPER_LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  53. )
  54. endif()
  55. # Testing
  56. if(BUILD_TESTING)
  57. add_subdirectory(Testing)
  58. endif()