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