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 platform_list_cc_file = "$target_gen_dir/platform_list.cc"
39 platform_list_h_file = "$target_gen_dir/platform_list.h"
40 platform_list_txt_file = "$target_gen_dir/platform_list.txt"
41 constructor_list_cc_file = "$target_gen_dir/constructor_list.cc"
43 # GYP version: ui/ozone/ozone.gyp:ozone_base
44 component("ozone_base") {
46 "public/cursor_factory_ozone.cc",
47 "public/cursor_factory_ozone.h",
48 "public/gpu_platform_support.cc",
49 "public/gpu_platform_support.h",
50 "public/gpu_platform_support_host.cc",
51 "public/gpu_platform_support_host.h",
52 "public/overlay_candidates_ozone.cc",
53 "public/overlay_candidates_ozone.h",
54 "public/overlay_manager_ozone.h",
55 "public/surface_factory_ozone.cc",
56 "public/surface_factory_ozone.h",
57 "public/surface_ozone_canvas.h",
58 "public/surface_ozone_egl.cc",
59 "public/surface_ozone_egl.h",
60 "public/system_input_injector.h",
63 defines = [ "OZONE_BASE_IMPLEMENTATION" ]
74 "common/display_mode_proxy.cc",
75 "common/display_mode_proxy.h",
76 "common/display_snapshot_proxy.cc",
77 "common/display_snapshot_proxy.h",
78 "common/display_util.cc",
79 "common/display_util.h",
82 "common/gpu/ozone_gpu_message_generator.cc",
83 "common/gpu/ozone_gpu_message_generator.h",
84 "common/gpu/ozone_gpu_message_params.cc",
85 "common/gpu/ozone_gpu_message_params.h",
86 "common/gpu/ozone_gpu_messages.h",
87 "common/native_display_delegate_ozone.cc",
88 "common/native_display_delegate_ozone.h",
89 "common/stub_client_native_pixmap_factory.cc",
90 "common/stub_client_native_pixmap_factory.h",
91 "common/stub_overlay_manager.cc",
92 "common/stub_overlay_manager.h",
93 "platform_selection.cc",
94 "platform_selection.h",
95 "public/client_native_pixmap_factory.cc",
96 "public/client_native_pixmap_factory.h",
97 "public/input_controller.cc",
98 "public/input_controller.h",
99 "public/ozone_gpu_test_helper.cc",
100 "public/ozone_gpu_test_helper.h",
101 "public/ozone_platform.cc",
102 "public/ozone_platform.h",
103 "public/ozone_switches.cc",
104 "public/ozone_switches.h",
105 constructor_list_cc_file,
106 platform_list_cc_file,
107 platform_list_h_file,
110 defines = [ "OZONE_IMPLEMENTATION" ]
114 ":generate_constructor_list",
115 ":generate_ozone_platform_list",
120 "//ui/display/types",
123 "//ui/events/ozone:events_ozone",
128 # TODO(GYP) the GYP version has a way to add additional dependencies via
130 ] + ozone_platform_deps
133 # GYP version: ui/ozone/ozone.gyp:generate_ozone_platform_list
134 action("generate_ozone_platform_list") {
135 script = "generate_ozone_platform_list.py"
137 platform_list_cc_file,
138 platform_list_h_file,
139 platform_list_txt_file,
144 "--output_cc=" + rebase_path(platform_list_cc_file, root_build_dir),
145 "--output_h=" + rebase_path(platform_list_h_file, root_build_dir),
146 "--output_txt=" + rebase_path(platform_list_txt_file, root_build_dir),
147 "--default=$ozone_platform",
151 # GYP version: ui/ozone/ozone.gyp:generate_constructor_list
152 action("generate_constructor_list") {
153 script = "generate_constructor_list.py"
156 platform_list_txt_file,
159 constructor_list_cc_file,
163 "--platform_list=" + rebase_path(platform_list_txt_file, root_build_dir),
164 "--output_cc=" + rebase_path(constructor_list_cc_file, root_build_dir),
166 "--typename=OzonePlatform",
167 "--typename=ClientNativePixmapFactory",
168 "--include=\"ui/ozone/public/ozone_platform.h\"",
169 "--include=\"ui/ozone/public/client_native_pixmap_factory.h\"",
173 ":generate_ozone_platform_list",
177 test("ozone_unittests") {
179 "run_all_unittests.cc",
183 "//base/test:test_support",
186 ] + ozone_platform_test_deps