blob: 1f889b44eb33f98d66ae8ee04656704ed200b2f0 [file] [log] [blame]
[email protected]5287c9b2011-04-11 22:40:031# Copyright (c) 2011 The Chromium Authors. All rights reserved.
[email protected]b42370e2011-01-22 01:13:092# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5{
6 'targets': [
7 {
8 'target_name': 'ppapi_example',
9 'dependencies': [
[email protected]7a1f7c6f2011-05-10 21:17:4810 'ppapi.gyp:ppapi_cpp'
[email protected]b42370e2011-01-22 01:13:0911 ],
12 'xcode_settings': {
13 'INFOPLIST_FILE': 'example/Info.plist',
14 },
15 'sources': [
16 'example/example.cc',
17 ],
18 'conditions': [
19 ['OS=="win"', {
[email protected]b42370e2011-01-22 01:13:0920 'type': 'shared_library',
[email protected]b42370e2011-01-22 01:13:0921 'sources': [
22 'example/example.rc',
23 ],
24 'run_as': {
25 'action': [
26 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)chrome<(EXECUTABLE_SUFFIX)',
27 '--register-pepper-plugins=$(TargetPath);application/x-ppapi-example',
28 'file://$(ProjectDir)/example/example.html',
29 ],
30 },
31 }],
[email protected]6a654d452011-05-23 22:06:5432 ['os_posix == 1 and OS != "mac"', {
[email protected]b42370e2011-01-22 01:13:0933 'type': 'shared_library',
34 'cflags': ['-fvisibility=hidden'],
35 # -gstabs, used in the official builds, causes an ICE. Simply remove
36 # it.
37 'cflags!': ['-gstabs'],
38 }],
39 ['OS=="mac"', {
40 'type': 'loadable_module',
41 'mac_bundle': 1,
42 'product_name': 'PPAPIExample',
43 'product_extension': 'plugin',
44 'sources+': [
45 'example/Info.plist'
46 ],
47 }],
48 ],
49 # See README for instructions on how to run and debug on the Mac.
50 #'conditions' : [
51 # ['OS=="mac"', {
52 # 'target_name' : 'Chromium',
53 # 'type' : 'executable',
54 # 'xcode_settings' : {
55 # 'ARGUMENTS' : '--renderer-startup-dialog --internal-pepper --no-sandbox file://${SRCROOT}/test_page.html'
56 # },
57 # }],
58 #],
59 },
[email protected]b42370e2011-01-22 01:13:0960 {
61 'target_name': 'ppapi_tests',
62 'type': 'loadable_module',
[email protected]d44d52b82011-09-02 16:31:3963 'include_dirs': [
64 'lib/gl/include',
65 ],
[email protected]b42370e2011-01-22 01:13:0966 'sources': [
67 # Common test files.
68 'tests/test_case.cc',
69 'tests/test_case.h',
70 'tests/testing_instance.cc',
71 'tests/testing_instance.h',
72
73 # Test cases.
74 'tests/all_c_includes.h',
75 'tests/all_cpp_includes.h',
76 'tests/arch_dependent_sizes_32.h',
77 'tests/arch_dependent_sizes_64.h',
[email protected]5d904b9e2011-08-30 19:38:3178 'tests/pp_thread.h',
[email protected]9815108e2011-05-27 21:50:2879 'tests/test_broker.cc',
80 'tests/test_broker.h',
[email protected]b42370e2011-01-22 01:13:0981 'tests/test_buffer.cc',
82 'tests/test_buffer.h',
83 'tests/test_c_includes.c',
84 'tests/test_char_set.cc',
85 'tests/test_char_set.h',
[email protected]97f706c2011-07-11 20:32:5386 'tests/test_core.cc',
87 'tests/test_core.h',
[email protected]b42370e2011-01-22 01:13:0988 'tests/test_cpp_includes.cc',
[email protected]9815108e2011-05-27 21:50:2889 'tests/test_cursor_control.cc',
90 'tests/test_cursor_control.h',
[email protected]b42370e2011-01-22 01:13:0991 'tests/test_directory_reader.cc',
92 'tests/test_directory_reader.h',
93 'tests/test_file_io.cc',
94 'tests/test_file_io.h',
95 'tests/test_file_ref.cc',
96 'tests/test_file_ref.h',
[email protected]95caad2e2011-02-28 22:17:1597 'tests/test_file_system.cc',
98 'tests/test_file_system.h',
[email protected]b42370e2011-01-22 01:13:0999 'tests/test_graphics_2d.cc',
100 'tests/test_graphics_2d.h',
[email protected]190d41f2011-08-30 15:58:48101 'tests/test_graphics_3d.cc',
102 'tests/test_graphics_3d.h',
[email protected]b42370e2011-01-22 01:13:09103 'tests/test_image_data.cc',
104 'tests/test_image_data.h',
[email protected]14710e222011-07-05 21:37:00105 'tests/test_memory.cc',
106 'tests/test_memory.h',
[email protected]b42370e2011-01-22 01:13:09107 'tests/test_paint_aggregator.cc',
108 'tests/test_paint_aggregator.h',
[email protected]9888f132011-03-23 21:07:15109 'tests/test_post_message.cc',
110 'tests/test_post_message.h',
[email protected]15237942011-07-30 04:24:19111 'tests/test_query_policy.cc',
112 'tests/test_query_policy.h',
[email protected]b42370e2011-01-22 01:13:09113 'tests/test_scrollbar.cc',
114 'tests/test_scrollbar.h',
115 'tests/test_struct_sizes.c',
[email protected]2687f112011-04-29 23:27:21116 'tests/test_uma.cc',
117 'tests/test_uma.h',
[email protected]b42370e2011-01-22 01:13:09118 'tests/test_url_loader.cc',
119 'tests/test_url_loader.h',
120 'tests/test_url_util.cc',
121 'tests/test_url_util.h',
122 'tests/test_utils.cc',
123 'tests/test_utils.h',
[email protected]0925622c2011-06-08 20:22:02124 'tests/test_var.cc',
125 'tests/test_var.h',
[email protected]ef932ed12011-04-14 22:53:39126 'tests/test_video_decoder.cc',
127 'tests/test_video_decoder.h',
[email protected]b42370e2011-01-22 01:13:09128
129 # Deprecated test cases.
130 'tests/test_instance_deprecated.cc',
131 'tests/test_instance_deprecated.h',
132 'tests/test_var_deprecated.cc',
133 'tests/test_var_deprecated.h',
134 ],
135 'dependencies': [
[email protected]7a1f7c6f2011-05-10 21:17:48136 'ppapi.gyp:ppapi_cpp'
[email protected]b42370e2011-01-22 01:13:09137 ],
[email protected]190d41f2011-08-30 15:58:48138 'run_as': {
139 'action': [
140 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)chrome<(EXECUTABLE_SUFFIX)',
141 '--enable-pepper-testing',
142 '--enable-accelerated-plugins',
143 '--register-pepper-plugins=$(TargetPath);application/x-ppapi-tests',
144 'file://$(ProjectDir)/tests/test_case.html?testcase=',
145 ],
146 },
[email protected]b42370e2011-01-22 01:13:09147 'conditions': [
148 ['OS=="win"', {
149 'defines': [
150 '_CRT_SECURE_NO_DEPRECATE',
151 '_CRT_NONSTDC_NO_WARNINGS',
152 '_CRT_NONSTDC_NO_DEPRECATE',
153 '_SCL_SECURE_NO_DEPRECATE',
154 ],
155 }],
156 ['OS=="mac"', {
157 'mac_bundle': 1,
158 'product_name': 'ppapi_tests',
159 'product_extension': 'plugin',
160 }],
[email protected]a026daa2011-04-20 15:49:51161 ['p2p_apis==1', {
162 'sources': [
163 'tests/test_transport.cc',
164 'tests/test_transport.h',
165 ],
166 }],
[email protected]b42370e2011-01-22 01:13:09167 ],
168# TODO(dmichael): Figure out what is wrong with the script on Windows and add
169# it as an automated action.
170# 'actions': [
171# {
172# 'action_name': 'generate_ppapi_include_tests',
173# 'inputs': [],
174# 'outputs': [
175# 'tests/test_c_includes.c',
176# 'tests/test_cc_includes.cc',
177# ],
178# 'action': [
179# '<!@(python generate_ppapi_include_tests.py)',
180# ],
181# },
182# ],
183 },
184 {
185 'target_name': 'ppapi_unittests',
186 'type': 'executable',
187 'variables': {
188 'chromium_code': 1,
189 },
[email protected]b42370e2011-01-22 01:13:09190 'dependencies': [
191 'ppapi_proxy',
[email protected]f0a04c42011-08-26 22:43:20192 'ppapi_shared',
[email protected]b42370e2011-01-22 01:13:09193 '../base/base.gyp:test_support_base',
[email protected]f0a04c42011-08-26 22:43:20194 '../gpu/gpu.gyp:gpu_ipc',
195 '../ipc/ipc.gyp:ipc',
[email protected]b42370e2011-01-22 01:13:09196 '../ipc/ipc.gyp:test_support_ipc',
197 '../testing/gmock.gyp:gmock',
198 '../testing/gtest.gyp:gtest',
[email protected]7a1f7c6f2011-05-10 21:17:48199 '../ui/gfx/surface/surface.gyp:surface',
[email protected]b42370e2011-01-22 01:13:09200 ],
201 'sources': [
202 'proxy/run_all_unittests.cc',
203
[email protected]465faa22011-02-08 16:31:46204 'proxy/host_dispatcher_unittest.cc',
[email protected]f24448db2011-01-27 20:40:39205 'proxy/mock_resource.cc',
206 'proxy/mock_resource.h',
[email protected]465faa22011-02-08 16:31:46207 'proxy/plugin_dispatcher_unittest.cc',
[email protected]f24448db2011-01-27 20:40:39208 'proxy/plugin_resource_tracker_unittest.cc',
[email protected]b42370e2011-01-22 01:13:09209 'proxy/plugin_var_tracker_unittest.cc',
[email protected]f24448db2011-01-27 20:40:39210 'proxy/ppapi_proxy_test.cc',
211 'proxy/ppapi_proxy_test.h',
[email protected]b20df1c2011-08-03 14:38:24212 'proxy/ppb_var_unittest.cc',
[email protected]912f3d6c2011-06-29 18:26:36213 'proxy/ppp_instance_proxy_test.cc',
[email protected]b20df1c2011-08-03 14:38:24214 'proxy/ppp_messaging_proxy_test.cc',
[email protected]f24448db2011-01-27 20:40:39215 'proxy/serialized_var_unittest.cc',
[email protected]7f8b26b2011-08-18 15:41:01216 'shared_impl/resource_tracker_unittest.cc',
[email protected]b42370e2011-01-22 01:13:09217 ],
[email protected]f24448db2011-01-27 20:40:39218 },
[email protected]b42370e2011-01-22 01:13:09219 ],
[email protected]532e5682011-06-20 02:17:37220
221 'conditions': [
[email protected]78df359f2011-06-28 04:02:19222 # NOTE: the PPAPI examples fail to build on mac & windows.
[email protected]532e5682011-06-20 02:17:37223 # http://code.google.com/p/chromium/issues/detail?id=54005 tracks mac.
[email protected]91aa74582011-07-12 14:19:56224 ['OS!="mac"', {
[email protected]532e5682011-06-20 02:17:37225 'targets': [
226 {
[email protected]c64edcc2011-06-21 01:30:32227 'target_name': 'ppapi_example_skeleton',
[email protected]91aa74582011-07-12 14:19:56228 'suppress_wildcard': 1,
[email protected]532e5682011-06-20 02:17:37229 'type': 'none',
230 'direct_dependent_settings': {
231 'product_name': '>(_target_name)',
232 'conditions': [
233 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
234 'cflags': ['-fvisibility=hidden'],
[email protected]c64edcc2011-06-21 01:30:32235 'type': 'shared_library',
[email protected]532e5682011-06-20 02:17:37236 # -gstabs, used in the official builds, causes an ICE. Simply remove
237 # it.
238 'cflags!': ['-gstabs'],
239 }],
240 ['OS=="win"', {
[email protected]c64edcc2011-06-21 01:30:32241 'type': 'shared_library',
[email protected]532e5682011-06-20 02:17:37242 }],
243 ['OS=="mac"', {
[email protected]c64edcc2011-06-21 01:30:32244 'type': 'loadable_module',
[email protected]532e5682011-06-20 02:17:37245 }],
246 ],
247 },
248 },
249 {
[email protected]532e5682011-06-20 02:17:37250 'target_name': 'ppapi_example_c_stub',
251 'dependencies': [
[email protected]c64edcc2011-06-21 01:30:32252 'ppapi_example_skeleton',
253 'ppapi.gyp:ppapi_c',
[email protected]532e5682011-06-20 02:17:37254 ],
255 'sources': [
256 'examples/stub/stub.c',
257 ],
258 },
259 {
260 'target_name': 'ppapi_example_cc_stub',
261 'dependencies': [
[email protected]c64edcc2011-06-21 01:30:32262 'ppapi_example_skeleton',
263 'ppapi.gyp:ppapi_cpp',
[email protected]532e5682011-06-20 02:17:37264 ],
265 'sources': [
266 'examples/stub/stub.cc',
267 ],
268 },
269 {
270 'target_name': 'ppapi_example_audio',
271 'dependencies': [
[email protected]c64edcc2011-06-21 01:30:32272 'ppapi_example_skeleton',
273 'ppapi.gyp:ppapi_cpp',
[email protected]532e5682011-06-20 02:17:37274 ],
275 'sources': [
276 'examples/audio/audio.cc',
277 ],
278 },
279 {
280 'target_name': 'ppapi_example_file_chooser',
281 'dependencies': [
[email protected]c64edcc2011-06-21 01:30:32282 'ppapi_example_skeleton',
283 'ppapi.gyp:ppapi_cpp',
[email protected]532e5682011-06-20 02:17:37284 ],
285 'sources': [
286 'examples/file_chooser/file_chooser.cc',
287 ],
288 },
289 {
290 'target_name': 'ppapi_example_graphics_2d',
291 'dependencies': [
[email protected]c64edcc2011-06-21 01:30:32292 'ppapi_example_skeleton',
293 'ppapi.gyp:ppapi_c',
[email protected]532e5682011-06-20 02:17:37294 ],
295 'sources': [
296 'examples/2d/graphics_2d_example.c',
297 ],
298 },
299 {
300 'target_name': 'ppapi_example_paint_manager',
301 'dependencies': [
[email protected]c64edcc2011-06-21 01:30:32302 'ppapi_example_skeleton',
303 'ppapi.gyp:ppapi_cpp',
[email protected]532e5682011-06-20 02:17:37304 ],
305 'sources': [
306 'examples/2d/paint_manager_example.cc',
307 ],
308 },
309 {
310 'target_name': 'ppapi_example_post_message',
311 'dependencies': [
[email protected]c64edcc2011-06-21 01:30:32312 'ppapi_example_skeleton',
313 'ppapi.gyp:ppapi_cpp',
[email protected]532e5682011-06-20 02:17:37314 ],
315 'sources': [
316 'examples/scripting/post_message.cc',
317 ],
318 },
319 {
320 'target_name': 'ppapi_example_scroll',
321 'dependencies': [
[email protected]c64edcc2011-06-21 01:30:32322 'ppapi_example_skeleton',
323 'ppapi.gyp:ppapi_cpp',
[email protected]532e5682011-06-20 02:17:37324 ],
325 'sources': [
326 'examples/2d/scroll.cc',
327 ],
328 },
329 {
330 'target_name': 'ppapi_example_simple_font',
331 'dependencies': [
[email protected]c64edcc2011-06-21 01:30:32332 'ppapi_example_skeleton',
333 'ppapi.gyp:ppapi_cpp',
[email protected]532e5682011-06-20 02:17:37334 ],
335 'sources': [
336 'examples/font/simple_font.cc',
337 ],
338 },
339 {
[email protected]417d2d1f2011-07-12 18:03:14340 'target_name': 'ppapi_example_url_loader',
341 'dependencies': [
342 'ppapi_example_skeleton',
343 'ppapi.gyp:ppapi_cpp',
344 ],
345 'sources': [
346 'examples/url_loader/streaming.cc',
347 ],
348 },
349 {
[email protected]532e5682011-06-20 02:17:37350 'target_name': 'ppapi_example_gles2',
351 'dependencies': [
[email protected]c64edcc2011-06-21 01:30:32352 'ppapi_example_skeleton',
353 'ppapi.gyp:ppapi_cpp',
[email protected]532e5682011-06-20 02:17:37354 'ppapi.gyp:ppapi_gles2',
[email protected]31176b0b2011-07-01 17:53:39355 'ppapi.gyp:ppapi_egl',
[email protected]532e5682011-06-20 02:17:37356 ],
357 'include_dirs': [
358 'lib/gl/include',
359 ],
360 'sources': [
361 'examples/gles2/gles2.cc',
362 'examples/gles2/testdata.h',
363 ],
364 },
365 ],
366 }]
367 ]
[email protected]b42370e2011-01-22 01:13:09368}