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")
6 import("//testing/test.gni")
8 # The list of platforms that will be built.
11 # Extra dependencies to pull into ui/ozone for built platforms.
12 ozone_platform_deps = []
14 # Extra dependencies to pull into ozone_unittests for built platforms.
15 ozone_platform_test_deps = []
17 if (ozone_platform_egltest) {
18 ozone_platforms += [ "egltest" ]
19 ozone_platform_deps += [ "platform/egltest" ]
22 if (ozone_platform_test) {
23 ozone_platforms += [ "test" ]
24 ozone_platform_deps += [ "platform/test" ]
27 if (ozone_platform_caca) {
28 ozone_platforms += [ "caca" ]
29 ozone_platform_deps += [ "platform/caca" ]
32 if (ozone_platform_gbm) {
33 ozone_platforms += [ "gbm" ]
34 ozone_platform_deps += [ "platform/drm:gbm" ]
35 ozone_platform_test_deps += [ "platform/drm:gbm_unittests" ]
38 if (ozone_platform_cast) {
39 ozone_platforms += [ "cast" ]
40 ozone_platform_deps += [ "platform/cast" ]
43 platform_list_cc_file = "$target_gen_dir/platform_list.cc"
44 platform_list_h_file = "$target_gen_dir/platform_list.h"
45 platform_list_txt_file = "$target_gen_dir/platform_list.txt"
46 constructor_list_cc_file = "$target_gen_dir/constructor_list.cc"
48 # GYP version: ui/ozone/ozone.gyp:ozone_base
49 component("ozone_base") {
51 "public/cursor_factory_ozone.cc",
52 "public/cursor_factory_ozone.h",
53 "public/gpu_platform_support.cc",
54 "public/gpu_platform_support.h",
55 "public/gpu_platform_support_host.cc",
56 "public/gpu_platform_support_host.h",
57 "public/overlay_candidates_ozone.cc",
58 "public/overlay_candidates_ozone.h",
59 "public/overlay_manager_ozone.h",
60 "public/surface_factory_ozone.cc",
61 "public/surface_factory_ozone.h",
62 "public/surface_ozone_canvas.h",
63 "public/surface_ozone_egl.cc",
64 "public/surface_ozone_egl.h",
65 "public/system_input_injector.h",
68 defines = [ "OZONE_BASE_IMPLEMENTATION" ]
79 "common/display_mode_proxy.cc",
80 "common/display_mode_proxy.h",
81 "common/display_snapshot_proxy.cc",
82 "common/display_snapshot_proxy.h",
83 "common/display_util.cc",
84 "common/display_util.h",
87 "common/gpu/ozone_gpu_message_generator.cc",
88 "common/gpu/ozone_gpu_message_generator.h",
89 "common/gpu/ozone_gpu_message_params.cc",
90 "common/gpu/ozone_gpu_message_params.h",
91 "common/gpu/ozone_gpu_messages.h",
92 "common/native_display_delegate_ozone.cc",
93 "common/native_display_delegate_ozone.h",
94 "common/stub_client_native_pixmap_factory.cc",
95 "common/stub_client_native_pixmap_factory.h",
96 "common/stub_overlay_manager.cc",
97 "common/stub_overlay_manager.h",
98 "platform_selection.cc",
99 "platform_selection.h",
100 "public/client_native_pixmap_factory.cc",
101 "public/client_native_pixmap_factory.h",
102 "public/input_controller.cc",
103 "public/input_controller.h",
104 "public/ozone_gpu_test_helper.cc",
105 "public/ozone_gpu_test_helper.h",
106 "public/ozone_platform.cc",
107 "public/ozone_platform.h",
108 "public/ozone_switches.cc",
109 "public/ozone_switches.h",
110 constructor_list_cc_file,
111 platform_list_cc_file,
112 platform_list_h_file,
115 defines = [ "OZONE_IMPLEMENTATION" ]
119 ":generate_constructor_list",
120 ":generate_ozone_platform_list",
125 "//ui/display/types",
128 "//ui/events/ozone:events_ozone",
133 # TODO(GYP) the GYP version has a way to add additional dependencies via
135 ] + ozone_platform_deps
138 # GYP version: ui/ozone/ozone.gyp:generate_ozone_platform_list
139 action("generate_ozone_platform_list") {
140 script = "generate_ozone_platform_list.py"
142 platform_list_cc_file,
143 platform_list_h_file,
144 platform_list_txt_file,
149 "--output_cc=" + rebase_path(platform_list_cc_file, root_build_dir),
150 "--output_h=" + rebase_path(platform_list_h_file, root_build_dir),
151 "--output_txt=" + rebase_path(platform_list_txt_file, root_build_dir),
152 "--default=$ozone_platform",
156 # GYP version: ui/ozone/ozone.gyp:generate_constructor_list
157 action("generate_constructor_list") {
158 script = "generate_constructor_list.py"
161 platform_list_txt_file,
164 constructor_list_cc_file,
168 "--platform_list=" + rebase_path(platform_list_txt_file, root_build_dir),
169 "--output_cc=" + rebase_path(constructor_list_cc_file, root_build_dir),
171 "--typename=OzonePlatform",
172 "--typename=ClientNativePixmapFactory",
173 "--include=\"ui/ozone/public/ozone_platform.h\"",
174 "--include=\"ui/ozone/public/client_native_pixmap_factory.h\"",
178 ":generate_ozone_platform_list",
182 test("ozone_unittests") {
184 "run_all_unittests.cc",
188 "//base/test:test_support",
191 ] + ozone_platform_test_deps