OLD | NEW |
---|---|
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 # TODO(brettw) this file is a work in progress, it is not currently hooked up | 5 # TODO(brettw) this file is a work in progress, it is not currently hooked up |
6 # to the build, but currently represents the state of content/common's deps. | 6 # to the build, but currently represents the state of content/common's deps. |
7 | 7 |
8 import("//build/config/features.gni") | |
9 import("//build/config/ui.gni") | |
8 import("//content/common/common.gni") | 10 import("//content/common/common.gni") |
9 | 11 |
10 source_set("common") { | 12 source_set("common") { |
11 # Only targets in the content tree can depend directly on this target. | 13 # Only targets in the content tree can depend directly on this target. |
12 visibility = [ "//content/*" ] | 14 visibility = [ "//content/*" ] |
13 | 15 |
14 sources = rebase_path(content_common_gypi_values.private_common_sources, | 16 sources = rebase_path(content_common_gypi_values.private_common_sources, |
15 ".", "//content") | 17 ".", "//content") |
16 | 18 |
17 forward_dependent_configs_from = [ | 19 forward_dependent_configs_from = [ |
18 # TODO(GYP) convert these dependencies. | 20 # TODO(GYP) convert these dependencies. |
19 #'../third_party/WebKit/public/blink_headers.gyp:blink_headers', | 21 #'../third_party/WebKit/public/blink_headers.gyp:blink_headers', |
20 ] | 22 ] |
21 | 23 |
24 configs += [ ":libjingle_stub_config" ] | |
25 | |
22 deps = [ | 26 deps = [ |
23 "//base", | 27 "//base", |
28 "//build/util:webkit_version", | |
24 "//components/tracing", | 29 "//components/tracing", |
25 "//gpu/command_buffer/common", | 30 "//gpu/command_buffer/common", |
26 "//net", | 31 "//net", |
27 "//skia", | 32 "//skia", |
28 "//third_party/icu", | 33 "//third_party/icu", |
29 "//ui/accessibility", | 34 "//ui/accessibility", |
30 "//ui/base:ui_base", | 35 "//ui/base:ui_base", |
31 "//ui/gfx", | 36 "//ui/gfx", |
32 "//ui/gfx/geometry", | 37 "//ui/gfx/geometry", |
33 "//url", | 38 "//url", |
34 # TODO(GYP) convert these dependencies. | 39 # TODO(GYP) convert these dependencies. |
35 #'../third_party/WebKit/public/blink_headers.gyp:blink_headers', | 40 #'../third_party/WebKit/public/blink_headers.gyp:blink_headers', |
36 #'../third_party/libjingle/libjingle.gyp:libjingle', | 41 #'../third_party/libjingle/libjingle.gyp:libjingle', |
37 #'../ui/shell_dialogs/shell_dialogs.gyp:shell_dialogs', | 42 #'../ui/shell_dialogs/shell_dialogs.gyp:shell_dialogs', |
38 ] | 43 ] |
44 | |
45 if (!is_ios) { | |
46 deps += [ | |
47 "//ipc", | |
48 "//gpu/command_buffer/client:gles2_c_lib", | |
49 "//gpu/command_buffer/client:gles2_implementation", | |
50 "//ui/gl", | |
51 #'../cc/cc.gyp:cc', | |
52 #'../gpu/gpu.gyp:command_buffer_service', | |
53 # TODO: the dependency on gl_in_process_context should be decoupled from | |
54 # content and moved to android_webview. See crbug.com/365797. | |
55 #'../gpu/gpu.gyp:gl_in_process_context', | |
56 #'../gpu/gpu.gyp:gpu_ipc', | |
57 #'../gpu/skia_bindings/skia_bindings.gyp:gpu_skia_bindings', | |
58 #'../media/media.gyp:media', | |
59 #'../media/media.gyp:shared_memory_support', | |
60 #'../mojo/mojo.gyp:mojo_environment_chromium', | |
61 #'../mojo/mojo.gyp:mojo_system_impl', | |
62 #'../third_party/WebKit/public/blink.gyp:blink', | |
63 #'../webkit/common/gpu/webkit_gpu.gyp:webkit_gpu', | |
64 #'../webkit/common/webkit_common.gyp:webkit_common', | |
65 #'../webkit/storage_browser.gyp:webkit_storage_browser', | |
66 #'../webkit/storage_common.gyp:webkit_storage_common', | |
67 ] | |
68 } | |
69 | |
70 include_dirs = [] | |
71 defines = [ "CONTENT_IMPLEMENTATION" ] | |
72 libs = [] | |
73 ldflags = [] | |
74 | |
75 if (is_android && use_seccomp_bpf) { | |
76 set_sources_assignment_filter([]) | |
77 sources += [ | |
78 "sandbox_linux/sandbox_bpf_base_policy_linux.cc", | |
79 "sandbox_linux/sandbox_bpf_base_policy_linux.h", | |
80 ] | |
81 set_sources_assignment_filter(sources_assignment_filter) | |
82 } | |
83 | |
84 if (is_mac) { | |
85 sources += [ | |
86 "gpu/client/gpu_memory_buffer_impl_io_surface.cc", | |
87 "gpu/client/gpu_memory_buffer_impl_io_surface.h", | |
88 ] | |
89 sources -= [ | |
90 "plugin_list_posix.cc", | |
91 ] | |
92 | |
93 if (use_aura) { | |
94 sources -= [ "cursors/webcursor_mac.mm" ] | |
scottmg
2014/05/21 00:30:33
this seems like it's in the wrong place because ma
brettw
2014/05/21 01:35:18
The GYP code for this that I copied was just buste
| |
95 } | |
96 | |
97 # TODO(GYP) enable when converted to GN. | |
98 #deps += [ | |
99 # "//webkit:webkit_resources", | |
100 #] | |
101 libs += [ "QuartzCore.framework" ] | |
102 } | |
103 | |
104 if (is_android) { | |
105 sources += [ | |
106 "gpu/client/gpu_memory_buffer_impl_surface_texture.cc", | |
107 "gpu/client/gpu_memory_buffer_impl_surface_texture.h", | |
108 ] | |
109 | |
110 # TODO(GYP) enable when these targets are converted. | |
111 #deps += [ | |
112 # "//content:content_jni_headers", | |
113 # "//content:common_aidl", | |
114 #] | |
115 | |
116 libs += [ "android" ] | |
117 } | |
118 | |
119 if (is_ios) { | |
120 sources -= [ "user_agent.cc" ] | |
121 assert(false, "Need to add lots of conditions here") | |
122 } | |
123 | |
124 if (!use_ozone) { | |
125 sources -= [ | |
126 "cursors/webcursor_ozone.cc", | |
127 "font_list_ozone.cc", | |
128 ] | |
129 } | |
130 | |
131 if (!use_aura || !use_x11) { | |
132 sources -= [ "cursors/webcursor_aurax11.cc" ] | |
133 } | |
134 | |
135 if (use_pango) { | |
136 configs += [ "//build/config/linux:pangocairo" ] | |
137 } else { | |
138 sources -= [ | |
139 "font_list_pango.cc", | |
scottmg
2014/05/21 00:30:33
the gyp excludes font_list_ozone, not pango?
brettw
2014/05/21 01:35:18
_pango is implicit in GYP, but I didn't think its
scottmg
2014/05/21 02:42:33
but it removes font_list_ozone.cc if use_pango==1
brettw
2014/05/21 17:09:09
I see, I think you're right. I'll fix it.
| |
140 ] | |
141 } | |
142 | |
143 if (use_x11) { | |
144 include_dirs += [ "//third_party/khronos" ] | |
145 configs += [ "//build/config/linux:xcomposite" ] | |
146 | |
147 if (cpu_arch != "arm" || !is_chromos) { | |
148 sources +=[ | |
149 "gpu/x_util.cc", | |
150 "gpu/x_util.h", | |
151 ] | |
152 } | |
153 } | |
154 | |
155 if (enable_plugins) { | |
156 deps += [ | |
157 # TODO(GYP) enable once supported in the GN build. | |
158 #"//ppapi:shared", | |
159 ] | |
160 } else { | |
161 sources -= [ | |
162 "pepper_plugin_list.cc", | |
163 "pepper_plugin_list.h", | |
164 "sandbox_util.cc", | |
165 ] | |
166 } | |
167 | |
168 if (is_android) { | |
169 sources += [ | |
170 "gpu/media/android_video_decode_accelerator.cc", | |
171 "gpu/media/android_video_decode_accelerator.h", | |
172 ] | |
173 deps += [ | |
174 # TODO(GYP) enable once supported in the GN build. | |
175 #"//media", | |
176 ] | |
177 | |
178 if (enable_webrtc) { | |
179 deps += [ "//third_party/libyuv" ] | |
180 } | |
181 } | |
182 | |
183 if (is_chromeos && use_x11) { | |
184 if (cpu_arch == "arm") { | |
185 sources += [ | |
186 "gpu/media/exynos_v4l2_video_device.cc", | |
187 "gpu/media/exynos_v4l2_video_device.h", | |
188 "gpu/media/tegra_v4l2_video_device.cc", | |
189 "gpu/media/tegra_v4l2_video_device.h", | |
190 "gpu/media/v4l2_image_processor.cc", | |
191 "gpu/media/v4l2_image_processor.h", | |
192 "gpu/media/v4l2_video_decode_accelerator.cc", | |
193 "gpu/media/v4l2_video_decode_accelerator.h", | |
194 "gpu/media/v4l2_video_device.cc", | |
195 "gpu/media/v4l2_video_device.h", | |
196 "gpu/media/v4l2_video_encode_accelerator.cc", | |
197 "gpu/media/v4l2_video_encode_accelerator.h", | |
198 ] | |
199 # TODO(GYP) enable once supported in the GN build. | |
200 #deps += [ "//media" ] | |
201 libs = [ "EGL", "GLESv2" ] | |
202 } else { # !arm | |
203 sources += [ | |
204 "gpu/media/h264_dpb.cc", | |
205 "gpu/media/h264_dpb.h", | |
206 "gpu/media/va_surface.h", | |
207 "gpu/media/vaapi_h264_decoder.cc", | |
208 "gpu/media/vaapi_h264_decoder.h", | |
209 "gpu/media/vaapi_video_decode_accelerator.cc", | |
210 "gpu/media/vaapi_video_decode_accelerator.h", | |
211 "gpu/media/vaapi_wrapper.cc", | |
212 "gpu/media/vaapi_wrapper.h", | |
213 ] | |
214 assert(false, "Implement generate_stubs for libva") | |
215 } | |
216 } | |
217 | |
218 if (is_win) { | |
219 sources += [ | |
220 "gpu/media/dxva_video_decode_accelerator.cc", | |
221 "gpu/media/dxva_video_decode_accelerator.h", | |
222 ] | |
223 include_dirs += [ "//third_party/khronos" ] | |
224 deps += [ | |
225 # TODO(GYP) enable once supported in the GN build. | |
226 #"//media", | |
227 "//ui/gl", | |
228 ] | |
229 | |
230 # TODO(GYP): extract_xinput action. | |
231 } | |
232 | |
233 if (!is_win || !use_aura) { | |
234 sources -= [ "cursors/webcursor_aurawin.cc" ] | |
235 } | |
236 if (!use_aura || !use_x11) { | |
237 sources -= [ "cursors/webcursor_aurax11.cc" ] | |
238 } | |
239 | |
240 if (use_seccomp_bpf) { | |
241 defines += [ "USE_SECCOMP_BPF" ] | |
242 } else { | |
243 if (is_linux) { | |
244 sources -= [ | |
245 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc", | |
246 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.h", | |
247 "sandbox_linux/bpf_gpu_policy_linux.cc", | |
248 "sandbox_linux/bpf_gpu_policy_linux.h", | |
249 "sandbox_linux/bpf_ppapi_policy_linux.cc", | |
250 "sandbox_linux/bpf_ppapi_policy_linux.h", | |
251 "sandbox_linux/bpf_renderer_policy_linux.cc", | |
252 "sandbox_linux/bpf_renderer_policy_linux.h", | |
253 "sandbox_linux/sandbox_bpf_base_policy_linux.cc", | |
254 "sandbox_linux/sandbox_bpf_base_policy_linux.h", | |
255 ] | |
256 } | |
257 if (is_android) { | |
258 sources -= [ | |
259 "sandbox_linux/android/sandbox_bpf_base_policy_android.cc", | |
260 "sandbox_linux/android/sandbox_bpf_base_policy_android.h", | |
261 ] | |
262 } | |
263 } | |
39 } | 264 } |
265 | |
266 # TODO(brettw) remove this and add a proper dependency on libjingle once that | |
267 # target has been converted to GN. This config sets up the include directories | |
268 # so content/common can compile in the meantime. | |
269 config("libjingle_stub_config") { | |
270 include_dirs = [ | |
271 "//third_party/libjingle/overrides", | |
272 "//third_party/libjingle/source", | |
273 "//third_party", | |
274 "//third_party/libyuv/include", | |
275 "//third_party/usrsctp", | |
276 "//third_party/webrtc", | |
277 ] | |
278 | |
279 defines = [ | |
280 "FEATURE_ENABLE_SSL", | |
281 "FEATURE_ENABLE_VOICEMAIL", | |
282 "EXPAT_RELATIVE_PATH", | |
283 "GTEST_RELATIVE_PATH", | |
284 "NO_MAIN_THREAD_WRAPPING", | |
285 "NO_SOUND_SYSTEM", | |
286 ] | |
287 | |
288 if (is_mac) { | |
289 defines += [ "OSX" ] | |
290 } else if (is_linux) { | |
291 defines += [ "LINUX" ] | |
292 } else if (is_android) { | |
293 defines += [ "ANDROID" ] | |
294 } else if (is_win) { | |
295 libs = [ "secur32.lib", "crypt32.lib", "iphlpapi.lib" ] | |
296 } | |
297 | |
298 if (is_posix) { | |
299 defines += [ "POSIX" ] | |
300 } | |
301 if (is_chromeos) { | |
302 defines += [ "CHROMEOS" ] | |
303 } | |
304 } | |
305 | |
OLD | NEW |