Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(460)

Side by Side Diff: ui/ozone/BUILD.gn

Issue 371363006: Fix ozone build in GN (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gl/BUILD.gn ('k') | ui/ozone/ozone.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//ui/ozone/ozone.gni") 5 import("//ui/ozone/ozone.gni")
6 6
7 declare_args() { 7 declare_args() {
8 # The default platform for Ozone. 8 # The default platform for Ozone.
9 ozone_platform = "test" 9 ozone_platform = "test"
10 } 10 }
11 11
12 platform_list_file = "$target_gen_dir/ozone_platform_list.cc" 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"
16
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 ]
35
36 defines = [ "OZONE_BASE_IMPLEMENTATION" ]
37
38 deps = [
39 "//base",
40 "//skia",
41 "//ui/gfx/geometry",
42 ]
43 }
13 44
14 component("ozone") { 45 component("ozone") {
15 sources = [ 46 sources = [
16 platform_list_file, 47 platform_list_cc_file,
48 platform_list_h_file,
49 constructor_list_cc_file,
50
17 # common/chromeos files are excluded automatically when building with 51 # common/chromeos files are excluded automatically when building with
18 # chromeos=0, by exclusion rules in filename_rules.gypi due to the 52 # chromeos=0, by exclusion rules in filename_rules.gypi due to the
19 # "chromeos" folder name. 53 # "chromeos" folder name.
20 "common/chromeos/native_display_delegate_ozone.cc", 54 "common/chromeos/native_display_delegate_ozone.cc",
21 "common/chromeos/native_display_delegate_ozone.h", 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",
22 "ozone_platform.cc", 60 "ozone_platform.cc",
23 "ozone_platform.h", 61 "ozone_platform.h",
24 "ozone_switches.cc", 62 "ozone_switches.cc",
25 "ozone_switches.h", 63 "ozone_switches.h",
64 "platform_selection.cc",
65 "platform_selection.h",
26 ] 66 ]
27 67
28 defines = [ "OZONE_IMPLEMENTATION" ] 68 defines = [ "OZONE_IMPLEMENTATION" ]
29 69
30 deps = [ 70 deps = [
71 ":generate_constructor_list",
31 ":generate_ozone_platform_list", 72 ":generate_ozone_platform_list",
73 ":ozone_base",
32 "//base", 74 "//base",
75 "//ipc",
33 "//skia", 76 "//skia",
34 "//ui/base",
35 "//ui/events", 77 "//ui/events",
78 "//ui/events/ozone",
36 "//ui/gfx", 79 "//ui/gfx",
37 "//ui/gfx/geometry", 80 "//ui/gfx/geometry",
38 "//ui/gfx/ozone", 81 "//ui/gfx/ipc",
82 # TODO(GYP) the GYP version has a way to add additional dependencies via
83 # build flags.
39 ] 84 ]
85
86 if (is_chromeos) {
87 deps += [
88 #'<(DEPTH)/ui/display/display.gyp:display_types', TODO(GYP)
89 ]
90 }
40 } 91 }
41 92
42 # TODO(GYP) implement the ozone platforms. This should check the various 93 # TODO(GYP) implement the ozone platforms. This should check the various
43 # ozone_platform_*flags, and add deps and add to the ozone_platforms list for 94 # ozone_platform_*flags, and add deps and add to the ozone_platforms list for
44 # the script below. 95 # the script below.
45 ozone_platforms = "" 96 ozone_platforms = ""
46 97
98 # GYP version: ui/ozone/ozone.gyp:generate_ozone_platform_list
47 action("generate_ozone_platform_list") { 99 action("generate_ozone_platform_list") {
48 script = "generate_ozone_platform_list.py" 100 script = "generate_ozone_platform_list.py"
49 outputs = [ platform_list_file ] 101 outputs = [
102 platform_list_cc_file,
103 platform_list_h_file,
104 platform_list_txt_file
105 ]
50 106
51 args = [ 107 args = [
52 "--output_file=" + rebase_path(platform_list_file, root_build_dir), 108 "--output_cc=" + rebase_path(platform_list_cc_file, root_build_dir),
109 "--output_h=" + rebase_path(platform_list_h_file, root_build_dir),
110 "--output_txt=" + rebase_path(platform_list_txt_file, root_build_dir),
53 "--default=$ozone_platform", 111 "--default=$ozone_platform",
54 ozone_platforms, 112 ozone_platforms,
55 ] 113 ]
56 } 114 }
115
116 # GYP version: ui/ozone/ozone.gyp:generate_constructor_list
117 action("generate_constructor_list") {
118 script = "generate_constructor_list.py"
119
120 source_prereqs = [
121 platform_list_txt_file,
122 ]
123 outputs = [
124 constructor_list_cc_file,
125 ]
126
127 args = [
128 "--platform_list=" + rebase_path(platform_list_txt_file, root_build_dir),
129 "--output_cc=" + rebase_path(constructor_list_cc_file, root_build_dir),
130 "--namespace=ui",
131 "--typename=OzonePlatform",
132 "--include=ui/ozone/ozone_platform.h",
133 ]
134
135 deps = [ ":generate_ozone_platform_list" ]
136 }
137
138 # TODO(GYP) ozone_unittests
139 # TODO(GYP) platform_caca, dri, other test stuff.
OLDNEW
« no previous file with comments | « ui/gl/BUILD.gn ('k') | ui/ozone/ozone.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698