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

Side by Side Diff: ppapi/BUILD.gn

Issue 2289983002: Remove PPAPI gyp files. (Closed)
Patch Set: visibility Created 4 years, 3 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
« no previous file with comments | « chrome/test/data/nacl/BUILD.gn ('k') | ppapi/c/BUILD.gn » ('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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 import("//build/config/features.gni") 5 import("//build/config/features.gni")
6 import("//build/config/features.gni")
7 import("//build/config/nacl/config.gni")
8 import("//build/config/nacl/rules.gni")
9 import("//testing/test.gni")
10 if (is_mac) {
11 import("//build/config/mac/rules.gni")
12 }
6 13
7 assert(!is_android || enable_plugins, 14 assert(!is_android || enable_plugins,
8 "//ppapi should not be referenced when is_android && !enable_plugins") 15 "//ppapi should not be referenced when is_android && !enable_plugins")
9 16
10 if (is_mac) { 17 # Test files shared between several targets below.
11 import("//build/config/mac/rules.gni") 18 #
12 } 19 # TODO(brettw) it seems like it should be possible to factor this in a source
20 # set that is shared in such a way that these only need to be referenced once.
21 test_common_source_files = [
22 "lib/gl/gles2/gl2ext_ppapi.c",
23 "lib/gl/gles2/gl2ext_ppapi.h",
24 "lib/gl/gles2/gles2.c",
25 "tests/all_c_includes.h",
26 "tests/all_cpp_includes.h",
27 "tests/arch_dependent_sizes_32.h",
28 "tests/arch_dependent_sizes_64.h",
29 "tests/pp_thread.h",
30 "tests/test_audio.cc",
31 "tests/test_audio.h",
32 "tests/test_audio_config.cc",
33 "tests/test_audio_config.h",
34 "tests/test_audio_encoder.cc",
35 "tests/test_audio_encoder.h",
36 "tests/test_case.cc",
37 "tests/test_case.h",
38 "tests/test_compositor.cc",
39 "tests/test_compositor.h",
40 "tests/test_console.cc",
41 "tests/test_console.h",
42 "tests/test_core.cc",
43 "tests/test_core.h",
44 "tests/test_cursor_control.cc",
45 "tests/test_cursor_control.h",
46 "tests/test_empty.cc",
47 "tests/test_empty.h",
48 "tests/test_file_io.cc",
49 "tests/test_file_io.h",
50 "tests/test_file_ref.cc",
51 "tests/test_file_ref.h",
52 "tests/test_file_system.cc",
53 "tests/test_file_system.h",
54 "tests/test_fullscreen.cc",
55 "tests/test_fullscreen.h",
56 "tests/test_graphics_2d.cc",
57 "tests/test_graphics_2d.h",
58 "tests/test_graphics_3d.cc",
59 "tests/test_graphics_3d.h",
60 "tests/test_host_resolver.cc",
61 "tests/test_host_resolver.h",
62 "tests/test_host_resolver_private.cc",
63 "tests/test_host_resolver_private.h",
64 "tests/test_host_resolver_private_disallowed.cc",
65 "tests/test_host_resolver_private_disallowed.h",
66 "tests/test_image_data.cc",
67 "tests/test_image_data.h",
68 "tests/test_ime_input_event.cc",
69 "tests/test_ime_input_event.h",
70 "tests/test_input_event.cc",
71 "tests/test_input_event.h",
72 "tests/test_media_stream_audio_track.cc",
73 "tests/test_media_stream_audio_track.h",
74 "tests/test_media_stream_video_track.cc",
75 "tests/test_media_stream_video_track.h",
76 "tests/test_memory.cc",
77 "tests/test_memory.h",
78 "tests/test_message_handler.cc",
79 "tests/test_message_handler.h",
80 "tests/test_message_loop.cc",
81 "tests/test_message_loop.h",
82 "tests/test_mouse_cursor.cc",
83 "tests/test_mouse_cursor.h",
84 "tests/test_mouse_lock.cc",
85 "tests/test_mouse_lock.h",
86 "tests/test_net_address.cc",
87 "tests/test_net_address.h",
88 "tests/test_net_address_private_untrusted.cc",
89 "tests/test_net_address_private_untrusted.h",
90 "tests/test_network_monitor.cc",
91 "tests/test_network_monitor.h",
92 "tests/test_network_proxy.cc",
93 "tests/test_network_proxy.h",
94 "tests/test_output_protection_private.cc",
95 "tests/test_output_protection_private.h",
96 "tests/test_paint_aggregator.cc",
97 "tests/test_paint_aggregator.h",
98 "tests/test_post_message.cc",
99 "tests/test_post_message.h",
100 "tests/test_printing.cc",
101 "tests/test_printing.h",
102 "tests/test_tcp_server_socket_private.cc",
103 "tests/test_tcp_server_socket_private.h",
104 "tests/test_tcp_socket.cc",
105 "tests/test_tcp_socket.h",
106 "tests/test_tcp_socket_private.cc",
107 "tests/test_tcp_socket_private.h",
108 "tests/test_test_internals.cc",
109 "tests/test_test_internals.h",
110 "tests/test_trace_event.cc",
111 "tests/test_trace_event.h",
112 "tests/test_truetype_font.cc",
113 "tests/test_truetype_font.h",
114 "tests/test_udp_socket.cc",
115 "tests/test_udp_socket.h",
116 "tests/test_udp_socket_private.cc",
117 "tests/test_udp_socket_private.h",
118 "tests/test_uma.cc",
119 "tests/test_uma.h",
120 "tests/test_url_loader.cc",
121 "tests/test_url_loader.h",
122 "tests/test_url_request.cc",
123 "tests/test_url_request.h",
124 "tests/test_utils.cc",
125 "tests/test_var.cc",
126 "tests/test_var.h",
127 "tests/test_var_resource.cc",
128 "tests/test_var_resource.h",
129 "tests/test_video_decoder.cc",
130 "tests/test_video_decoder.h",
131 "tests/test_video_destination.cc",
132 "tests/test_video_destination.h",
133 "tests/test_video_encoder.cc",
134 "tests/test_video_encoder.h",
135 "tests/test_video_source.cc",
136 "tests/test_video_source.h",
137 "tests/test_view.cc",
138 "tests/test_view.h",
139 "tests/test_websocket.cc",
140 "tests/test_websocket.h",
141 "tests/testing_instance.cc",
142 "tests/testing_instance.h",
143
144 # Compile-time tests
145 "tests/test_c_includes.c",
146 "tests/test_cpp_includes.cc",
147 "tests/test_struct_sizes.c",
148 ]
13 149
14 copy("copy_test_files") { 150 copy("copy_test_files") {
15 visibility = [ ":*" ] 151 visibility = [ ":*" ]
16 sources = [ 152 sources = [
17 # Keep "test_case.html.mock-http-headers" with "test_case.html". 153 # Keep "test_case.html.mock-http-headers" with "test_case.html".
18 "tests/test_case.html", 154 "tests/test_case.html",
19 "tests/test_case.html.mock-http-headers", 155 "tests/test_case.html.mock-http-headers",
20 "tests/test_page.css", 156 "tests/test_page.css",
21 "tests/test_page.css.mock-http-headers", 157 "tests/test_page.css.mock-http-headers",
22 ] 158 ]
23 outputs = [ 159 outputs = [
24 "$root_out_dir/{{source_file_part}}", 160 "$root_out_dir/{{source_file_part}}",
25 ] 161 ]
26 } 162 }
27 163
28 copy("copy_test_files2") { 164 copy("copy_test_files2") {
29 visibility = [ ":*" ] 165 visibility = [ ":*" ]
30 sources = [ 166 sources = [
31 "tests/test_url_loader_data/hello.txt", 167 "tests/test_url_loader_data/hello.txt",
32 ] 168 ]
33 outputs = [ 169 outputs = [
34 "$root_out_dir/test_url_loader_data/{{source_file_part}}", 170 "$root_out_dir/test_url_loader_data/{{source_file_part}}",
35 ] 171 ]
36 } 172 }
37 173
38 import("//build/config/features.gni") 174 source_set("ppapi_tests_sources") {
39 import("//build/config/nacl/config.gni") 175 sources = test_common_source_files
40 import("//build/config/nacl/rules.gni") 176 sources += [
41 import("//ppapi/ppapi_sources.gni") 177 "tests/test_broker.cc",
42 import("//testing/test.gni") 178 "tests/test_broker.h",
179 "tests/test_browser_font.cc",
180 "tests/test_browser_font.h",
181 "tests/test_buffer.cc",
182 "tests/test_buffer.h",
183 "tests/test_char_set.cc",
184 "tests/test_char_set.h",
185 "tests/test_crypto.cc",
186 "tests/test_crypto.h",
187 "tests/test_file_chooser.cc",
188 "tests/test_file_chooser.h",
189 "tests/test_flash.cc",
190 "tests/test_flash.h",
191 "tests/test_flash_clipboard.cc",
192 "tests/test_flash_clipboard.h",
193 "tests/test_flash_drm.cc",
194 "tests/test_flash_drm.h",
195 "tests/test_flash_file.cc",
196 "tests/test_flash_file.h",
197 "tests/test_flash_fullscreen.cc",
198 "tests/test_flash_fullscreen.h",
199 "tests/test_flash_fullscreen_for_browser_ui.cc",
200 "tests/test_flash_fullscreen_for_browser_ui.h",
201 "tests/test_flash_message_loop.cc",
202 "tests/test_flash_message_loop.h",
203 "tests/test_net_address_private.cc",
204 "tests/test_net_address_private.h",
205 "tests/test_pdf.cc",
206 "tests/test_pdf.h",
207 "tests/test_platform_verification_private.cc",
208 "tests/test_platform_verification_private.h",
209 "tests/test_tcp_socket_private_trusted.cc",
210 "tests/test_tcp_socket_private_trusted.h",
211 "tests/test_url_util.cc",
212 "tests/test_url_util.h",
213 "tests/test_utils.h",
214 "tests/test_video_decoder_dev.cc",
215 "tests/test_video_decoder_dev.h",
216 "tests/test_x509_certificate_private.cc",
217 "tests/test_x509_certificate_private.h",
43 218
44 source_set("ppapi_tests_sources") { 219 # Deprecated test cases.
45 sources = ppapi_sources.test_common_source_files + 220 "tests/test_instance_deprecated.cc",
46 ppapi_sources.test_trusted_source_files 221 "tests/test_instance_deprecated.h",
222 "tests/test_var_deprecated.cc",
223 "tests/test_var_deprecated.h",
224 ]
47 225
48 configs += [ 226 configs += [
49 "//build/config:precompiled_headers", 227 "//build/config:precompiled_headers",
50 "//v8:external_startup_data", 228 "//v8:external_startup_data",
51 ] 229 ]
52 230
53 defines = [ "GL_GLEXT_PROTOTYPES" ] 231 defines = [ "GL_GLEXT_PROTOTYPES" ]
54 include_dirs = [ "lib/gl/include" ] 232 include_dirs = [ "lib/gl/include" ]
55 233
56 deps = [ 234 deps = [
57 ":copy_test_files", 235 ":copy_test_files",
58 ":copy_test_files2", 236 ":copy_test_files2",
59 "//build/config/sanitizers:deps", 237 "//build/config/sanitizers:deps",
60 "//ppapi/cpp", 238 "//ppapi/cpp",
61 "//ppapi/shared_impl", 239 "//ppapi/shared_impl",
62 ] 240 ]
63 } 241 }
64 242
65 if (!is_mac) { 243 if (is_mac) {
66 shared_library("ppapi_tests") { 244 ppapi_tests_target_type = "mac_plugin_bundle"
67 deps = [
68 ":ppapi_tests_sources",
69 ]
70 }
71 } else { 245 } else {
72 mac_plugin_bundle("ppapi_tests") { 246 ppapi_tests_target_type = "shared_library"
73 deps = [ 247 }
74 ":ppapi_tests_sources", 248 target(ppapi_tests_target_type, "ppapi_tests") {
75 ] 249 deps = [
76 } 250 ":ppapi_tests_sources",
251 ]
77 } 252 }
78 253
79 source_set("power_saver_test_plugin_sources") { 254 source_set("power_saver_test_plugin_sources") {
80 sources = [ 255 sources = [
81 "tests/power_saver_test_plugin.cc", 256 "tests/power_saver_test_plugin.cc",
82 "tests/test_utils.cc", 257 "tests/test_utils.cc",
83 ] 258 ]
84 259
85 deps = [ 260 deps = [
86 "//build/config/sanitizers:deps", 261 "//build/config/sanitizers:deps",
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 "tools/pepper_hash_for_uma.cc", 409 "tools/pepper_hash_for_uma.cc",
235 ] 410 ]
236 411
237 deps = [ 412 deps = [
238 "//base", 413 "//base",
239 "//build/config/sanitizers:deps", 414 "//build/config/sanitizers:deps",
240 "//build/win:default_exe_manifest", 415 "//build/win:default_exe_manifest",
241 ] 416 ]
242 } 417 }
243 418
244 if (is_nacl_glibc) {
245 shared_library("ppapi_cpp_lib") {
246 # When using gcc, we hide all symbols by default, but that breaks at
247 # link time as the test executable requires symbols defined in the
248 # shared library.
249 configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
250 configs += [ "//build/config/gcc:symbol_visibility_default" ]
251
252 sources = ppapi_sources.cpp_source_files
253 sources += [
254 "cpp/module_embedder.h",
255 "cpp/ppp_entrypoints.cc",
256 ]
257 cflags = [ "-fPIC" ]
258 deps = [
259 "//build/config/nacl:nacl_base",
260 ]
261 }
262 } else {
263 static_library("ppapi_cpp_lib") {
264 # This library is distributed as a part of the SDK and as such has to
265 # be a static library rather than a source set.
266 sources = ppapi_sources.cpp_source_files
267 sources += [
268 "cpp/module_embedder.h",
269 "cpp/ppp_entrypoints.cc",
270 ]
271 deps = [
272 "//build/config/nacl:nacl_base",
273 ]
274 }
275 }
276
277 source_set("ppapi_gles2_lib") { 419 source_set("ppapi_gles2_lib") {
278 include_dirs = [ "lib/gl/include" ] 420 include_dirs = [ "lib/gl/include" ]
279 sources = [ 421 sources = [
280 "lib/gl/gles2/gl2ext_ppapi.c", 422 "lib/gl/gles2/gl2ext_ppapi.c",
281 "lib/gl/gles2/gl2ext_ppapi.h", 423 "lib/gl/gles2/gl2ext_ppapi.h",
282 "lib/gl/gles2/gles2.c", 424 "lib/gl/gles2/gles2.c",
283 ] 425 ]
284 deps = [ 426 deps = [
285 "//ppapi/cpp", 427 "//ppapi/cpp",
286 ] 428 ]
287 } 429 }
288 430
289 if (enable_nacl) { 431 if (enable_nacl) {
290 import("//ppapi/native_client/nacl_test_data.gni") 432 import("//ppapi/native_client/nacl_test_data.gni")
291 433
292 if (is_nacl) { 434 if (is_nacl) {
293 nacl_test_data("ppapi_nacl_tests") { 435 nacl_test_data("ppapi_nacl_tests") {
294 include_dirs = [ "lib/gl/include" ] 436 include_dirs = [ "lib/gl/include" ]
295 sources = ppapi_sources.test_common_source_files + 437 sources = test_common_source_files
296 ppapi_sources.test_nacl_source_files 438
439 sources += [
440 "tests/test_nacl_irt_stack_alignment.cc",
441 "tests/test_nacl_irt_stack_alignment.h",
442 "tests/test_tcp_server_socket_private_disallowed.cc",
443 "tests/test_tcp_socket_private_disallowed.cc",
444 "tests/test_udp_socket_private_disallowed.cc",
445 ]
446
297 defines = [ 447 defines = [
298 "GL_GLEXT_PROTOTYPES", 448 "GL_GLEXT_PROTOTYPES",
299 "PPAPI_TEST_IMPLEMENTATION", 449 "PPAPI_TEST_IMPLEMENTATION",
300 ] 450 ]
301 deps = [ 451 deps = [
302 ":ppapi_cpp_lib", 452 "//ppapi/cpp",
303 ] 453 ]
304 if (current_cpu == "pnacl") { 454 if (current_cpu == "pnacl") {
305 pretranslate_pexe = true 455 pretranslate_pexe = true
306 } 456 }
307 } 457 }
308 } 458 }
309 459
310 group("ppapi_nacl_tests_all") { 460 group("ppapi_nacl_tests_all") {
311 data_deps = [ 461 data_deps = [
312 ":copy_test_files", 462 ":copy_test_files",
313 ":ppapi_nacl_tests(//build/toolchain/nacl:clang_newlib_${target_cpu})", 463 ":ppapi_nacl_tests(//build/toolchain/nacl:clang_newlib_${target_cpu})",
314 ":ppapi_nacl_tests(//build/toolchain/nacl:newlib_pnacl)", 464 ":ppapi_nacl_tests(//build/toolchain/nacl:newlib_pnacl)",
315 ] 465 ]
316 466
317 if (target_cpu != "mipsel") { 467 if (target_cpu != "mipsel") {
318 data_deps += 468 data_deps +=
319 [ ":ppapi_nacl_tests(//build/toolchain/nacl:glibc_${target_cpu})" ] 469 [ ":ppapi_nacl_tests(//build/toolchain/nacl:glibc_${target_cpu})" ]
320 } 470 }
321 471
322 if (is_linux && enable_nacl_nonsfi) { 472 if (is_linux && enable_nacl_nonsfi) {
323 data_deps += 473 data_deps +=
324 [ ":ppapi_nacl_tests(//build/toolchain/nacl:newlib_pnacl_nonsfi)" ] 474 [ ":ppapi_nacl_tests(//build/toolchain/nacl:newlib_pnacl_nonsfi)" ]
325 } 475 }
326 } 476 }
327 } 477 }
OLDNEW
« no previous file with comments | « chrome/test/data/nacl/BUILD.gn ('k') | ppapi/c/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698