summaryrefslogtreecommitdiffstats
path: root/ui/ozone/BUILD.gn
blob: a2d3f4712b77731d490c1175d518f75553227c4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//ui/ozone/ozone.gni")

declare_args() {
  # The default platform for Ozone.
  ozone_platform = "test"
}

platform_list_file = "$target_gen_dir/ozone_platform_list.cc"

component("ozone") {
  sources = [
    platform_list_file,
    # common/chromeos files are excluded automatically when building with
    # chromeos=0, by exclusion rules in filename_rules.gypi due to the
    # "chromeos" folder name.
    "common/chromeos/native_display_delegate_ozone.cc",
    "common/chromeos/native_display_delegate_ozone.h",
    "ozone_platform.cc",
    "ozone_platform.h",
    "ozone_switches.cc",
    "ozone_switches.h",
  ]

  defines = [ "OZONE_IMPLEMENTATION" ]

  deps = [
    ":generate_ozone_platform_list",
    "//base",
    "//skia",
    "//ui/base",
    "//ui/events",
    "//ui/gfx",
    "//ui/gfx/geometry",
    "//ui/gfx/ozone",
  ]
}

# TODO(GYP) implement the ozone platforms. This should check the various
# ozone_platform_*flags, and add deps and add to the ozone_platforms list for
# the script below.
ozone_platforms = ""

action("generate_ozone_platform_list") {
  script = "generate_ozone_platform_list.py"
  outputs = [ platform_list_file ]

  args = [
    "--output_file=" + rebase_path(platform_list_file, root_build_dir),
    "--default=$ozone_platform",
    ozone_platforms,
  ]
}