CMakeLists.txt 1.5 KB

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