import("//Ladybird/link_qt.gni")
import("//Ladybird/moc_qt_objects.gni")

moc_qt_objects("generate_moc") {
  sources = [
    "//Ladybird/AudioCodecPluginQt.h",
    "//Ladybird/AudioThread.h",
    "//Ladybird/RequestManagerQt.h",
  ]
}

link_qt("WebContent_qt") {
  qt_components = [
    "Core",
    "Network",
    "Multimedia",
  ]
}

executable("WebContent") {
  configs += [
    "//Ladybird:ladybird_config",
    ":WebContent_qt",
  ]
  include_dirs = [
    "//Userland/Services",
    "//Ladybird",
  ]
  deps = [
    ":generate_moc",
    "//AK",
    "//Userland/Libraries/LibCore",
    "//Userland/Libraries/LibFileSystem",
    "//Userland/Libraries/LibGfx",
    "//Userland/Libraries/LibIPC",
    "//Userland/Libraries/LibJS",
    "//Userland/Libraries/LibMain",
    "//Userland/Libraries/LibProtocol",
    "//Userland/Libraries/LibWeb",
    "//Userland/Libraries/LibWebSocket",
    "//Userland/Libraries/LibWebView",
    "//Userland/Libraries/LibWebView:WebContentClientEndpoint",
    "//Userland/Libraries/LibWebView:WebContentServerEndpoint",
    "//Userland/Libraries/LibWebView:WebDriverClientEndpoint",
    "//Userland/Libraries/LibWebView:WebDriverServerEndpoint",
  ]
  sources = [
    "../AudioCodecPluginQt.cpp",
    "../AudioThread.cpp",
    "../EventLoopImplementationQt.cpp",
    "../FontPlugin.cpp",
    "../HelperProcess.cpp",
    "../ImageCodecPlugin.cpp",
    "../RequestManagerQt.cpp",
    "../Utilities.cpp",
    "../WebSocketClientManagerQt.cpp",
    "../WebSocketImplQt.cpp",
    "../WebSocketQt.cpp",
    "//Userland/Services/WebContent/ConnectionFromClient.cpp",
    "//Userland/Services/WebContent/ConsoleGlobalEnvironmentExtensions.cpp",
    "//Userland/Services/WebContent/PageHost.cpp",
    "//Userland/Services/WebContent/WebContentConsoleClient.cpp",
    "//Userland/Services/WebContent/WebDriverConnection.cpp",
    "main.cpp",
  ]
  sources += get_target_outputs(":generate_moc")
}
