Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: gpu/demos/demos.gyp

Issue 552240: Changes necessary to compile gpu demos on linux. It is not functional yet jus... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/common.gypi ('k') | gpu/demos/framework/platform.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 { 5 {
6 'variables': { 6 'variables': {
7 'chromium_code': 1, 7 'chromium_code': 1,
8 'conditions': [
9 # Pepper demos that are compiled as shared libraries need to be compiled
10 # with -fPIC flag. All static libraries that these demos depend on must
11 # also be compiled with -fPIC flag. Setting GYP_DEFINES="linux_fpic=1"
12 # compiles everything with -fPIC. Disable pepper demos on linux/x64
13 # unless linux_fpic is 1.
14 ['OS=="linux" and (target_arch=="x64" or target_arch=="arm") and linux_fpi c!=1', {
15 'enable_pepper_demos%': 0,
16 }, {
17 'enable_pepper_demos%': 1,
18 }],
19 ],
8 }, 20 },
9 'includes': [ 21 'includes': [
10 '../../build/common.gypi', 22 '../../build/common.gypi',
11 ], 23 ],
12 'targets': [ 24 'targets': [
13 { 25 {
14 'target_name': 'gpu_demo_framework', 26 'target_name': 'gpu_demo_framework',
15 'type': 'static_library', 27 'type': 'static_library',
16 'dependencies': [ 28 'dependencies': [
17 '../../base/base.gyp:base', 29 '../../base/base.gyp:base',
18 ], 30 ],
19 'sources': [ 31 'sources': [
20 'framework/demo.cc', 32 'framework/demo.cc',
21 'framework/demo.h', 33 'framework/demo.h',
22 'framework/demo_factory.h', 34 'framework/demo_factory.h',
23 ], 35 ],
24 }, 36 },
25 { 37 {
26 'target_name': 'gpu_demo_framework_exe', 38 'target_name': 'gpu_demo_framework_exe',
27 'type': 'static_library', 39 'type': 'static_library',
28 'dependencies': [ 40 'dependencies': [
29 'gpu_demo_framework', 41 'gpu_demo_framework',
30 '../gpu.gyp:command_buffer_client', 42 '../gpu.gyp:command_buffer_client',
31 '../gpu.gyp:command_buffer_service', 43 '../gpu.gyp:command_buffer_service',
32 ], 44 ],
33 'all_dependent_settings': {
34 'sources': [
35 'framework/main_exe.cc',
36 ],
37 },
38 'sources': [ 45 'sources': [
39 'framework/platform.h',
40 'framework/window.cc', 46 'framework/window.cc',
41 'framework/window.h', 47 'framework/window.h',
42 ], 48 ],
49 'conditions': [
50 ['OS=="linux"', {'sources': ['framework/window_linux.cc']}],
51 ['OS=="mac"', {'sources': ['framework/window_mac.mm']}],
52 ['OS=="win"', {'sources': ['framework/window_win.cc']}],
53 ],
54 'direct_dependent_settings': {
55 'sources': ['framework/main_exe.cc'],
56 },
43 }, 57 },
44 { 58 {
45 'target_name': 'gpu_demo_framework_pepper', 59 'target_name': 'gpu_demo_framework_pepper',
46 'type': 'static_library', 60 'type': 'static_library',
47 'dependencies': [ 61 'dependencies': [
48 'gpu_demo_framework', 62 'gpu_demo_framework',
49 '../gpu.gyp:pgl', 63 '../gpu.gyp:pgl',
50 ], 64 ],
51 'all_dependent_settings': {
52 'sources': [
53 'framework/main_pepper.cc',
54 'framework/plugin.def',
55 'framework/plugin.rc',
56 ],
57 'run_as': {
58 'action': [
59 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)chrome<(EXECUTABLE_SUFFIX)',
60 '--no-sandbox',
61 '--internal-pepper',
62 '--enable-gpu-plugin',
63 '--load-plugin=$(TargetPath)',
64 'file://$(ProjectDir)pepper_gpu_demo.html',
65 ],
66 },
67 },
68 'sources': [ 65 'sources': [
69 'framework/plugin.cc', 66 'framework/plugin.cc',
70 'framework/plugin.h', 67 'framework/plugin.h',
71 ], 68 ],
69 'direct_dependent_settings': {
70 'sources': [
71 'framework/main_pepper.cc',
72 ],
73 'conditions': [
74 ['OS=="win"', {
75 'sources': [
76 'framework/plugin.def',
77 'framework/plugin.rc',
78 ],
79 'run_as': {
80 'action': [
81 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)chrome<(EXECUTABLE_SUFFIX)',
82 '--no-sandbox',
83 '--internal-pepper',
84 '--enable-gpu-plugin',
85 '--load-plugin=$(TargetPath)',
86 'file://$(ProjectDir)pepper_gpu_demo.html',
87 ],
88 },
89 }],
90 ['OS=="linux"', {
91 # -gstabs, used in the official builds, causes an ICE. Remove it.
92 'cflags!': ['-gstabs'],
93 }],
94 ],
95 },
72 }, 96 },
73 { 97 {
74 'target_name': 'hello_triangle_exe', 98 'target_name': 'hello_triangle_exe',
75 'type': 'executable', 99 'type': 'executable',
76 'dependencies': [ 100 'dependencies': [
77 'gpu_demo_framework_exe', 101 'gpu_demo_framework_exe',
78 '../../third_party/gles2_book/gles2_book.gyp:hello_triangle', 102 '../../third_party/gles2_book/gles2_book.gyp:hello_triangle',
79 ], 103 ],
80 'sources': [ 104 'sources': [
81 'gles2_book/example.h', 105 'gles2_book/example.h',
82 'gles2_book/hello_triangle.cc', 106 'gles2_book/hello_triangle.cc',
83 ], 107 ],
84 }, 108 },
85 { 109 {
86 'target_name': 'hello_triangle_pepper',
87 'type': 'shared_library',
88 'dependencies': [
89 'gpu_demo_framework_pepper',
90 '../../third_party/gles2_book/gles2_book.gyp:hello_triangle',
91 ],
92 'sources': [
93 'gles2_book/example.h',
94 'gles2_book/hello_triangle.cc',
95 ],
96 },
97 {
98 'target_name': 'mip_map_2d_exe', 110 'target_name': 'mip_map_2d_exe',
99 'type': 'executable', 111 'type': 'executable',
100 'dependencies': [ 112 'dependencies': [
101 'gpu_demo_framework_exe', 113 'gpu_demo_framework_exe',
102 '../../third_party/gles2_book/gles2_book.gyp:mip_map_2d', 114 '../../third_party/gles2_book/gles2_book.gyp:mip_map_2d',
103 ], 115 ],
104 'sources': [ 116 'sources': [
105 'gles2_book/example.h', 117 'gles2_book/example.h',
106 'gles2_book/mip_map_2d.cc', 118 'gles2_book/mip_map_2d.cc',
107 ], 119 ],
108 }, 120 },
109 { 121 {
110 'target_name': 'mip_map_2d_pepper',
111 'type': 'shared_library',
112 'dependencies': [
113 'gpu_demo_framework_pepper',
114 '../../third_party/gles2_book/gles2_book.gyp:mip_map_2d',
115 ],
116 'sources': [
117 'gles2_book/example.h',
118 'gles2_book/mip_map_2d.cc',
119 ],
120 },
121 {
122 'target_name': 'simple_texture_2d_exe', 122 'target_name': 'simple_texture_2d_exe',
123 'type': 'executable', 123 'type': 'executable',
124 'dependencies': [ 124 'dependencies': [
125 'gpu_demo_framework_exe', 125 'gpu_demo_framework_exe',
126 '../../third_party/gles2_book/gles2_book.gyp:simple_texture_2d', 126 '../../third_party/gles2_book/gles2_book.gyp:simple_texture_2d',
127 ], 127 ],
128 'sources': [ 128 'sources': [
129 'gles2_book/example.h', 129 'gles2_book/example.h',
130 'gles2_book/simple_texture_2d.cc', 130 'gles2_book/simple_texture_2d.cc',
131 ], 131 ],
132 }, 132 },
133 { 133 {
134 'target_name': 'simple_texture_2d_pepper',
135 'type': 'shared_library',
136 'dependencies': [
137 'gpu_demo_framework_pepper',
138 '../../third_party/gles2_book/gles2_book.gyp:simple_texture_2d',
139 ],
140 'sources': [
141 'gles2_book/example.h',
142 'gles2_book/simple_texture_2d.cc',
143 ],
144 },
145 {
146 'target_name': 'simple_texture_cubemap_exe', 134 'target_name': 'simple_texture_cubemap_exe',
147 'type': 'executable', 135 'type': 'executable',
148 'dependencies': [ 136 'dependencies': [
149 'gpu_demo_framework_exe', 137 'gpu_demo_framework_exe',
150 '../../third_party/gles2_book/gles2_book.gyp:simple_texture_cubemap', 138 '../../third_party/gles2_book/gles2_book.gyp:simple_texture_cubemap',
151 ], 139 ],
152 'sources': [ 140 'sources': [
153 'gles2_book/example.h', 141 'gles2_book/example.h',
154 'gles2_book/simple_texture_cubemap.cc', 142 'gles2_book/simple_texture_cubemap.cc',
155 ], 143 ],
156 }, 144 },
157 { 145 {
158 'target_name': 'simple_texture_cubemap_pepper',
159 'type': 'shared_library',
160 'dependencies': [
161 'gpu_demo_framework_pepper',
162 '../../third_party/gles2_book/gles2_book.gyp:simple_texture_cubemap',
163 ],
164 'sources': [
165 'gles2_book/example.h',
166 'gles2_book/simple_texture_cubemap.cc',
167 ],
168 },
169 {
170 'target_name': 'simple_vertex_shader_exe', 146 'target_name': 'simple_vertex_shader_exe',
171 'type': 'executable', 147 'type': 'executable',
172 'dependencies': [ 148 'dependencies': [
173 'gpu_demo_framework_exe', 149 'gpu_demo_framework_exe',
174 '../../third_party/gles2_book/gles2_book.gyp:simple_vertex_shader', 150 '../../third_party/gles2_book/gles2_book.gyp:simple_vertex_shader',
175 ], 151 ],
176 'sources': [ 152 'sources': [
177 'gles2_book/example.h', 153 'gles2_book/example.h',
178 'gles2_book/simple_vertex_shader.cc', 154 'gles2_book/simple_vertex_shader.cc',
179 ], 155 ],
180 }, 156 },
181 { 157 {
182 'target_name': 'simple_vertex_shader_pepper',
183 'type': 'shared_library',
184 'dependencies': [
185 'gpu_demo_framework_pepper',
186 '../../third_party/gles2_book/gles2_book.gyp:simple_vertex_shader',
187 ],
188 'sources': [
189 'gles2_book/example.h',
190 'gles2_book/simple_vertex_shader.cc',
191 ],
192 },
193 {
194 'target_name': 'stencil_test_exe', 158 'target_name': 'stencil_test_exe',
195 'type': 'executable', 159 'type': 'executable',
196 'dependencies': [ 160 'dependencies': [
197 'gpu_demo_framework_exe', 161 'gpu_demo_framework_exe',
198 '../../third_party/gles2_book/gles2_book.gyp:stencil_test', 162 '../../third_party/gles2_book/gles2_book.gyp:stencil_test',
199 ], 163 ],
200 'sources': [ 164 'sources': [
201 'gles2_book/example.h', 165 'gles2_book/example.h',
202 'gles2_book/stencil_test.cc', 166 'gles2_book/stencil_test.cc',
203 ], 167 ],
204 }, 168 },
205 { 169 {
206 'target_name': 'stencil_test_pepper',
207 'type': 'shared_library',
208 'dependencies': [
209 'gpu_demo_framework_pepper',
210 '../../third_party/gles2_book/gles2_book.gyp:stencil_test',
211 ],
212 'sources': [
213 'gles2_book/example.h',
214 'gles2_book/stencil_test.cc',
215 ],
216 },
217 {
218 'target_name': 'texture_wrap_exe', 170 'target_name': 'texture_wrap_exe',
219 'type': 'executable', 171 'type': 'executable',
220 'dependencies': [ 172 'dependencies': [
221 'gpu_demo_framework_exe', 173 'gpu_demo_framework_exe',
222 '../../third_party/gles2_book/gles2_book.gyp:texture_wrap', 174 '../../third_party/gles2_book/gles2_book.gyp:texture_wrap',
223 ], 175 ],
224 'sources': [ 176 'sources': [
225 'gles2_book/example.h', 177 'gles2_book/example.h',
226 'gles2_book/texture_wrap.cc', 178 'gles2_book/texture_wrap.cc',
227 ], 179 ],
228 }, 180 },
229 { 181 ],
230 'target_name': 'texture_wrap_pepper', 182 'conditions': [
231 'type': 'shared_library', 183 ['enable_pepper_demos==1', {
232 'dependencies': [ 184 'targets': [
233 'gpu_demo_framework_pepper', 185 {
234 '../../third_party/gles2_book/gles2_book.gyp:texture_wrap', 186 'target_name': 'hello_triangle_pepper',
187 'type': 'shared_library',
188 'dependencies': [
189 'gpu_demo_framework_pepper',
190 '../../third_party/gles2_book/gles2_book.gyp:hello_triangle',
191 ],
192 'sources': [
193 'gles2_book/example.h',
194 'gles2_book/hello_triangle.cc',
195 ],
196 },
197 {
198 'target_name': 'mip_map_2d_pepper',
199 'type': 'shared_library',
200 'dependencies': [
201 'gpu_demo_framework_pepper',
202 '../../third_party/gles2_book/gles2_book.gyp:mip_map_2d',
203 ],
204 'sources': [
205 'gles2_book/example.h',
206 'gles2_book/mip_map_2d.cc',
207 ],
208 },
209 {
210 'target_name': 'simple_texture_2d_pepper',
211 'type': 'shared_library',
212 'dependencies': [
213 'gpu_demo_framework_pepper',
214 '../../third_party/gles2_book/gles2_book.gyp:simple_texture_2d',
215 ],
216 'sources': [
217 'gles2_book/example.h',
218 'gles2_book/simple_texture_2d.cc',
219 ],
220 },
221 {
222 'target_name': 'simple_texture_cubemap_pepper',
223 'type': 'shared_library',
224 'dependencies': [
225 'gpu_demo_framework_pepper',
226 '../../third_party/gles2_book/gles2_book.gyp:simple_texture_cubemap' ,
227 ],
228 'sources': [
229 'gles2_book/example.h',
230 'gles2_book/simple_texture_cubemap.cc',
231 ],
232 },
233 {
234 'target_name': 'simple_vertex_shader_pepper',
235 'type': 'shared_library',
236 'dependencies': [
237 'gpu_demo_framework_pepper',
238 '../../third_party/gles2_book/gles2_book.gyp:simple_vertex_shader',
239 ],
240 'sources': [
241 'gles2_book/example.h',
242 'gles2_book/simple_vertex_shader.cc',
243 ],
244 },
245 {
246 'target_name': 'stencil_test_pepper',
247 'type': 'shared_library',
248 'dependencies': [
249 'gpu_demo_framework_pepper',
250 '../../third_party/gles2_book/gles2_book.gyp:stencil_test',
251 ],
252 'sources': [
253 'gles2_book/example.h',
254 'gles2_book/stencil_test.cc',
255 ],
256 },
257 {
258 'target_name': 'texture_wrap_pepper',
259 'type': 'shared_library',
260 'dependencies': [
261 'gpu_demo_framework_pepper',
262 '../../third_party/gles2_book/gles2_book.gyp:texture_wrap',
263 ],
264 'sources': [
265 'gles2_book/example.h',
266 'gles2_book/texture_wrap.cc',
267 ],
268 },
235 ], 269 ],
236 'sources': [ 270 }],
237 'gles2_book/example.h', 271 ],
238 'gles2_book/texture_wrap.cc',
239 ],
240 },
241 ]
242 } 272 }
243 273
244 # Local Variables: 274 # Local Variables:
245 # tab-width:2 275 # tab-width:2
246 # indent-tabs-mode:nil 276 # indent-tabs-mode:nil
247 # End: 277 # End:
248 # vim: set expandtab tabstop=2 shiftwidth=2: 278 # vim: set expandtab tabstop=2 shiftwidth=2:
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | gpu/demos/framework/platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698