[SyncFS] Build indexes from FileTracker entries on disk.
[chromium-blink-merge.git] / ui / ozone / BUILD.gn
blobb64ce6c3047a867a22bd984cb1a49574ec4ffe1b
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//ui/ozone/ozone.gni")
7 declare_args() {
8   # The default platform for Ozone.
9   ozone_platform = "test"
12 platform_list_cc_file = "$target_gen_dir/platform_list.cc"
13 platform_list_h_file = "$target_gen_dir/platform_list.h"
14 platform_list_txt_file = "$target_gen_dir/platform_list.txt"
15 constructor_list_cc_file = "$target_gen_dir/constructor_list.cc"
17 # GYP version: ui/ozone/ozone.gyp:ozone_base
18 component("ozone_base") {
19   sources = [
20     "public/cursor_factory_ozone.cc",
21     "public/cursor_factory_ozone.h",
22     "public/event_factory_ozone.cc",
23     "public/event_factory_ozone.h",
24     "public/gpu_platform_support.cc",
25     "public/gpu_platform_support.h",
26     "public/gpu_platform_support_host.cc",
27     "public/gpu_platform_support_host.h",
28     "public/overlay_candidates_ozone.cc",
29     "public/overlay_candidates_ozone.h",
30     "public/surface_factory_ozone.cc",
31     "public/surface_factory_ozone.h",
32     "public/surface_ozone_canvas.h",
33     "public/surface_ozone_egl.h",
34   ]
36   defines = [ "OZONE_BASE_IMPLEMENTATION" ]
38   deps = [
39     "//base",
40     "//skia",
41     "//ui/gfx/geometry",
42   ]
45 component("ozone") {
46   sources = [
47     platform_list_cc_file,
48     platform_list_h_file,
49     constructor_list_cc_file,
51     # common/chromeos files are excluded automatically when building with
52     # chromeos=0, by exclusion rules in filename_rules.gypi due to the
53     # "chromeos" folder name.
54     "common/chromeos/native_display_delegate_ozone.cc",
55     "common/chromeos/native_display_delegate_ozone.h",
56     "common/chromeos/touchscreen_device_manager_ozone.cc",
57     "common/chromeos/touchscreen_device_manager_ozone.h",
58     "common/gpu/ozone_gpu_message_generator.cc",
59     "common/gpu/ozone_gpu_message_generator.h",
60     "ozone_platform.cc",
61     "ozone_platform.h",
62     "ozone_switches.cc",
63     "ozone_switches.h",
64     "platform_selection.cc",
65     "platform_selection.h",
66   ]
68   defines = [ "OZONE_IMPLEMENTATION" ]
70   deps = [
71     ":generate_constructor_list",
72     ":generate_ozone_platform_list",
73     ":ozone_base",
74     "//base",
75     "//ipc",
76     "//skia",
77     "//ui/events",
78     "//ui/events/ozone:events_ozone",
79     "//ui/gfx",
80     "//ui/gfx/geometry",
81     "//ui/gfx/ipc",
82     # TODO(GYP) the GYP version has a way to add additional dependencies via
83     # build flags.
84   ]
86   if (is_chromeos) {
87     deps += [ "//ui/dusplay/types" ]
88   }
91 # TODO(GYP) implement the ozone platforms. This should check the various
92 # ozone_platform_*flags, and add deps and add to the ozone_platforms list for
93 # the script below.
94 ozone_platforms = ""
96 # GYP version: ui/ozone/ozone.gyp:generate_ozone_platform_list
97 action("generate_ozone_platform_list") {
98   script = "generate_ozone_platform_list.py"
99   outputs = [
100     platform_list_cc_file,
101     platform_list_h_file,
102     platform_list_txt_file
103   ]
105   args = [
106     "--output_cc=" + rebase_path(platform_list_cc_file, root_build_dir),
107     "--output_h=" + rebase_path(platform_list_h_file, root_build_dir),
108     "--output_txt=" + rebase_path(platform_list_txt_file, root_build_dir),
109     "--default=$ozone_platform",
110     ozone_platforms,
111   ]
114 # GYP version: ui/ozone/ozone.gyp:generate_constructor_list
115 action("generate_constructor_list") {
116   script = "generate_constructor_list.py"
118   source_prereqs = [
119     platform_list_txt_file,
120   ]
121   outputs = [
122     constructor_list_cc_file,
123   ]
125   args = [
126     "--platform_list=" + rebase_path(platform_list_txt_file, root_build_dir),
127     "--output_cc=" + rebase_path(constructor_list_cc_file, root_build_dir),
128     "--namespace=ui",
129     "--typename=OzonePlatform",
130     "--include=ui/ozone/ozone_platform.h",
131   ]
133   deps = [ ":generate_ozone_platform_list" ]
136 # TODO(GYP) ozone_unittests
137 # TODO(GYP) platform_caca, dri, other test stuff.