CMakeLists.txt 1.3 KB

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