[email protected] | 5287c9b | 2011-04-11 22:40:03 | [diff] [blame] | 1 | # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
[email protected] | b42370e | 2011-01-22 01:13:09 | [diff] [blame] | 2 | # 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] | 7a1f7c6f | 2011-05-10 21:17:48 | [diff] [blame] | 10 | 'ppapi.gyp:ppapi_cpp' |
[email protected] | b42370e | 2011-01-22 01:13:09 | [diff] [blame] | 11 | ], |
| 12 | 'xcode_settings': { |
| 13 | 'INFOPLIST_FILE': 'example/Info.plist', |
| 14 | }, |
| 15 | 'sources': [ |
| 16 | 'example/example.cc', |
| 17 | ], |
| 18 | 'conditions': [ |
| 19 | ['OS=="win"', { |
[email protected] | b42370e | 2011-01-22 01:13:09 | [diff] [blame] | 20 | 'type': 'shared_library', |
[email protected] | b42370e | 2011-01-22 01:13:09 | [diff] [blame] | 21 | '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] | 6a654d45 | 2011-05-23 22:06:54 | [diff] [blame] | 32 | ['os_posix == 1 and OS != "mac"', { |
[email protected] | b42370e | 2011-01-22 01:13:09 | [diff] [blame] | 33 | '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] | b42370e | 2011-01-22 01:13:09 | [diff] [blame] | 60 | { |
| 61 | 'target_name': 'ppapi_tests', |
| 62 | 'type': 'loadable_module', |
[email protected] | d44d52b8 | 2011-09-02 16:31:39 | [diff] [blame] | 63 | 'include_dirs': [ |
| 64 | 'lib/gl/include', |
| 65 | ], |
[email protected] | b42370e | 2011-01-22 01:13:09 | [diff] [blame] | 66 | 'sources': [ |
[email protected] | 7091950 | 2011-12-16 02:30:03 | [diff] [blame] | 67 | '<@(test_common_source_files)', |
| 68 | '<@(test_trusted_source_files)', |
[email protected] | b42370e | 2011-01-22 01:13:09 | [diff] [blame] | 69 | ], |
| 70 | 'dependencies': [ |
[email protected] | 794d83cd | 2011-10-20 19:09:20 | [diff] [blame] | 71 | 'ppapi.gyp:ppapi_cpp', |
| 72 | 'ppapi_internal.gyp:ppapi_shared', |
[email protected] | b42370e | 2011-01-22 01:13:09 | [diff] [blame] | 73 | ], |
[email protected] | 190d41f | 2011-08-30 15:58:48 | [diff] [blame] | 74 | 'run_as': { |
| 75 | 'action': [ |
| 76 | '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)chrome<(EXECUTABLE_SUFFIX)', |
| 77 | '--enable-pepper-testing', |
| 78 | '--enable-accelerated-plugins', |
| 79 | '--register-pepper-plugins=$(TargetPath);application/x-ppapi-tests', |
| 80 | 'file://$(ProjectDir)/tests/test_case.html?testcase=', |
| 81 | ], |
| 82 | }, |
[email protected] | b42370e | 2011-01-22 01:13:09 | [diff] [blame] | 83 | 'conditions': [ |
| 84 | ['OS=="win"', { |
| 85 | 'defines': [ |
| 86 | '_CRT_SECURE_NO_DEPRECATE', |
| 87 | '_CRT_NONSTDC_NO_WARNINGS', |
| 88 | '_CRT_NONSTDC_NO_DEPRECATE', |
| 89 | '_SCL_SECURE_NO_DEPRECATE', |
| 90 | ], |
| 91 | }], |
| 92 | ['OS=="mac"', { |
| 93 | 'mac_bundle': 1, |
| 94 | 'product_name': 'ppapi_tests', |
| 95 | 'product_extension': 'plugin', |
| 96 | }], |
[email protected] | a026daa | 2011-04-20 15:49:51 | [diff] [blame] | 97 | ['p2p_apis==1', { |
| 98 | 'sources': [ |
| 99 | 'tests/test_transport.cc', |
| 100 | 'tests/test_transport.h', |
| 101 | ], |
| 102 | }], |
[email protected] | b42370e | 2011-01-22 01:13:09 | [diff] [blame] | 103 | ], |
| 104 | # TODO(dmichael): Figure out what is wrong with the script on Windows and add |
| 105 | # it as an automated action. |
| 106 | # 'actions': [ |
| 107 | # { |
| 108 | # 'action_name': 'generate_ppapi_include_tests', |
| 109 | # 'inputs': [], |
| 110 | # 'outputs': [ |
| 111 | # 'tests/test_c_includes.c', |
| 112 | # 'tests/test_cc_includes.cc', |
| 113 | # ], |
| 114 | # 'action': [ |
| 115 | # '<!@(python generate_ppapi_include_tests.py)', |
| 116 | # ], |
| 117 | # }, |
| 118 | # ], |
| 119 | }, |
| 120 | { |
| 121 | 'target_name': 'ppapi_unittests', |
| 122 | 'type': 'executable', |
| 123 | 'variables': { |
| 124 | 'chromium_code': 1, |
| 125 | }, |
[email protected] | b42370e | 2011-01-22 01:13:09 | [diff] [blame] | 126 | 'dependencies': [ |
| 127 | 'ppapi_proxy', |
[email protected] | f0a04c4 | 2011-08-26 22:43:20 | [diff] [blame] | 128 | 'ppapi_shared', |
[email protected] | b42370e | 2011-01-22 01:13:09 | [diff] [blame] | 129 | '../base/base.gyp:test_support_base', |
[email protected] | f0a04c4 | 2011-08-26 22:43:20 | [diff] [blame] | 130 | '../gpu/gpu.gyp:gpu_ipc', |
| 131 | '../ipc/ipc.gyp:ipc', |
[email protected] | b42370e | 2011-01-22 01:13:09 | [diff] [blame] | 132 | '../ipc/ipc.gyp:test_support_ipc', |
| 133 | '../testing/gmock.gyp:gmock', |
| 134 | '../testing/gtest.gyp:gtest', |
[email protected] | 7a1f7c6f | 2011-05-10 21:17:48 | [diff] [blame] | 135 | '../ui/gfx/surface/surface.gyp:surface', |
[email protected] | b42370e | 2011-01-22 01:13:09 | [diff] [blame] | 136 | ], |
| 137 | 'sources': [ |
| 138 | 'proxy/run_all_unittests.cc', |
| 139 | |
[email protected] | f24448db | 2011-01-27 20:40:39 | [diff] [blame] | 140 | 'proxy/mock_resource.cc', |
| 141 | 'proxy/mock_resource.h', |
[email protected] | 465faa2 | 2011-02-08 16:31:46 | [diff] [blame] | 142 | 'proxy/plugin_dispatcher_unittest.cc', |
[email protected] | f24448db | 2011-01-27 20:40:39 | [diff] [blame] | 143 | 'proxy/plugin_resource_tracker_unittest.cc', |
[email protected] | b42370e | 2011-01-22 01:13:09 | [diff] [blame] | 144 | 'proxy/plugin_var_tracker_unittest.cc', |
[email protected] | f24448db | 2011-01-27 20:40:39 | [diff] [blame] | 145 | 'proxy/ppapi_proxy_test.cc', |
| 146 | 'proxy/ppapi_proxy_test.h', |
[email protected] | b20df1c | 2011-08-03 14:38:24 | [diff] [blame] | 147 | 'proxy/ppb_var_unittest.cc', |
[email protected] | 725c051 | 2011-09-23 20:01:21 | [diff] [blame] | 148 | 'proxy/ppp_instance_private_proxy_unittest.cc', |
| 149 | 'proxy/ppp_instance_proxy_unittest.cc', |
| 150 | 'proxy/ppp_messaging_proxy_unittest.cc', |
[email protected] | f24448db | 2011-01-27 20:40:39 | [diff] [blame] | 151 | 'proxy/serialized_var_unittest.cc', |
[email protected] | 7f8b26b | 2011-08-18 15:41:01 | [diff] [blame] | 152 | 'shared_impl/resource_tracker_unittest.cc', |
[email protected] | 794d83cd | 2011-10-20 19:09:20 | [diff] [blame] | 153 | 'shared_impl/test_globals.cc', |
| 154 | 'shared_impl/test_globals.h', |
[email protected] | bbc4912 | 2011-12-29 20:16:50 | [diff] [blame^] | 155 | 'shared_impl/tracked_callback_unittest.cc', |
[email protected] | e0c18c7 | 2011-12-16 07:09:59 | [diff] [blame] | 156 | 'shared_impl/var_tracker_unittest.cc', |
[email protected] | b42370e | 2011-01-22 01:13:09 | [diff] [blame] | 157 | ], |
[email protected] | f24448db | 2011-01-27 20:40:39 | [diff] [blame] | 158 | }, |
[email protected] | ea8bc98 | 2011-10-15 23:16:16 | [diff] [blame] | 159 | { |
| 160 | 'target_name': 'ppapi_example_skeleton', |
| 161 | 'suppress_wildcard': 1, |
| 162 | 'type': 'none', |
| 163 | 'direct_dependent_settings': { |
| 164 | 'product_name': '>(_target_name)', |
| 165 | 'conditions': [ |
[email protected] | c48aef9 | 2011-11-22 23:41:45 | [diff] [blame] | 166 | ['os_posix==1 and OS!="mac"', { |
[email protected] | ea8bc98 | 2011-10-15 23:16:16 | [diff] [blame] | 167 | 'cflags': ['-fvisibility=hidden'], |
| 168 | 'type': 'shared_library', |
| 169 | # -gstabs, used in the official builds, causes an ICE. Simply remove |
| 170 | # it. |
| 171 | 'cflags!': ['-gstabs'], |
| 172 | }], |
| 173 | ['OS=="win"', { |
| 174 | 'type': 'shared_library', |
| 175 | }], |
| 176 | ['OS=="mac"', { |
| 177 | 'type': 'loadable_module', |
[email protected] | 1d6919c | 2011-11-14 19:29:01 | [diff] [blame] | 178 | 'mac_bundle': 1, |
| 179 | 'product_extension': 'plugin', |
| 180 | 'xcode_settings': { |
| 181 | 'OTHER_LDFLAGS': [ |
| 182 | # Not to strip important symbols by -Wl,-dead_strip. |
| 183 | '-Wl,-exported_symbol,_PPP_GetInterface', |
| 184 | '-Wl,-exported_symbol,_PPP_InitializeModule', |
| 185 | '-Wl,-exported_symbol,_PPP_ShutdownModule' |
| 186 | ]}, |
[email protected] | ea8bc98 | 2011-10-15 23:16:16 | [diff] [blame] | 187 | }], |
| 188 | ], |
| 189 | }, |
| 190 | }, |
| 191 | { |
| 192 | 'target_name': 'ppapi_example_mouse_lock', |
| 193 | 'dependencies': [ |
| 194 | 'ppapi_example_skeleton', |
| 195 | 'ppapi.gyp:ppapi_cpp', |
| 196 | ], |
| 197 | 'sources': [ |
| 198 | 'examples/mouse_lock/mouse_lock.cc', |
| 199 | ], |
| 200 | }, |
[email protected] | 532e568 | 2011-06-20 02:17:37 | [diff] [blame] | 201 | |
[email protected] | 1d6919c | 2011-11-14 19:29:01 | [diff] [blame] | 202 | { |
| 203 | 'target_name': 'ppapi_example_c_stub', |
| 204 | 'dependencies': [ |
| 205 | 'ppapi_example_skeleton', |
| 206 | 'ppapi.gyp:ppapi_c', |
[email protected] | 532e568 | 2011-06-20 02:17:37 | [diff] [blame] | 207 | ], |
[email protected] | 1d6919c | 2011-11-14 19:29:01 | [diff] [blame] | 208 | 'sources': [ |
| 209 | 'examples/stub/stub.c', |
| 210 | ], |
| 211 | }, |
| 212 | { |
| 213 | 'target_name': 'ppapi_example_cc_stub', |
| 214 | 'dependencies': [ |
| 215 | 'ppapi_example_skeleton', |
| 216 | 'ppapi.gyp:ppapi_cpp', |
| 217 | ], |
| 218 | 'sources': [ |
| 219 | 'examples/stub/stub.cc', |
| 220 | ], |
| 221 | }, |
| 222 | { |
| 223 | 'target_name': 'ppapi_example_audio', |
| 224 | 'dependencies': [ |
| 225 | 'ppapi_example_skeleton', |
| 226 | 'ppapi.gyp:ppapi_cpp', |
| 227 | ], |
| 228 | 'sources': [ |
| 229 | 'examples/audio/audio.cc', |
| 230 | ], |
| 231 | }, |
| 232 | { |
[email protected] | 89f9d2de | 2011-11-25 23:55:29 | [diff] [blame] | 233 | 'target_name': 'ppapi_example_audio_input', |
| 234 | 'dependencies': [ |
| 235 | 'ppapi_example_skeleton', |
| 236 | 'ppapi.gyp:ppapi_cpp', |
| 237 | ], |
| 238 | 'sources': [ |
| 239 | 'examples/audio_input/audio_input.cc', |
| 240 | ], |
| 241 | }, |
| 242 | { |
[email protected] | 1d6919c | 2011-11-14 19:29:01 | [diff] [blame] | 243 | 'target_name': 'ppapi_example_file_chooser', |
| 244 | 'dependencies': [ |
| 245 | 'ppapi_example_skeleton', |
| 246 | 'ppapi.gyp:ppapi_cpp', |
| 247 | ], |
| 248 | 'sources': [ |
| 249 | 'examples/file_chooser/file_chooser.cc', |
| 250 | ], |
| 251 | }, |
| 252 | { |
| 253 | 'target_name': 'ppapi_example_graphics_2d', |
| 254 | 'dependencies': [ |
| 255 | 'ppapi_example_skeleton', |
| 256 | 'ppapi.gyp:ppapi_c', |
| 257 | ], |
| 258 | 'sources': [ |
| 259 | 'examples/2d/graphics_2d_example.c', |
| 260 | ], |
| 261 | }, |
| 262 | { |
| 263 | 'target_name': 'ppapi_example_ime', |
| 264 | 'dependencies': [ |
| 265 | 'ppapi_example_skeleton', |
| 266 | 'ppapi.gyp:ppapi_cpp', |
| 267 | ], |
| 268 | 'sources': [ |
| 269 | 'examples/ime/ime.cc', |
| 270 | ], |
| 271 | }, |
| 272 | { |
| 273 | 'target_name': 'ppapi_example_paint_manager', |
| 274 | 'dependencies': [ |
| 275 | 'ppapi_example_skeleton', |
| 276 | 'ppapi.gyp:ppapi_cpp', |
| 277 | ], |
| 278 | 'sources': [ |
| 279 | 'examples/2d/paint_manager_example.cc', |
| 280 | ], |
| 281 | }, |
| 282 | { |
| 283 | 'target_name': 'ppapi_example_post_message', |
| 284 | 'dependencies': [ |
| 285 | 'ppapi_example_skeleton', |
| 286 | 'ppapi.gyp:ppapi_cpp', |
| 287 | ], |
| 288 | 'sources': [ |
| 289 | 'examples/scripting/post_message.cc', |
| 290 | ], |
| 291 | }, |
| 292 | { |
| 293 | 'target_name': 'ppapi_example_scroll', |
| 294 | 'dependencies': [ |
| 295 | 'ppapi_example_skeleton', |
| 296 | 'ppapi.gyp:ppapi_cpp', |
| 297 | ], |
| 298 | 'sources': [ |
| 299 | 'examples/2d/scroll.cc', |
| 300 | ], |
| 301 | }, |
| 302 | { |
| 303 | 'target_name': 'ppapi_example_simple_font', |
| 304 | 'dependencies': [ |
| 305 | 'ppapi_example_skeleton', |
| 306 | 'ppapi.gyp:ppapi_cpp', |
| 307 | ], |
| 308 | 'sources': [ |
| 309 | 'examples/font/simple_font.cc', |
| 310 | ], |
| 311 | }, |
| 312 | { |
| 313 | 'target_name': 'ppapi_example_url_loader', |
| 314 | 'dependencies': [ |
| 315 | 'ppapi_example_skeleton', |
| 316 | 'ppapi.gyp:ppapi_cpp', |
| 317 | ], |
| 318 | 'sources': [ |
| 319 | 'examples/url_loader/streaming.cc', |
| 320 | ], |
| 321 | }, |
| 322 | { |
| 323 | 'target_name': 'ppapi_example_gles2', |
| 324 | 'dependencies': [ |
| 325 | 'ppapi_example_skeleton', |
| 326 | 'ppapi.gyp:ppapi_cpp', |
| 327 | 'ppapi.gyp:ppapi_gles2', |
| 328 | 'ppapi.gyp:ppapi_egl', |
| 329 | ], |
| 330 | 'include_dirs': [ |
| 331 | 'lib/gl/include', |
| 332 | ], |
| 333 | 'sources': [ |
| 334 | 'examples/gles2/gles2.cc', |
| 335 | 'examples/gles2/testdata.h', |
| 336 | ], |
| 337 | }, |
| 338 | { |
| 339 | 'target_name': 'ppapi_example_vc', |
| 340 | 'dependencies': [ |
| 341 | 'ppapi_example_skeleton', |
| 342 | 'ppapi.gyp:ppapi_cpp', |
| 343 | 'ppapi.gyp:ppapi_gles2', |
| 344 | 'ppapi.gyp:ppapi_egl', |
| 345 | ], |
| 346 | 'include_dirs': [ |
| 347 | 'lib/gl/include', |
| 348 | ], |
| 349 | 'sources': [ |
| 350 | 'examples/video_capture/video_capture.cc', |
| 351 | ], |
| 352 | }, |
| 353 | ], |
[email protected] | b42370e | 2011-01-22 01:13:09 | [diff] [blame] | 354 | } |