CMakeLists.txt 1.6 KB

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