CMakeLists.txt 1.5 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. ctkCmdLineModuleObjectTreeWalker_p.h
  16. ctkCmdLineModuleObjectTreeWalker.cpp
  17. )
  18. # Headers that should run through moc
  19. set(KIT_MOC_SRCS
  20. ctkCmdLineModuleQtUiLoader.h
  21. )
  22. qt4_generate_mocs(
  23. ctkCmdLineModuleQtUiLoader.cpp
  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. 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_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()