OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 import("//ui/ozone/ozone.gni") |
| 6 import("//testing/test.gni") |
| 7 |
| 8 # The list of platforms that will be built. |
| 9 ozone_platforms = [] |
| 10 |
| 11 # Extra dependencies to pull into ui/ozone for built platforms. |
| 12 ozone_platform_deps = [] |
| 13 |
| 14 # Extra dependencies to pull into ozone_unittests for built platforms. |
| 15 ozone_platform_test_deps = [] |
| 16 |
| 17 if (ozone_platform_egltest) { |
| 18 ozone_platforms += [ "egltest" ] |
| 19 ozone_platform_deps += [ "platform/egltest" ] |
| 20 } |
| 21 |
| 22 if (ozone_platform_test) { |
| 23 ozone_platforms += [ "test" ] |
| 24 ozone_platform_deps += [ "platform/test" ] |
| 25 } |
| 26 |
| 27 if (ozone_platform_caca) { |
| 28 ozone_platforms += [ "caca" ] |
| 29 ozone_platform_deps += [ "platform/caca" ] |
| 30 } |
| 31 |
| 32 if (ozone_platform_dri || ozone_platform_drm) { |
| 33 ozone_platforms += [ |
| 34 "dri", |
| 35 "drm", |
| 36 ] |
| 37 ozone_platform_deps += [ |
| 38 "platform/drm", |
| 39 "platform/drm:drm_common", |
| 40 ] |
| 41 ozone_platform_test_deps += [ "platform/drm:drm_unittests" ] |
| 42 } |
| 43 |
| 44 if (ozone_platform_gbm) { |
| 45 ozone_platforms += [ "gbm" ] |
| 46 ozone_platform_deps += [ |
| 47 "platform/drm:drm_common", |
| 48 "platform/drm:gbm", |
| 49 ] |
| 50 } |
| 51 |
| 52 platform_list_cc_file = "$target_gen_dir/platform_list.cc" |
| 53 platform_list_h_file = "$target_gen_dir/platform_list.h" |
| 54 platform_list_txt_file = "$target_gen_dir/platform_list.txt" |
| 55 constructor_list_cc_file = "$target_gen_dir/constructor_list.cc" |
| 56 |
| 57 # GYP version: ui/ozone/ozone.gyp:ozone_base |
| 58 component("ozone_base") { |
| 59 sources = [ |
| 60 "public/cursor_factory_ozone.cc", |
| 61 "public/cursor_factory_ozone.h", |
| 62 "public/gpu_platform_support.cc", |
| 63 "public/gpu_platform_support.h", |
| 64 "public/gpu_platform_support_host.cc", |
| 65 "public/gpu_platform_support_host.h", |
| 66 "public/input_controller.cc", |
| 67 "public/input_controller.h", |
| 68 "public/overlay_candidates_ozone.cc", |
| 69 "public/overlay_candidates_ozone.h", |
| 70 "public/overlay_manager_ozone.h", |
| 71 "public/surface_factory_ozone.cc", |
| 72 "public/surface_factory_ozone.h", |
| 73 "public/surface_ozone_canvas.h", |
| 74 "public/surface_ozone_egl.cc", |
| 75 "public/surface_ozone_egl.h", |
| 76 "public/system_input_injector.h", |
| 77 ] |
| 78 |
| 79 defines = [ "OZONE_BASE_IMPLEMENTATION" ] |
| 80 |
| 81 deps = [ |
| 82 "//base", |
| 83 "//skia", |
| 84 "//ui/events:events_base", |
| 85 "//ui/events:dom_keycode_converter", |
| 86 "//ui/gfx/geometry", |
| 87 "//ui/gfx", |
| 88 ] |
| 89 } |
| 90 |
| 91 component("ozone") { |
| 92 sources = [ |
| 93 "common/display_mode_proxy.cc", |
| 94 "common/display_mode_proxy.h", |
| 95 "common/display_snapshot_proxy.cc", |
| 96 "common/display_snapshot_proxy.h", |
| 97 "common/display_util.cc", |
| 98 "common/display_util.h", |
| 99 "common/egl_util.cc", |
| 100 "common/egl_util.h", |
| 101 "common/gpu/ozone_gpu_message_params.cc", |
| 102 "common/gpu/ozone_gpu_message_params.h", |
| 103 "common/native_display_delegate_ozone.cc", |
| 104 "common/native_display_delegate_ozone.h", |
| 105 "common/stub_overlay_manager.cc", |
| 106 "common/stub_overlay_manager.h", |
| 107 "platform_selection.cc", |
| 108 "platform_selection.h", |
| 109 "public/ozone_platform.cc", |
| 110 "public/ozone_platform.h", |
| 111 "public/ozone_switches.cc", |
| 112 "public/ozone_switches.h", |
| 113 constructor_list_cc_file, |
| 114 platform_list_cc_file, |
| 115 platform_list_h_file, |
| 116 ] |
| 117 |
| 118 defines = [ "OZONE_IMPLEMENTATION" ] |
| 119 |
| 120 deps = |
| 121 [ |
| 122 ":generate_constructor_list", |
| 123 ":generate_ozone_platform_list", |
| 124 ":ozone_base", |
| 125 "//base", |
| 126 "//skia", |
| 127 "//ui/display/types", |
| 128 "//ui/display/util", |
| 129 "//ui/events", |
| 130 "//ui/events/devices", |
| 131 "//ui/events/ozone:events_ozone", |
| 132 "//ui/gfx", |
| 133 "//ui/gfx/geometry", |
| 134 |
| 135 # TODO(GYP) the GYP version has a way to add additional dependencies via |
| 136 # build flags. |
| 137 ] + ozone_platform_deps |
| 138 |
| 139 allow_circular_includes_from = [ |
| 140 "platform/egltest", |
| 141 |
| 142 #"platform/drm", |
| 143 "platform/drm:drm_common", |
| 144 "platform/drm:gbm", |
| 145 "//ui/events/ozone:events_ozone", |
| 146 ] |
| 147 } |
| 148 |
| 149 # GYP version: ui/ozone/ozone.gyp:generate_ozone_platform_list |
| 150 action("generate_ozone_platform_list") { |
| 151 script = "generate_ozone_platform_list.py" |
| 152 outputs = [ |
| 153 platform_list_cc_file, |
| 154 platform_list_h_file, |
| 155 platform_list_txt_file, |
| 156 ] |
| 157 |
| 158 args = |
| 159 [ |
| 160 "--output_cc=" + rebase_path(platform_list_cc_file, root_build_dir), |
| 161 "--output_h=" + rebase_path(platform_list_h_file, root_build_dir), |
| 162 "--output_txt=" + rebase_path(platform_list_txt_file, root_build_dir), |
| 163 "--default=$ozone_platform", |
| 164 ] + ozone_platforms |
| 165 } |
| 166 |
| 167 # GYP version: ui/ozone/ozone.gyp:generate_constructor_list |
| 168 action("generate_constructor_list") { |
| 169 script = "generate_constructor_list.py" |
| 170 |
| 171 inputs = [ |
| 172 platform_list_txt_file, |
| 173 ] |
| 174 outputs = [ |
| 175 constructor_list_cc_file, |
| 176 ] |
| 177 |
| 178 args = [ |
| 179 "--platform_list=" + rebase_path(platform_list_txt_file, root_build_dir), |
| 180 "--output_cc=" + rebase_path(constructor_list_cc_file, root_build_dir), |
| 181 "--namespace=ui", |
| 182 "--typename=OzonePlatform", |
| 183 "--include=\"ui/ozone/public/ozone_platform.h\"", |
| 184 ] |
| 185 |
| 186 deps = [ |
| 187 ":generate_ozone_platform_list", |
| 188 ] |
| 189 } |
| 190 |
| 191 test("ozone_unittests") { |
| 192 sources = [ |
| 193 "run_all_unittests.cc", |
| 194 ] |
| 195 |
| 196 deps = [ |
| 197 "//base/test:test_support", |
| 198 "//testing/gtest", |
| 199 "//ui/gfx/geometry", |
| 200 ] + ozone_platform_test_deps |
| 201 } |
OLD | NEW |