Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / gl / gl.gyp
blobae4dfa9014c57333dd6c9cca381e5300a63ef624
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.
6   'variables': {
7     'chromium_code': 1,
8   },
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: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/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/swiftshader/include',
29         '<(DEPTH)/third_party/khronos',
30       ],
31       'export_dependent_settings': [
32         '<(DEPTH)/third_party/mesa/mesa.gyp:mesa_headers',
33       ],
34       'sources': [
35         'android/gl_jni_registrar.cc',
36         'android/gl_jni_registrar.h',
37         'android/scoped_java_surface.cc',
38         'android/scoped_java_surface.h',
39         'android/surface_texture.cc',
40         'android/surface_texture.h',
41         'android/surface_texture_listener.cc',
42         'android/surface_texture_listener.h',
43         'gl_bindings.cc',
44         'gl_bindings.h',
45         'gl_bindings_autogen_gl.cc',
46         'gl_bindings_autogen_gl.h',
47         'gl_bindings_autogen_osmesa.cc',
48         'gl_bindings_autogen_osmesa.h',
49         'gl_bindings_skia_in_process.cc',
50         'gl_bindings_skia_in_process.h',
51         'gl_context.cc',
52         'gl_context.h',
53         'gl_context_android.cc',
54         'gl_context_mac.mm',
55         'gl_context_osmesa.cc',
56         'gl_context_osmesa.h',
57         'gl_context_ozone.cc',
58         'gl_context_stub.cc',
59         'gl_context_stub.h',
60         'gl_context_stub_with_extensions.cc',
61         'gl_context_stub_with_extensions.h',
62         'gl_context_win.cc',
63         'gl_context_x11.cc',
64         'gl_enums.cc',
65         'gl_enums.h',
66         'gl_enums_implementation_autogen.h',
67         'gl_export.h',
68         'gl_fence.cc',
69         'gl_fence.h',
70         'gl_fence_arb.cc',
71         'gl_fence_arb.h',
72         'gl_fence_nv.cc',
73         'gl_fence_nv.h',
74         'gl_gl_api_implementation.cc',
75         'gl_gl_api_implementation.h',
76         'gl_image.h',
77         'gl_image_memory.cc',
78         'gl_image_memory.h',
79         'gl_image_ref_counted_memory.cc',
80         'gl_image_ref_counted_memory.h',
81         'gl_image_shared_memory.cc',
82         'gl_image_shared_memory.h',
83         'gl_image_stub.cc',
84         'gl_image_stub.h',
85         'gl_implementation.cc',
86         'gl_implementation.h',
87         'gl_implementation_android.cc',
88         'gl_implementation_mac.cc',
89         'gl_implementation_ozone.cc',
90         'gl_implementation_win.cc',
91         'gl_implementation_x11.cc',
92         'gl_osmesa_api_implementation.cc',
93         'gl_osmesa_api_implementation.h',
94         'gl_share_group.cc',
95         'gl_share_group.h',
96         'gl_state_restorer.cc',
97         'gl_state_restorer.h',
98         'gl_surface.cc',
99         'gl_surface.h',
100         'gl_surface_android.cc',
101         'gl_surface_mac.cc',
102         'gl_surface_osmesa.cc',
103         'gl_surface_osmesa.h',
104         'gl_surface_ozone.cc',
105         'gl_surface_stub.cc',
106         'gl_surface_stub.h',
107         'gl_surface_win.cc',
108         'gl_surface_x11.cc',
109         'gl_switches.cc',
110         'gl_switches.h',
111         'gl_version_info.cc',
112         'gl_version_info.h',
113         'gpu_switching_manager.cc',
114         'gpu_switching_manager.h',
115         'gpu_switching_observer.h',
116         'gpu_timing.cc',
117         'gpu_timing.h',
118         'scoped_binders.cc',
119         'scoped_binders.h',
120         'scoped_make_current.cc',
121         'scoped_make_current.h',
122         'sync_control_vsync_provider.cc',
123         'sync_control_vsync_provider.h',
124       ],
125       'conditions': [
126         ['OS in ("win", "android", "linux")', {
127           'sources': [
128             'egl_util.cc',
129             'egl_util.h',
130             'gl_bindings_autogen_egl.cc',
131             'gl_bindings_autogen_egl.h',
132             'gl_context_egl.cc',
133             'gl_context_egl.h',
134             'gl_egl_api_implementation.cc',
135             'gl_egl_api_implementation.h',
136             'gl_fence_egl.cc',
137             'gl_fence_egl.h',
138             'gl_image_egl.cc',
139             'gl_image_egl.h',
140             'gl_surface_egl.cc',
141             'gl_surface_egl.h',
142           ],
143           'include_dirs': [
144             '<(DEPTH)/third_party/khronos',
145         ],
146         }],
147         ['OS in ("android", "linux")', {
148           'sources': [
149             'gl_implementation_osmesa.cc',
150             'gl_implementation_osmesa.h',
151           ],
152         }],
153         ['OS=="linux"', {
154           'sources': [
155             'gl_image_linux_dma_buffer.cc',
156             'gl_image_linux_dma_buffer.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_glx.cc',
172             'gl_surface_glx.h',
173           ],
174           'all_dependent_settings': {
175             'defines': [
176               'GL_GLEXT_PROTOTYPES',
177             ],
178           },
179           'dependencies': [
180             '<(DEPTH)/build/linux/system.gyp:x11',
181             '<(DEPTH)/build/linux/system.gyp:xcomposite',
182             '<(DEPTH)/build/linux/system.gyp:xext',
183             '<(DEPTH)/ui/events/platform/events_platform.gyp:events_platform',
184             '<(DEPTH)/ui/gfx/x/gfx_x11.gyp:gfx_x11',
185           ],
186         }],
187         ['OS=="win"', {
188           'sources': [
189             'angle_platform_impl.cc',
190             'angle_platform_impl.h',
191             'gl_bindings_autogen_wgl.cc',
192             'gl_bindings_autogen_wgl.h',
193             'gl_context_wgl.cc',
194             'gl_context_wgl.h',
195             'gl_egl_api_implementation.cc',
196             'gl_egl_api_implementation.h',
197             'gl_surface_wgl.cc',
198             'gl_surface_wgl.h',
199             'gl_wgl_api_implementation.cc',
200             'gl_wgl_api_implementation.h',
201           ],
202           'msvs_settings': {
203             'VCLinkerTool': {
204               'DelayLoadDLLs': [
205                 'dwmapi.dll',
206               ],
207               'AdditionalDependencies': [
208                 'dwmapi.lib',
209               ],
210             },
211           },
212           'link_settings': {
213             'libraries': [
214               '-ldwmapi.lib',
215             ],
216           },
217           'dependencies': [
218             '<(DEPTH)/third_party/angle/src/angle.gyp:libEGL',
219             '<(DEPTH)/third_party/angle/src/angle.gyp:libGLESv2',
220           ],
221         }],
222         ['OS=="mac"', {
223           'sources': [
224             'gl_context_cgl.cc',
225             'gl_context_cgl.h',
226             'gl_fence_apple.cc',
227             'gl_fence_apple.h',
228             'gl_image_io_surface.mm',
229             'gl_image_io_surface.h',
230             'scoped_cgl.cc',
231             'scoped_cgl.h',
232           ],
233           'link_settings': {
234             'libraries': [
235               '$(SDKROOT)/System/Library/Frameworks/IOSurface.framework',
236               '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
237               '$(SDKROOT)/System/Library/Frameworks/Quartz.framework',
238             ],
239           },
240         }],
241         ['OS=="android"', {
242           'dependencies': [
243             'gl_jni_headers',
244             '../android/ui_android.gyp:ui_java',
245           ],
246           'sources': [
247             'gl_image_surface_texture.cc',
248             'gl_image_surface_texture.h',
249           ],
250           'link_settings': {
251             'libraries': [
252               '-landroid',
253             ],
254           },
255           'sources!': [
256             'system_monitor_posix.cc',
257           ],
258           'defines': [
259             'GL_GLEXT_PROTOTYPES',
260             'EGL_EGLEXT_PROTOTYPES',
261           ],
262         }],
263         ['OS!="android"', {
264           'sources/': [ ['exclude', '^android/'] ],
265         }],
266         ['use_ozone==1', {
267           'dependencies': [
268             '../ozone/ozone.gyp:ozone',
269             '../ozone/ozone.gyp:ozone_base',
270           ],
271         }],
272       ],
273     },
274     {
275       'target_name': 'gl_unittest_utils',
276       'type': 'static_library',
277       'dependencies': [
278         '../../testing/gmock.gyp:gmock',
279         '../../third_party/khronos/khronos.gyp:khronos_headers',
280         'gl',
281       ],
282       'include_dirs': [
283         '../..',
284       ],
285       'sources': [
286         'gl_bindings_autogen_mock.cc',
287         'gl_bindings_autogen_mock.h',
288         'gl_mock.cc',
289         'gl_mock.h',
290         'gl_mock_autogen_gl.h',
291         'gpu_timing_fake.cc',
292         'gpu_timing_fake.h',
293       ],
294     },
295     {
296       'target_name': 'gl_test_support',
297       'type': 'static_library',
298       'dependencies': [
299         '../../third_party/khronos/khronos.gyp:khronos_headers',
300         'gl',
301       ],
302       'include_dirs': [
303         '../..',
304       ],
305       'sources': [
306         'test/gl_surface_test_support.cc',
307         'test/gl_surface_test_support.h',
308       ],
309       'conditions': [
310         ['use_x11==1', {
311           'dependencies': [
312             '../../build/linux/system.gyp:x11',
313             '../gfx/x/gfx_x11.gyp:gfx_x11',
314             '../platform_window/x11/x11_window.gyp:x11_window',
315           ],
316         }],
317       ],
318     },
319   ],
320   'conditions': [
321     ['OS=="android"' , {
322       'targets': [
323         {
324           'target_name': 'surface_jni_headers',
325           'type': 'none',
326           'variables': {
327             'jni_gen_package': 'ui/gl',
328             'input_java_class': 'android/view/Surface.class',
329           },
330           'includes': [ '../../build/jar_file_jni_generator.gypi' ],
331         },
332         {
333           'target_name': 'gl_jni_headers',
334           'type': 'none',
335           'dependencies': [
336             'surface_jni_headers',
337           ],
338           'sources': [
339             '../android/java/src/org/chromium/ui/gl/SurfaceTexturePlatformWrapper.java',
340             '../android/java/src/org/chromium/ui/gl/SurfaceTextureListener.java',
341           ],
342           'variables': {
343             'jni_gen_package': 'ui/gl',
344           },
345           'includes': [ '../../build/jni_generator.gypi' ],
346         },
347       ],
348     }],
349   ],