OLD | NEW |
| (Empty) |
1 # Copyright (c) 2012 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 { | |
6 'variables': { | |
7 'chromium_code': 1, | |
8 }, | |
9 | |
10 'targets': [ | |
11 { | |
12 'target_name': 'gl', | |
13 'type': '<(component)', | |
14 'product_name': 'gl_wrapper', # Avoid colliding with OS X's libGL.dylib | |
15 'dependencies': [ | |
16 '<(DEPTH)/base/base.gyp:base', | |
17 '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:d
ynamic_annotations', | |
18 '<(DEPTH)/gpu/command_buffer/command_buffer.gyp:gles2_utils', | |
19 '<(DEPTH)/skia/skia.gyp:skia', | |
20 '<(DEPTH)/third_party/mesa/mesa.gyp:mesa_headers', | |
21 '<(DEPTH)/ui/gfx/gfx.gyp:gfx', | |
22 '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry', | |
23 ], | |
24 'defines': [ | |
25 'GL_IMPLEMENTATION', | |
26 ], | |
27 'include_dirs': [ | |
28 '<(DEPTH)/third_party/khronos', | |
29 ], | |
30 'export_dependent_settings': [ | |
31 '<(DEPTH)/third_party/mesa/mesa.gyp:mesa_headers', | |
32 ], | |
33 'sources': [ | |
34 'android/gl_jni_registrar.cc', | |
35 'android/gl_jni_registrar.h', | |
36 'android/scoped_java_surface.cc', | |
37 'android/scoped_java_surface.h', | |
38 'android/surface_texture.cc', | |
39 'android/surface_texture.h', | |
40 'android/surface_texture_listener.cc', | |
41 'android/surface_texture_listener.h', | |
42 'ca_renderer_layer_params.cc', | |
43 'ca_renderer_layer_params.h', | |
44 'gl_bindings.cc', | |
45 'gl_bindings.h', | |
46 'gl_bindings_autogen_gl.cc', | |
47 'gl_bindings_autogen_gl.h', | |
48 'gl_bindings_autogen_osmesa.cc', | |
49 'gl_bindings_autogen_osmesa.h', | |
50 'gl_context.cc', | |
51 'gl_context.h', | |
52 'gl_context_osmesa.cc', | |
53 'gl_context_osmesa.h', | |
54 'gl_context_stub.cc', | |
55 'gl_context_stub.h', | |
56 'gl_context_stub_with_extensions.cc', | |
57 'gl_context_stub_with_extensions.h', | |
58 'gl_enums.cc', | |
59 'gl_enums.h', | |
60 'gl_enums_implementation_autogen.h', | |
61 'gl_export.h', | |
62 'gl_fence.cc', | |
63 'gl_fence.h', | |
64 'gl_fence_arb.cc', | |
65 'gl_fence_arb.h', | |
66 'gl_fence_nv.cc', | |
67 'gl_fence_nv.h', | |
68 'gl_gl_api_implementation.cc', | |
69 'gl_gl_api_implementation.h', | |
70 'gl_helper.cc', | |
71 'gl_helper.h', | |
72 'gl_image.cc', | |
73 'gl_image.h', | |
74 'gl_image_memory.cc', | |
75 'gl_image_memory.h', | |
76 'gl_image_ref_counted_memory.cc', | |
77 'gl_image_ref_counted_memory.h', | |
78 'gl_image_shared_memory.cc', | |
79 'gl_image_shared_memory.h', | |
80 'gl_image_stub.cc', | |
81 'gl_image_stub.h', | |
82 'gl_implementation.cc', | |
83 'gl_implementation.h', | |
84 'gl_osmesa_api_implementation.cc', | |
85 'gl_osmesa_api_implementation.h', | |
86 'gl_share_group.cc', | |
87 'gl_share_group.h', | |
88 'gl_state_restorer.cc', | |
89 'gl_state_restorer.h', | |
90 'gl_surface.cc', | |
91 'gl_surface.h', | |
92 'gl_surface_osmesa.cc', | |
93 'gl_surface_osmesa.h', | |
94 'gl_surface_overlay.cc', | |
95 'gl_surface_overlay.h', | |
96 'gl_surface_stub.cc', | |
97 'gl_surface_stub.h', | |
98 "gl_stub_api.cc", | |
99 "gl_stub_api.h", | |
100 "gl_stub_api_base.h", | |
101 "gl_stub_autogen_gl.cc", | |
102 "gl_stub_autogen_gl.h", | |
103 'gl_switches.cc', | |
104 'gl_switches.h', | |
105 'gl_version_info.cc', | |
106 'gl_version_info.h', | |
107 'gpu_switching_manager.cc', | |
108 'gpu_switching_manager.h', | |
109 'gpu_switching_observer.h', | |
110 'gpu_timing.cc', | |
111 'gpu_timing.h', | |
112 'scoped_api.cc', | |
113 'scoped_api.h', | |
114 'scoped_binders.cc', | |
115 'scoped_binders.h', | |
116 'scoped_make_current.cc', | |
117 'scoped_make_current.h', | |
118 'sync_control_vsync_provider.cc', | |
119 'sync_control_vsync_provider.h', | |
120 'trace_util.cc', | |
121 'trace_util.h', | |
122 ], | |
123 'conditions': [ | |
124 ['OS in ("win", "android", "linux")', { | |
125 'sources': [ | |
126 'egl_util.cc', | |
127 'egl_util.h', | |
128 'gl_bindings_autogen_egl.cc', | |
129 'gl_bindings_autogen_egl.h', | |
130 'gl_context_egl.cc', | |
131 'gl_context_egl.h', | |
132 'gl_egl_api_implementation.cc', | |
133 'gl_egl_api_implementation.h', | |
134 'gl_fence_egl.cc', | |
135 'gl_fence_egl.h', | |
136 'gl_image_egl.cc', | |
137 'gl_image_egl.h', | |
138 'gl_surface_egl.cc', | |
139 'gl_surface_egl.h', | |
140 ], | |
141 'direct_dependent_settings': { | |
142 'defines': [ | |
143 'USE_EGL', | |
144 ], | |
145 }, | |
146 'defines': [ | |
147 'USE_EGL', | |
148 ], | |
149 'include_dirs': [ | |
150 '<(DEPTH)/third_party/khronos', | |
151 ], | |
152 }], | |
153 ['OS in ("android", "linux")', { | |
154 'sources': [ | |
155 'gl_implementation_osmesa.cc', | |
156 'gl_implementation_osmesa.h', | |
157 ], | |
158 }], | |
159 ['use_x11 == 1', { | |
160 'sources': [ | |
161 'gl_bindings_autogen_glx.cc', | |
162 'gl_bindings_autogen_glx.h', | |
163 'gl_context_glx.cc', | |
164 'gl_context_glx.h', | |
165 'gl_egl_api_implementation.cc', | |
166 'gl_egl_api_implementation.h', | |
167 'gl_glx_api_implementation.cc', | |
168 'gl_glx_api_implementation.h', | |
169 'gl_image_glx.cc', | |
170 'gl_image_glx.h', | |
171 'gl_surface_egl_x11.cc', | |
172 'gl_surface_egl_x11.h', | |
173 'gl_surface_glx.cc', | |
174 'gl_surface_glx.h', | |
175 'gl_surface_osmesa_x11.cc', | |
176 'gl_surface_osmesa_x11.h', | |
177 ], | |
178 'direct_dependent_settings': { | |
179 'defines': [ | |
180 'GL_GLEXT_PROTOTYPES', | |
181 'USE_GLX', | |
182 ], | |
183 }, | |
184 'defines': [ | |
185 'USE_GLX', | |
186 ], | |
187 'dependencies': [ | |
188 '<(DEPTH)/build/linux/system.gyp:x11', | |
189 '<(DEPTH)/build/linux/system.gyp:xcomposite', | |
190 '<(DEPTH)/build/linux/system.gyp:xext', | |
191 '<(DEPTH)/ui/events/platform/events_platform.gyp:events_platform', | |
192 '<(DEPTH)/ui/gfx/x/gfx_x11.gyp:gfx_x11', | |
193 ], | |
194 'copies': [{ | |
195 'destination': '<(PRODUCT_DIR)', | |
196 'files': | |
197 [ | |
198 "<(PRODUCT_DIR)/lib/libEGL.so", | |
199 "<(PRODUCT_DIR)/lib/libGLESv2.so", | |
200 ], | |
201 }], | |
202 }], | |
203 ['OS=="win"', { | |
204 'sources': [ | |
205 'angle_platform_impl.cc', | |
206 'angle_platform_impl.h', | |
207 'gl_bindings_autogen_wgl.cc', | |
208 'gl_bindings_autogen_wgl.h', | |
209 'gl_context_wgl.cc', | |
210 'gl_context_wgl.h', | |
211 'gl_egl_api_implementation.cc', | |
212 'gl_egl_api_implementation.h', | |
213 'gl_surface_osmesa_win.cc', | |
214 'gl_surface_osmesa_win.h', | |
215 'gl_surface_wgl.cc', | |
216 'gl_surface_wgl.h', | |
217 'gl_wgl_api_implementation.cc', | |
218 'gl_wgl_api_implementation.h', | |
219 'vsync_provider_win.cc', | |
220 'vsync_provider_win.h', | |
221 ], | |
222 'msvs_settings': { | |
223 'VCLinkerTool': { | |
224 'DelayLoadDLLs': [ | |
225 'dwmapi.dll', | |
226 ], | |
227 'AdditionalDependencies': [ | |
228 'dwmapi.lib', | |
229 ], | |
230 }, | |
231 }, | |
232 'link_settings': { | |
233 'libraries': [ | |
234 '-ldwmapi.lib', | |
235 ], | |
236 }, | |
237 'dependencies': [ | |
238 '<(DEPTH)/third_party/angle/src/angle.gyp:libEGL', | |
239 '<(DEPTH)/third_party/angle/src/angle.gyp:libGLESv2', | |
240 ], | |
241 }], | |
242 ['OS=="mac"', { | |
243 'sources': [ | |
244 'gl_context_cgl.cc', | |
245 'gl_context_cgl.h', | |
246 'gl_fence_apple.cc', | |
247 'gl_fence_apple.h', | |
248 'gl_image_io_surface.mm', | |
249 'gl_image_io_surface.h', | |
250 'scoped_cgl.cc', | |
251 'scoped_cgl.h', | |
252 'yuv_to_rgb_converter.cc', | |
253 'yuv_to_rgb_converter.h', | |
254 ], | |
255 'link_settings': { | |
256 'libraries': [ | |
257 '$(SDKROOT)/System/Library/Frameworks/IOSurface.framework', | |
258 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework', | |
259 '$(SDKROOT)/System/Library/Frameworks/Quartz.framework', | |
260 ], | |
261 }, | |
262 }], | |
263 ['OS=="android"', { | |
264 'dependencies': [ | |
265 'gl_jni_headers', | |
266 '../android/ui_android.gyp:ui_java', | |
267 ], | |
268 'sources': [ | |
269 'gl_image_surface_texture.cc', | |
270 'gl_image_surface_texture.h', | |
271 ], | |
272 'link_settings': { | |
273 'libraries': [ | |
274 '-landroid', | |
275 ], | |
276 }, | |
277 'sources!': [ | |
278 'system_monitor_posix.cc', | |
279 ], | |
280 'defines': [ | |
281 'GL_GLEXT_PROTOTYPES', | |
282 'EGL_EGLEXT_PROTOTYPES', | |
283 ], | |
284 }], | |
285 ['OS!="android"', { | |
286 'sources/': [ ['exclude', '^android/'] ], | |
287 }], | |
288 ], | |
289 }, | |
290 { | |
291 'target_name': 'gl_unittest_utils', | |
292 'type': 'static_library', | |
293 'dependencies': [ | |
294 '../../testing/gmock.gyp:gmock', | |
295 '../../third_party/khronos/khronos.gyp:khronos_headers', | |
296 'gl', | |
297 'init/gl_init.gyp:gl_init', | |
298 ], | |
299 'include_dirs': [ | |
300 '../..', | |
301 ], | |
302 'sources': [ | |
303 'gl_bindings_autogen_mock.cc', | |
304 'gl_bindings_autogen_mock.h', | |
305 'gl_mock.cc', | |
306 'gl_mock.h', | |
307 'gl_mock_autogen_gl.h', | |
308 'gpu_timing_fake.cc', | |
309 'gpu_timing_fake.h', | |
310 ], | |
311 }, | |
312 { | |
313 'target_name': 'gl_test_support', | |
314 'type': 'static_library', | |
315 'dependencies': [ | |
316 '<(DEPTH)/testing/gtest.gyp:gtest', | |
317 '../../third_party/khronos/khronos.gyp:khronos_headers', | |
318 'gl', | |
319 'init/gl_init.gyp:gl_init', | |
320 ], | |
321 'include_dirs': [ | |
322 '../..', | |
323 ], | |
324 'sources': [ | |
325 'test/gl_image_test_support.cc', | |
326 'test/gl_image_test_support.h', | |
327 'test/gl_image_test_template.h', | |
328 'test/gl_surface_test_support.cc', | |
329 'test/gl_surface_test_support.h', | |
330 'test/gl_test_helper.cc', | |
331 'test/gl_test_helper.h', | |
332 ], | |
333 'conditions': [ | |
334 ['use_x11==1', { | |
335 'dependencies': [ | |
336 '../../build/linux/system.gyp:x11', | |
337 '../gfx/x/gfx_x11.gyp:gfx_x11', | |
338 '../platform_window/x11/x11_window.gyp:x11_window', | |
339 ], | |
340 }], | |
341 ], | |
342 }, | |
343 ], | |
344 'conditions': [ | |
345 ['OS=="android"' , { | |
346 'targets': [ | |
347 { | |
348 'target_name': 'surface_jni_headers', | |
349 'type': 'none', | |
350 'variables': { | |
351 'jni_gen_package': 'ui/gl', | |
352 'input_java_class': 'android/view/Surface.class', | |
353 }, | |
354 'includes': [ '../../build/jar_file_jni_generator.gypi' ], | |
355 }, | |
356 { | |
357 'target_name': 'gl_jni_headers', | |
358 'type': 'none', | |
359 'dependencies': [ | |
360 'surface_jni_headers', | |
361 ], | |
362 'sources': [ | |
363 '../android/java/src/org/chromium/ui/gl/SurfaceTexturePlatformWrappe
r.java', | |
364 '../android/java/src/org/chromium/ui/gl/SurfaceTextureListener.java'
, | |
365 ], | |
366 'variables': { | |
367 'jni_gen_package': 'ui/gl', | |
368 }, | |
369 'includes': [ '../../build/jni_generator.gypi' ], | |
370 }, | |
371 ], | |
372 }], | |
373 ], | |
374 } | |
OLD | NEW |