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 '--register-pepper-plugins='
98 '<(PRODUCT_DIR)/$(PRODUCT_NAME).plugin;'
99 'pepper-application/x-gpu-demo',
100 'file://$(SOURCE_ROOT)/pepper_gpu_demo.html',
104 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)chrome<(EXECUTABLE_SUFFIX)',
105 '--register-pepper-plugins=$(TargetPath);'
106 'pepper-application/x-gpu-demo',
107 'file://$(ProjectDir)pepper_gpu_demo.html',
113 ['os_posix == 1 and OS != "mac"', {
114 # -gstabs, used in the official builds, causes an ICE. Remove it.
115 'cflags!': ['-gstabs'],
119 'product_extension': 'plugin',
125 'target_name': 'hello_triangle_exe',
126 'type': 'executable',
128 'gpu_demo_framework_exe',
129 '../../third_party/gles2_book/gles2_book.gyp:hello_triangle',
132 'gles2_book/example.h',
133 'gles2_book/demo_hello_triangle.cc',
137 'target_name': 'mip_map_2d_exe',
138 'type': 'executable',
140 'gpu_demo_framework_exe',
141 '../../third_party/gles2_book/gles2_book.gyp:mip_map_2d',
144 'gles2_book/example.h',
145 'gles2_book/demo_mip_map_2d.cc',
149 'target_name': 'simple_texture_2d_exe',
150 'type': 'executable',
152 'gpu_demo_framework_exe',
153 '../../third_party/gles2_book/gles2_book.gyp:simple_texture_2d',
156 'gles2_book/example.h',
157 'gles2_book/demo_simple_texture_2d.cc',
161 'target_name': 'simple_texture_cubemap_exe',
162 'type': 'executable',
164 'gpu_demo_framework_exe',
165 '../../third_party/gles2_book/gles2_book.gyp:simple_texture_cubemap',
168 'gles2_book/example.h',
169 'gles2_book/demo_simple_texture_cubemap.cc',
173 'target_name': 'simple_vertex_shader_exe',
174 'type': 'executable',
176 'gpu_demo_framework_exe',
177 '../../third_party/gles2_book/gles2_book.gyp:simple_vertex_shader',
180 'gles2_book/example.h',
181 'gles2_book/demo_simple_vertex_shader.cc',
185 'target_name': 'stencil_test_exe',
186 'type': 'executable',
188 'gpu_demo_framework_exe',
189 '../../third_party/gles2_book/gles2_book.gyp:stencil_test',
192 'gles2_book/example.h',
193 'gles2_book/demo_stencil_test.cc',
197 'target_name': 'texture_wrap_exe',
198 'type': 'executable',
200 'gpu_demo_framework_exe',
201 '../../third_party/gles2_book/gles2_book.gyp:texture_wrap',
204 'gles2_book/example.h',
205 'gles2_book/demo_texture_wrap.cc',
209 'target_name': 'compressed_textures_exe',
210 'type': 'executable',
212 'gpu_demo_framework_exe',
213 '../../third_party/gles2_book/gles2_book.gyp:es_util',
216 'compressed_textures/compressed_textures.cc',
220 'target_name': 'occlusion_query_exe',
221 'type': 'executable',
223 'gpu_demo_framework_exe',
224 '../../third_party/gles2_book/gles2_book.gyp:es_util',
227 'GL_GLEXT_PROTOTYPES',
230 'occlusion_query/occlusion_query.cc',
235 ['enable_pepper_demos==1', {
238 'target_name': 'hello_triangle_ppapi',
239 'type': 'loadable_module',
240 'variables': { 'chromium_code': 0, },
241 'dependencies': [ 'gpu_demo_framework_ppapi', ],
243 '<@(ppp_entrypoints_sources)',
244 'gles2_book/example.h',
245 'gles2_book/demo_hello_triangle.cc',
246 '../../third_party/gles2_book/Chapter_2/Hello_Triangle/Hello_Triangle.c',
247 '../../third_party/gles2_book/Chapter_2/Hello_Triangle/Hello_Triangle.h',
251 'target_name': 'mip_map_2d_ppapi',
252 'type': 'loadable_module',
253 'variables': { 'chromium_code': 0, },
254 'dependencies': [ 'gpu_demo_framework_ppapi', ],
256 '<@(ppp_entrypoints_sources)',
257 'gles2_book/example.h',
258 'gles2_book/demo_mip_map_2d.cc',
259 '../../third_party/gles2_book/Chapter_9/MipMap2D/MipMap2D.c',
260 '../../third_party/gles2_book/Chapter_9/MipMap2D/MipMap2D.h',
264 'target_name': 'simple_texture_2d_ppapi',
265 'type': 'loadable_module',
266 'variables': { 'chromium_code': 0, },
267 'dependencies': [ 'gpu_demo_framework_ppapi', ],
269 '<@(ppp_entrypoints_sources)',
270 'gles2_book/example.h',
271 'gles2_book/demo_simple_texture_2d.cc',
272 '../../third_party/gles2_book/Chapter_9/Simple_Texture2D/Simple_Texture2D.c',
273 '../../third_party/gles2_book/Chapter_9/Simple_Texture2D/Simple_Texture2D.h',
277 'target_name': 'simple_texture_cubemap_ppapi',
278 'type': 'loadable_module',
279 'variables': { 'chromium_code': 0, },
280 'dependencies': [ 'gpu_demo_framework_ppapi', ],
282 '<@(ppp_entrypoints_sources)',
283 'gles2_book/example.h',
284 'gles2_book/demo_simple_texture_cubemap.cc',
285 '../../third_party/gles2_book/Chapter_9/Simple_TextureCubemap/Simple_TextureCubemap.c',
286 '../../third_party/gles2_book/Chapter_9/Simple_TextureCubemap/Simple_TextureCubemap.h',
290 'target_name': 'simple_vertex_shader_ppapi',
291 'type': 'loadable_module',
292 'variables': { 'chromium_code': 0, },
293 'dependencies': [ 'gpu_demo_framework_ppapi', ],
295 '<@(ppp_entrypoints_sources)',
296 'gles2_book/example.h',
297 'gles2_book/demo_simple_vertex_shader.cc',
298 '../../third_party/gles2_book/Chapter_8/Simple_VertexShader/Simple_VertexShader.c',
299 '../../third_party/gles2_book/Chapter_8/Simple_VertexShader/Simple_VertexShader.h',
303 'target_name': 'stencil_test_ppapi',
304 'type': 'loadable_module',
305 'variables': { 'chromium_code': 0, },
306 'dependencies': [ 'gpu_demo_framework_ppapi', ],
308 '<@(ppp_entrypoints_sources)',
309 'gles2_book/example.h',
310 'gles2_book/demo_stencil_test.cc',
311 '../../third_party/gles2_book/Chapter_11/Stencil_Test/Stencil_Test.c',
312 '../../third_party/gles2_book/Chapter_11/Stencil_Test/Stencil_Test.h',
316 'target_name': 'texture_wrap_ppapi',
317 'type': 'loadable_module',
318 'variables': { 'chromium_code': 0, },
319 'dependencies': [ 'gpu_demo_framework_ppapi', ],
321 '<@(ppp_entrypoints_sources)',
322 'gles2_book/example.h',
323 'gles2_book/demo_texture_wrap.cc',
324 '../../third_party/gles2_book/Chapter_9/TextureWrap/TextureWrap.c',
325 '../../third_party/gles2_book/Chapter_9/TextureWrap/TextureWrap.h',