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.
13 'type': '<(component)',
14 'product_name': 'gl_wrapper', # Avoid colliding with OS X's libGL.dylib
16 '<(DEPTH)/base/base.gyp:base',
17 '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_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/ui.gyp:ui',
24 'gl_binding_output_dir': '<(SHARED_INTERMEDIATE_DIR)/ui/gl',
30 '<(DEPTH)/third_party/swiftshader/include',
31 '<(DEPTH)/third_party/mesa/MesaLib/include',
32 '<(gl_binding_output_dir)',
34 'direct_dependent_settings': {
36 '<(gl_binding_output_dir)',
39 'export_dependent_settings': [
40 '<(DEPTH)/third_party/mesa/mesa.gyp:mesa_headers',
43 'async_pixel_transfer_delegate.h',
44 'async_pixel_transfer_delegate_idle.cc',
45 'async_pixel_transfer_delegate_idle.h',
46 'async_pixel_transfer_delegate_stub.cc',
47 'async_pixel_transfer_delegate_stub.h',
49 'gl_bindings_skia_in_process.cc',
50 'gl_bindings_skia_in_process.h',
53 'gl_context_android.cc',
54 'gl_context_linux.cc',
56 'gl_context_osmesa.cc',
57 'gl_context_osmesa.h',
64 'gl_gl_api_implementation.cc',
65 'gl_gl_api_implementation.h',
68 'gl_image_android.cc',
74 'gl_implementation.cc',
75 'gl_implementation.h',
76 'gl_implementation_android.cc',
77 'gl_implementation_linux.cc',
78 'gl_implementation_mac.cc',
79 'gl_implementation_win.cc',
82 'gl_osmesa_api_implementation.cc',
83 'gl_osmesa_api_implementation.h',
86 'gl_state_restorer.cc',
87 'gl_state_restorer.h',
90 'gl_surface_android.cc',
91 'gl_surface_linux.cc',
96 'gl_surface_osmesa.cc',
97 'gl_surface_osmesa.h',
100 'gpu_memory_buffer.h',
101 'gpu_switching_manager.cc',
102 'gpu_switching_manager.h',
103 'safe_shared_memory_pool.h',
104 'safe_shared_memory_pool.cc',
105 'scoped_make_current.cc',
106 'scoped_make_current.h',
107 'gl_state_restorer.cc',
108 'gl_state_restorer.h',
111 '<(gl_binding_output_dir)/gl_bindings_autogen_gl.cc',
112 '<(gl_binding_output_dir)/gl_bindings_autogen_gl.h',
113 '<(gl_binding_output_dir)/gl_bindings_autogen_mock.cc',
114 '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.cc',
115 '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.h',
116 '<(gl_binding_output_dir)/gl_interface_autogen_gl.h',
118 # hard_dependency is necessary for this target because it has actions
119 # that generate header files included by dependent targets. The header
120 # files must be generated before the dependents are compiled. The usual
121 # semantics are to allow the two targets to build concurrently.
122 'hard_dependency': 1,
125 'action_name': 'generate_gl_bindings',
127 'generator_path': 'generate_bindings.py',
129 ['use_system_mesa==0', {
130 'header_paths': '../../third_party/mesa/MesaLib/include:../../third_party/khronos',
131 }, { # use_system_mesa==1
132 'header_paths': '/usr/include',
138 '<!@(python <(generator_path) --header-paths=<(header_paths) --inputs)',
141 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.cc',
142 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.h',
143 '<(gl_binding_output_dir)/gl_bindings_api_autogen_egl.h',
144 '<(gl_binding_output_dir)/gl_bindings_autogen_gl.cc',
145 '<(gl_binding_output_dir)/gl_bindings_autogen_gl.h',
146 '<(gl_binding_output_dir)/gl_bindings_api_autogen_gl.h',
147 '<(gl_binding_output_dir)/gl_bindings_autogen_glx.cc',
148 '<(gl_binding_output_dir)/gl_bindings_autogen_glx.h',
149 '<(gl_binding_output_dir)/gl_bindings_api_autogen_glx.h',
150 '<(gl_binding_output_dir)/gl_bindings_autogen_mock.cc',
151 '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.cc',
152 '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.h',
153 '<(gl_binding_output_dir)/gl_bindings_api_autogen_osmesa.h',
154 '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.cc',
155 '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.h',
156 '<(gl_binding_output_dir)/gl_bindings_api_autogen_wgl.h',
157 '<(gl_binding_output_dir)/gl_interface_autogen_egl.h',
158 '<(gl_binding_output_dir)/gl_interface_autogen_gl.h',
159 '<(gl_binding_output_dir)/gl_interface_autogen_glx.h',
160 '<(gl_binding_output_dir)/gl_interface_autogen_osmesa.h',
161 '<(gl_binding_output_dir)/gl_interface_autogen_wgl.h',
162 '<(gl_binding_output_dir)/gl_mock_autogen_egl.h',
163 '<(gl_binding_output_dir)/gl_mock_autogen_gl.h',
164 '<(gl_binding_output_dir)/gl_mock_autogen_glx.h',
165 '<(gl_binding_output_dir)/gl_mock_autogen_osmesa.h',
166 '<(gl_binding_output_dir)/gl_mock_autogen_wgl.h',
171 '--header-paths=<(header_paths)',
172 '<(gl_binding_output_dir)',
185 'gl_egl_api_implementation.cc',
186 'gl_egl_api_implementation.h',
187 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.cc',
188 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.h',
191 '<(DEPTH)/third_party/angle/include',
198 'gl_glx_api_implementation.cc',
199 'gl_glx_api_implementation.h',
204 'gl_egl_api_implementation.cc',
205 'gl_egl_api_implementation.h',
206 '<(gl_binding_output_dir)/gl_bindings_autogen_glx.cc',
207 '<(gl_binding_output_dir)/gl_bindings_autogen_glx.h',
209 'all_dependent_settings': {
211 'GL_GLEXT_PROTOTYPES',
225 'gl_egl_api_implementation.cc',
226 'gl_egl_api_implementation.h',
229 'gl_wgl_api_implementation.cc',
230 'gl_wgl_api_implementation.h',
231 '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.cc',
232 '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.h',
244 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
248 ['OS=="mac" and use_aura == 1', {
250 'gl_context_nsview.mm',
251 'gl_context_nsview.h',
252 'gl_surface_nsview.mm',
253 'gl_surface_nsview.h',
258 'async_pixel_transfer_delegate_android.cc',
259 'async_pixel_transfer_delegate_android.h',
260 'android_native_window.cc',
261 'android_native_window.h',
271 'gl_context_osmesa.cc',
272 'system_monitor_posix.cc',
275 'GL_GLEXT_PROTOTYPES',
276 'EGL_EGLEXT_PROTOTYPES',
282 'target_name': 'gl_unittest_utils',
283 'type': 'static_library',
285 'gl_binding_output_dir': '<(SHARED_INTERMEDIATE_DIR)/ui/gl',
288 '../../testing/gmock.gyp:gmock',
289 '../../third_party/khronos/khronos.gyp:khronos_headers',
293 '<(gl_binding_output_dir)',
296 'direct_dependent_settings': {
298 '<(gl_binding_output_dir)',
304 '<(gl_binding_output_dir)/gl_mock_autogen_gl.h',