CMakeLists.txt 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. ${GENERATED_SOURCES}
  32. ../../Services/RequestServer/RequestClientEndpoint.h
  33. ../../Services/RequestServer/RequestServerEndpoint.h
  34. ../../Services/WebContent/WebContentClientEndpoint.h
  35. ../../Services/WebContent/WebContentServerEndpoint.h
  36. ../../Services/WebContent/WebDriverClientEndpoint.h
  37. ../../Services/WebContent/WebDriverServerEndpoint.h
  38. NativeStyleSheetSource.cpp
  39. )
  40. serenity_lib(LibWebView webview)
  41. target_link_libraries(LibWebView PRIVATE LibCore LibFileSystem LibGfx LibIPC LibProtocol LibJS LibWeb LibSQL LibUnicode LibURL)
  42. target_compile_definitions(LibWebView PRIVATE ENABLE_PUBLIC_SUFFIX=$<BOOL:${ENABLE_PUBLIC_SUFFIX_DOWNLOAD}>)
  43. if (SERENITYOS)
  44. target_link_libraries(LibWebView PRIVATE LibFileSystemAccessClient LibGUI)
  45. endif()
  46. if (NOT SERENITYOS)
  47. foreach(header ${GENERATED_SOURCES})
  48. get_filename_component(extension ${header} EXT)
  49. if (NOT "${extension}" STREQUAL ".h")
  50. continue()
  51. endif()
  52. get_filename_component(subdirectory ${header} DIRECTORY)
  53. string(REGEX REPLACE "^\\.\\./\\.\\./" "" subdirectory "${subdirectory}")
  54. install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${header}" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${subdirectory}")
  55. endforeach()
  56. install(FILES "${SERENITY_PROJECT_ROOT}/Userland/Services/RequestServer/ConnectionCache.h" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/RequestServer")
  57. endif()