chromium/components/viz/demo/BUILD.gn

# Copyright 2019 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/ui.gni")

source_set("common") {
  sources = [
    "common/switches.cc",
    "common/switches.h",
  ]
}

static_library("client") {
  output_name = "demo_client"

  sources = [
    "client/demo_client.cc",
    "client/demo_client.h",
  ]

  deps = [
    "//components/viz/common",
    "//mojo/public/cpp/bindings",
    "//services/viz/public/mojom",
  ]
}

static_library("host") {
  output_name = "demo_host"
  sources = [
    "host/demo_host.cc",
    "host/demo_host.h",
  ]

  deps = [
    ":client",
    ":common",
    "//components/viz/common",
    "//components/viz/host",
    "//mojo/public/cpp/system",
    "//services/viz/privileged/mojom",
  ]
}

static_library("service") {
  output_name = "demo_service"
  sources = [
    "service/demo_service.cc",
    "service/demo_service.h",
  ]

  deps = [
    ":common",
    "//components/viz/common",
    "//components/viz/service",
    "//components/viz/service/main",
    "//gpu/ipc/host:host",
    "//mojo/public/cpp/system",
    "//services/viz/privileged/mojom",
    "//services/viz/privileged/mojom/gl",
  ]
}

executable("viz_demo") {
  sources = [ "demo_main.cc" ]

  deps = [
    ":common",
    "//base",
    "//base:base_static",
    "//base:i18n",
    "//build/win:default_exe_manifest",
    "//components/viz/demo:host",
    "//components/viz/demo:service",
    "//components/viz/service",
    "//components/viz/service/main",
    "//mojo/core/embedder",
    "//skia",
    "//ui/events",
    "//ui/events/platform",
    "//ui/platform_window",
  ]

  if (is_win) {
    deps += [ "//ui/platform_window/win" ]
  }

  if (use_ozone) {
    deps += [ "//ui/ozone:ozone_gpu_test_support" ]
  }
}