CMakeLists.txt 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. include(${SerenityOS_SOURCE_DIR}/Meta/CMake/public_suffix.cmake)
  2. set(SOURCES
  3. Attribute.cpp
  4. CookieJar.cpp
  5. Database.cpp
  6. History.cpp
  7. InspectorClient.cpp
  8. RequestServerAdapter.cpp
  9. SearchEngine.cpp
  10. SocketPair.cpp
  11. SourceHighlighter.cpp
  12. URL.cpp
  13. UserAgent.cpp
  14. ViewImplementation.cpp
  15. WebContentClient.cpp
  16. WebSocketClientAdapter.cpp
  17. ${PUBLIC_SUFFIX_SOURCES}
  18. )
  19. set(GENERATED_SOURCES ${CURRENT_LIB_GENERATED})
  20. if (SERENITYOS)
  21. list(APPEND SOURCES OutOfProcessWebView.cpp)
  22. endif()
  23. embed_as_string_view(
  24. "NativeStyleSheetSource.cpp"
  25. "${CMAKE_CURRENT_SOURCE_DIR}/Native.css"
  26. "NativeStyleSheetSource.cpp"
  27. "native_stylesheet_source"
  28. NAMESPACE "WebView"
  29. )
  30. set(GENERATED_SOURCES
  31. ../../Services/RequestServer/RequestClientEndpoint.h
  32. ../../Services/RequestServer/RequestServerEndpoint.h
  33. ../../Services/WebContent/WebContentClientEndpoint.h
  34. ../../Services/WebContent/WebContentServerEndpoint.h
  35. ../../Services/WebContent/WebDriverClientEndpoint.h
  36. ../../Services/WebContent/WebDriverServerEndpoint.h
  37. ../../Services/WebSocket/WebSocketClientEndpoint.h
  38. ../../Services/WebSocket/WebSocketServerEndpoint.h
  39. NativeStyleSheetSource.cpp
  40. )
  41. serenity_lib(LibWebView webview)
  42. target_link_libraries(LibWebView PRIVATE LibCore LibFileSystem LibGfx LibIPC LibProtocol LibJS LibWeb LibSQL LibUnicode)
  43. target_compile_definitions(LibWebView PRIVATE ENABLE_PUBLIC_SUFFIX=$<BOOL:${ENABLE_PUBLIC_SUFFIX_DOWNLOAD}>)
  44. if (SERENITYOS)
  45. target_link_libraries(LibWebView PRIVATE LibFileSystemAccessClient LibGUI)
  46. endif()
  47. if (NOT SERENITYOS)
  48. foreach(header ${GENERATED_SOURCES})
  49. get_filename_component(extension ${header} EXT)
  50. if (NOT "${extension}" STREQUAL ".h")
  51. continue()
  52. endif()
  53. get_filename_component(subdirectory ${header} DIRECTORY)
  54. string(REGEX REPLACE "^\\.\\./\\.\\./" "" subdirectory "${subdirectory}")
  55. install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${header}" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${subdirectory}")
  56. endforeach()
  57. install(FILES "${SERENITY_PROJECT_ROOT}/Userland/Services/RequestServer/ConnectionCache.h" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/RequestServer")
  58. endif()