CMakeLists.txt 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. project(CTKCommandLineModulesFrontendQtWebKit)
  2. #
  3. # 3rd party dependencies
  4. #
  5. #
  6. # See CTK/CMake/ctkMacroBuildLib.cmake for details
  7. #
  8. set(KIT_export_directive "CTK_CMDLINEMODULEQTWEBKIT_EXPORT")
  9. # Additional directories to include
  10. # Source files
  11. set(KIT_SRCS
  12. ctkCmdLineModuleFrontendFactoryQtWebKit.cpp
  13. ctkCmdLineModuleFrontendQtWebKit.cpp
  14. ctkCmdLineModuleFrontendQtWebKit_p.h
  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. Resources/ctkCmdLineModulesFrontendQtWebKit.qrc
  25. )
  26. # Target libraries - See CMake/ctkFunctionGetTargetLibraries.cmake
  27. # The following macro will read the target libraries from the file 'target_libraries.cmake'
  28. ctkFunctionGetTargetLibraries(KIT_target_libraries)
  29. if(CTK_QT_VERSION VERSION_GREATER "4")
  30. list(APPEND KIT_target_libraries Qt5::WebKitWidgets)
  31. else()
  32. set(QT_USE_QTWEBKIT 1)
  33. include(${QT_USE_FILE})
  34. endif()
  35. ctkMacroBuildLib(
  36. NAME ${PROJECT_NAME}
  37. EXPORT_DIRECTIVE ${KIT_export_directive}
  38. SRCS ${KIT_SRCS}
  39. MOC_SRCS ${KIT_MOC_SRCS}
  40. UI_FORMS ${KIT_UI_FORMS}
  41. TARGET_LIBRARIES ${KIT_target_libraries}
  42. RESOURCES ${KIT_resources}
  43. LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  44. )
  45. target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES})
  46. if(CTK_WRAP_PYTHONQT_LIGHT)
  47. ctkMacroBuildLibWrapper(
  48. TARGET ${PROJECT_NAME}
  49. SRCS ${KIT_SRCS}
  50. WRAPPER_LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  51. )
  52. endif()
  53. # Testing
  54. if(BUILD_TESTING)
  55. # add_subdirectory(Testing)
  56. endif()