CMakeLists.txt 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. 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()