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.
7 '../../ppapi/ppapi.gypi',
12 # Pepper demos that are compiled as shared libraries need to be compiled
13 # with -fPIC flag. All static libraries that these demos depend on must
14 # also be compiled with -fPIC flag. Setting GYP_DEFINES="linux_fpic=1"
15 # compiles everything with -fPIC. Disable pepper demos on linux/x64
16 # unless linux_fpic is 1.
17 ['os_posix == 1 and OS != "mac" and (target_arch=="x64" or target_arch=="arm") and linux_fpic!=1', {
18 'enable_pepper_demos%': 0,
20 'enable_pepper_demos%': 1,
26 'target_name': 'gpu_demo_framework',
27 'type': 'static_library',
34 'framework/demo_factory.h',
38 'target_name': 'gpu_demo_framework_exe',
39 'type': 'static_library',
42 '../gpu.gyp:command_buffer_client',
43 '../gpu.gyp:command_buffer_service',
44 '../gpu.gyp:gles2_implementation',
45 '../../base/base.gyp:base',
46 '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
47 '../../ui/gl/gl.gyp:gl',
51 'framework/main_exe.cc',
52 'framework/window.cc',
53 'framework/window_linux.cc',
54 'framework/window_mac.mm',
55 'framework/window_win.cc',
59 ['toolkit_uses_gtk == 1', {
60 'dependencies': ['../../build/linux/system.gyp:gtk'],
65 'target_name': 'gpu_demo_framework_ppapi',
66 'suppress_wildcard': 1, # So that 'all' doesn't end up being a bundle.
67 'type': 'static_library',
70 '../../ppapi/ppapi.gyp:ppapi_cpp_objects',
71 '../../ppapi/ppapi.gyp:ppapi_gles2',
75 '../../ppapi/lib/gl/include',
76 '../../third_party/gles2_book/Common/Include',
79 'framework/pepper.cc',
80 '../../third_party/gles2_book/Common/Include/esUtil.h',
81 '../../third_party/gles2_book/Common/Source/esShader.c',
82 '../../third_party/gles2_book/Common/Source/esShapes.c',
83 '../../third_party/gles2_book/Common/Source/esTransform.c',
84 '../../third_party/gles2_book/Common/Source/esUtil.c',
86 'direct_dependent_settings': {
89 '../../ppapi/lib/gl/include',
90 '../../third_party/gles2_book/Common/Include',
96 '<(PRODUCT_DIR)/Chromium.app/Contents/MacOS/Chromium',
97 '--enable-accelerated-plugins',
98 '--register-pepper-plugins='
99 '<(PRODUCT_DIR)/$(PRODUCT_NAME).plugin;'
100 'pepper-application/x-gpu-demo',
101 'file://$(SOURCE_ROOT)/pepper_gpu_demo.html',
105 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)chrome<(EXECUTABLE_SUFFIX)',
106 '--enable-accelerated-plugins',
107 '--register-pepper-plugins=$(TargetPath);'
108 'pepper-application/x-gpu-demo',
109 'file://$(ProjectDir)pepper_gpu_demo.html',
115 ['os_posix == 1 and OS != "mac"', {
116 # -gstabs, used in the official builds, causes an ICE. Remove it.
117 'cflags!': ['-gstabs'],
121 'product_extension': 'plugin',
127 'target_name': 'hello_triangle_exe',
128 'type': 'executable',
130 'gpu_demo_framework_exe',
131 '../../third_party/gles2_book/gles2_book.gyp:hello_triangle',
134 'gles2_book/example.h',
135 'gles2_book/demo_hello_triangle.cc',
139 'target_name': 'mip_map_2d_exe',
140 'type': 'executable',
142 'gpu_demo_framework_exe',
143 '../../third_party/gles2_book/gles2_book.gyp:mip_map_2d',
146 'gles2_book/example.h',
147 'gles2_book/demo_mip_map_2d.cc',
151 'target_name': 'simple_texture_2d_exe',
152 'type': 'executable',
154 'gpu_demo_framework_exe',
155 '../../third_party/gles2_book/gles2_book.gyp:simple_texture_2d',
158 'gles2_book/example.h',
159 'gles2_book/demo_simple_texture_2d.cc',
163 'target_name': 'simple_texture_cubemap_exe',
164 'type': 'executable',
166 'gpu_demo_framework_exe',
167 '../../third_party/gles2_book/gles2_book.gyp:simple_texture_cubemap',
170 'gles2_book/example.h',
171 'gles2_book/demo_simple_texture_cubemap.cc',
175 'target_name': 'simple_vertex_shader_exe',
176 'type': 'executable',
178 'gpu_demo_framework_exe',
179 '../../third_party/gles2_book/gles2_book.gyp:simple_vertex_shader',
182 'gles2_book/example.h',
183 'gles2_book/demo_simple_vertex_shader.cc',
187 'target_name': 'stencil_test_exe',
188 'type': 'executable',
190 'gpu_demo_framework_exe',
191 '../../third_party/gles2_book/gles2_book.gyp:stencil_test',
194 'gles2_book/example.h',
195 'gles2_book/demo_stencil_test.cc',
199 'target_name': 'texture_wrap_exe',
200 'type': 'executable',
202 'gpu_demo_framework_exe',
203 '../../third_party/gles2_book/gles2_book.gyp:texture_wrap',
206 'gles2_book/example.h',
207 'gles2_book/demo_texture_wrap.cc',
211 'target_name': 'compressed_textures_exe',
212 'type': 'executable',
214 'gpu_demo_framework_exe',
215 '../../third_party/gles2_book/gles2_book.gyp:es_util',
218 'compressed_textures/compressed_textures.cc',
222 'target_name': 'occlusion_query_exe',
223 'type': 'executable',
225 'gpu_demo_framework_exe',
226 '../../third_party/gles2_book/gles2_book.gyp:es_util',
229 'GL_GLEXT_PROTOTYPES',
232 'occlusion_query/occlusion_query.cc',
237 ['enable_pepper_demos==1', {
240 'target_name': 'hello_triangle_ppapi',
241 'type': 'loadable_module',
242 'variables': { 'chromium_code': 0, },
243 'dependencies': [ 'gpu_demo_framework_ppapi', ],
245 '<@(ppp_entrypoints_sources)',
246 'gles2_book/example.h',
247 'gles2_book/demo_hello_triangle.cc',
248 '../../third_party/gles2_book/Chapter_2/Hello_Triangle/Hello_Triangle.c',
249 '../../third_party/gles2_book/Chapter_2/Hello_Triangle/Hello_Triangle.h',
253 'target_name': 'mip_map_2d_ppapi',
254 'type': 'loadable_module',
255 'variables': { 'chromium_code': 0, },
256 'dependencies': [ 'gpu_demo_framework_ppapi', ],
258 '<@(ppp_entrypoints_sources)',
259 'gles2_book/example.h',
260 'gles2_book/demo_mip_map_2d.cc',
261 '../../third_party/gles2_book/Chapter_9/MipMap2D/MipMap2D.c',
262 '../../third_party/gles2_book/Chapter_9/MipMap2D/MipMap2D.h',
266 'target_name': 'simple_texture_2d_ppapi',
267 'type': 'loadable_module',
268 'variables': { 'chromium_code': 0, },
269 'dependencies': [ 'gpu_demo_framework_ppapi', ],
271 '<@(ppp_entrypoints_sources)',
272 'gles2_book/example.h',
273 'gles2_book/demo_simple_texture_2d.cc',
274 '../../third_party/gles2_book/Chapter_9/Simple_Texture2D/Simple_Texture2D.c',
275 '../../third_party/gles2_book/Chapter_9/Simple_Texture2D/Simple_Texture2D.h',
279 'target_name': 'simple_texture_cubemap_ppapi',
280 'type': 'loadable_module',
281 'variables': { 'chromium_code': 0, },
282 'dependencies': [ 'gpu_demo_framework_ppapi', ],
284 '<@(ppp_entrypoints_sources)',
285 'gles2_book/example.h',
286 'gles2_book/demo_simple_texture_cubemap.cc',
287 '../../third_party/gles2_book/Chapter_9/Simple_TextureCubemap/Simple_TextureCubemap.c',
288 '../../third_party/gles2_book/Chapter_9/Simple_TextureCubemap/Simple_TextureCubemap.h',
292 'target_name': 'simple_vertex_shader_ppapi',
293 'type': 'loadable_module',
294 'variables': { 'chromium_code': 0, },
295 'dependencies': [ 'gpu_demo_framework_ppapi', ],
297 '<@(ppp_entrypoints_sources)',
298 'gles2_book/example.h',
299 'gles2_book/demo_simple_vertex_shader.cc',
300 '../../third_party/gles2_book/Chapter_8/Simple_VertexShader/Simple_VertexShader.c',
301 '../../third_party/gles2_book/Chapter_8/Simple_VertexShader/Simple_VertexShader.h',
305 'target_name': 'stencil_test_ppapi',
306 'type': 'loadable_module',
307 'variables': { 'chromium_code': 0, },
308 'dependencies': [ 'gpu_demo_framework_ppapi', ],
310 '<@(ppp_entrypoints_sources)',
311 'gles2_book/example.h',
312 'gles2_book/demo_stencil_test.cc',
313 '../../third_party/gles2_book/Chapter_11/Stencil_Test/Stencil_Test.c',
314 '../../third_party/gles2_book/Chapter_11/Stencil_Test/Stencil_Test.h',
318 'target_name': 'texture_wrap_ppapi',
319 'type': 'loadable_module',
320 'variables': { 'chromium_code': 0, },
321 'dependencies': [ 'gpu_demo_framework_ppapi', ],
323 '<@(ppp_entrypoints_sources)',
324 'gles2_book/example.h',
325 'gles2_book/demo_texture_wrap.cc',
326 '../../third_party/gles2_book/Chapter_9/TextureWrap/TextureWrap.c',
327 '../../third_party/gles2_book/Chapter_9/TextureWrap/TextureWrap.h',