OLD | NEW |
| (Empty) |
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. | |
4 | |
5 { | |
6 'variables': { | |
7 # If any of the linux_link_FOO below are set to 1, then the corresponding | |
8 # target will be linked against the FOO library (either dynamically or | |
9 # statically, depending on the pkg-config files), as opposed to loading the | |
10 # FOO library dynamically with dlopen. | |
11 'linux_link_libgps%': 0, | |
12 'linux_link_libpci%': 0, | |
13 'linux_link_libspeechd%': 0, | |
14 'linux_link_libbrlapi%': 0, | |
15 | |
16 # Used below for the various libraries. In this scope for sharing with GN. | |
17 'libbrlapi_functions': [ | |
18 'brlapi_getHandleSize', | |
19 'brlapi_error_location', | |
20 'brlapi_strerror', | |
21 'brlapi__acceptKeys', | |
22 'brlapi__openConnection', | |
23 'brlapi__closeConnection', | |
24 'brlapi__getDisplaySize', | |
25 'brlapi__enterTtyModeWithPath', | |
26 'brlapi__leaveTtyMode', | |
27 'brlapi__writeDots', | |
28 'brlapi__readKey', | |
29 ], | |
30 'libgio_functions': [ | |
31 'glib_check_version', | |
32 'g_type_init', | |
33 'g_settings_new', | |
34 'g_settings_get_child', | |
35 'g_settings_get_string', | |
36 'g_settings_get_boolean', | |
37 'g_settings_get_int', | |
38 'g_settings_get_strv', | |
39 'g_settings_list_schemas', | |
40 ], | |
41 'libpci_functions': [ | |
42 'pci_alloc', | |
43 'pci_init', | |
44 'pci_cleanup', | |
45 'pci_scan_bus', | |
46 'pci_fill_info', | |
47 'pci_lookup_name', | |
48 ], | |
49 'libudev_functions': [ | |
50 'udev_device_get_action', | |
51 'udev_device_get_devnode', | |
52 'udev_device_get_parent', | |
53 'udev_device_get_parent_with_subsystem_devtype', | |
54 'udev_device_get_property_value', | |
55 'udev_device_get_subsystem', | |
56 'udev_device_get_sysattr_value', | |
57 'udev_device_get_sysname', | |
58 'udev_device_get_syspath', | |
59 'udev_device_new_from_devnum', | |
60 'udev_device_new_from_subsystem_sysname', | |
61 'udev_device_new_from_syspath', | |
62 'udev_device_unref', | |
63 'udev_enumerate_add_match_subsystem', | |
64 'udev_enumerate_get_list_entry', | |
65 'udev_enumerate_new', | |
66 'udev_enumerate_scan_devices', | |
67 'udev_enumerate_unref', | |
68 'udev_list_entry_get_next', | |
69 'udev_list_entry_get_name', | |
70 'udev_monitor_enable_receiving', | |
71 'udev_monitor_filter_add_match_subsystem_devtype', | |
72 'udev_monitor_get_fd', | |
73 'udev_monitor_new_from_netlink', | |
74 'udev_monitor_receive_device', | |
75 'udev_monitor_unref', | |
76 'udev_new', | |
77 'udev_set_log_fn', | |
78 'udev_set_log_priority', | |
79 'udev_unref', | |
80 ], | |
81 }, | |
82 'conditions': [ | |
83 [ 'chromeos==0 and use_ozone==0', { | |
84 # Hide GTK and related dependencies for Chrome OS and Ozone, so they won't
get | |
85 # added back to Chrome OS and Ozone. Don't try to use GTK on Chrome OS and
Ozone. | |
86 'targets': [ | |
87 { | |
88 'target_name': 'atk', | |
89 'type': 'none', | |
90 'conditions': [ | |
91 ['_toolset=="target"', { | |
92 'direct_dependent_settings': { | |
93 'cflags': [ | |
94 '<!@(<(pkg-config) --cflags atk)', | |
95 ], | |
96 'defines': [ | |
97 'ATK_LIB_DIR="<!@(<(pkg-config) --variable=libdir atk)"', | |
98 ], | |
99 }, | |
100 'link_settings': { | |
101 'ldflags': [ | |
102 '<!@(<(pkg-config) --libs-only-L --libs-only-other atk)', | |
103 ], | |
104 'libraries': [ | |
105 '<!@(<(pkg-config) --libs-only-l atk)', | |
106 ], | |
107 }, | |
108 }], | |
109 ], | |
110 }, | |
111 { | |
112 'target_name': 'gdk', | |
113 'type': 'none', | |
114 'conditions': [ | |
115 ['_toolset=="target"', { | |
116 'direct_dependent_settings': { | |
117 'cflags': [ | |
118 '<!@(<(pkg-config) --cflags gdk-2.0)', | |
119 ], | |
120 }, | |
121 'link_settings': { | |
122 'ldflags': [ | |
123 '<!@(<(pkg-config) --libs-only-L --libs-only-other gdk-2.0)', | |
124 ], | |
125 'libraries': [ | |
126 '<!@(<(pkg-config) --libs-only-l gdk-2.0)', | |
127 ], | |
128 }, | |
129 }], | |
130 ], | |
131 }, | |
132 { | |
133 'target_name': 'gtk2', | |
134 'type': 'none', | |
135 'toolsets': ['host', 'target'], | |
136 'variables': { | |
137 # gtk requires gmodule, but it does not list it as a dependency | |
138 # in some misconfigured systems. | |
139 'gtk_packages': 'gmodule-2.0 gtk+-2.0 gthread-2.0', | |
140 }, | |
141 'conditions': [ | |
142 ['_toolset=="target"', { | |
143 'all_dependent_settings': { | |
144 'cflags': [ | |
145 '<!@(<(pkg-config) --cflags <(gtk_packages))', | |
146 ], | |
147 }, | |
148 'link_settings': { | |
149 'ldflags': [ | |
150 '<!@(<(pkg-config) --libs-only-L --libs-only-other <(gtk_packa
ges))', | |
151 ], | |
152 'libraries': [ | |
153 '<!@(<(pkg-config) --libs-only-l <(gtk_packages))', | |
154 ], | |
155 }, | |
156 }, { | |
157 'all_dependent_settings': { | |
158 'cflags': [ | |
159 '<!@(<(pkg-config) --cflags <(gtk_packages))', | |
160 ], | |
161 }, | |
162 'link_settings': { | |
163 'ldflags': [ | |
164 '<!@(<(pkg-config) --libs-only-L --libs-only-other <(gtk_packa
ges))', | |
165 ], | |
166 'libraries': [ | |
167 '<!@(<(pkg-config) --libs-only-l <(gtk_packages))', | |
168 ], | |
169 }, | |
170 }], | |
171 ], | |
172 }, | |
173 { | |
174 'target_name': 'gtkprint2', | |
175 'type': 'none', | |
176 'conditions': [ | |
177 ['_toolset=="target"', { | |
178 'direct_dependent_settings': { | |
179 'cflags': [ | |
180 '<!@(<(pkg-config) --cflags gtk+-unix-print-2.0)', | |
181 ], | |
182 }, | |
183 'link_settings': { | |
184 'ldflags': [ | |
185 '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-unix-p
rint-2.0)', | |
186 ], | |
187 'libraries': [ | |
188 '<!@(<(pkg-config) --libs-only-l gtk+-unix-print-2.0)', | |
189 ], | |
190 }, | |
191 }], | |
192 ], | |
193 }, | |
194 ], # targets | |
195 }], | |
196 [ 'use_x11==1', { | |
197 # Hide X11 and related dependencies when use_x11=0 | |
198 'targets': [ | |
199 { | |
200 'target_name': 'x11', | |
201 'type': 'none', | |
202 'toolsets': ['host', 'target'], | |
203 'conditions': [ | |
204 ['_toolset=="target"', { | |
205 'direct_dependent_settings': { | |
206 'cflags': [ | |
207 '<!@(<(pkg-config) --cflags x11)', | |
208 ], | |
209 }, | |
210 'link_settings': { | |
211 'ldflags': [ | |
212 '<!@(<(pkg-config) --libs-only-L --libs-only-other x11 xi)', | |
213 ], | |
214 'libraries': [ | |
215 '<!@(<(pkg-config) --libs-only-l x11 xi)', | |
216 ], | |
217 }, | |
218 }, { | |
219 'direct_dependent_settings': { | |
220 'cflags': [ | |
221 '<!@(<(pkg-config) --cflags x11)', | |
222 ], | |
223 }, | |
224 'link_settings': { | |
225 'ldflags': [ | |
226 '<!@(<(pkg-config) --libs-only-L --libs-only-other x11 xi)', | |
227 ], | |
228 'libraries': [ | |
229 '<!@(<(pkg-config) --libs-only-l x11 xi)', | |
230 ], | |
231 }, | |
232 }], | |
233 ], | |
234 }, | |
235 { | |
236 'target_name': 'xcursor', | |
237 'type': 'none', | |
238 'direct_dependent_settings': { | |
239 'cflags': [ | |
240 '<!@(<(pkg-config) --cflags xcursor)', | |
241 ], | |
242 }, | |
243 'link_settings': { | |
244 'ldflags': [ | |
245 '<!@(<(pkg-config) --libs-only-L --libs-only-other xcursor)', | |
246 ], | |
247 'libraries': [ | |
248 '<!@(<(pkg-config) --libs-only-l xcursor)', | |
249 ], | |
250 }, | |
251 }, | |
252 { | |
253 'target_name': 'xcomposite', | |
254 'type': 'none', | |
255 'direct_dependent_settings': { | |
256 'cflags': [ | |
257 '<!@(<(pkg-config) --cflags xcomposite)', | |
258 ], | |
259 }, | |
260 'link_settings': { | |
261 'ldflags': [ | |
262 '<!@(<(pkg-config) --libs-only-L --libs-only-other xcomposite)', | |
263 ], | |
264 'libraries': [ | |
265 '<!@(<(pkg-config) --libs-only-l xcomposite)', | |
266 ], | |
267 }, | |
268 }, | |
269 { | |
270 'target_name': 'xdamage', | |
271 'type': 'none', | |
272 'direct_dependent_settings': { | |
273 'cflags': [ | |
274 '<!@(<(pkg-config) --cflags xdamage)', | |
275 ], | |
276 }, | |
277 'link_settings': { | |
278 'ldflags': [ | |
279 '<!@(<(pkg-config) --libs-only-L --libs-only-other xdamage)', | |
280 ], | |
281 'libraries': [ | |
282 '<!@(<(pkg-config) --libs-only-l xdamage)', | |
283 ], | |
284 }, | |
285 }, | |
286 { | |
287 'target_name': 'xext', | |
288 'type': 'none', | |
289 'direct_dependent_settings': { | |
290 'cflags': [ | |
291 '<!@(<(pkg-config) --cflags xext)', | |
292 ], | |
293 }, | |
294 'link_settings': { | |
295 'ldflags': [ | |
296 '<!@(<(pkg-config) --libs-only-L --libs-only-other xext)', | |
297 ], | |
298 'libraries': [ | |
299 '<!@(<(pkg-config) --libs-only-l xext)', | |
300 ], | |
301 }, | |
302 }, | |
303 { | |
304 'target_name': 'xfixes', | |
305 'type': 'none', | |
306 'direct_dependent_settings': { | |
307 'cflags': [ | |
308 '<!@(<(pkg-config) --cflags xfixes)', | |
309 ], | |
310 }, | |
311 'link_settings': { | |
312 'ldflags': [ | |
313 '<!@(<(pkg-config) --libs-only-L --libs-only-other xfixes)', | |
314 ], | |
315 'libraries': [ | |
316 '<!@(<(pkg-config) --libs-only-l xfixes)', | |
317 ], | |
318 }, | |
319 }, | |
320 { | |
321 'target_name': 'xi', | |
322 'type': 'none', | |
323 'direct_dependent_settings': { | |
324 'cflags': [ | |
325 '<!@(<(pkg-config) --cflags xi)', | |
326 ], | |
327 }, | |
328 'link_settings': { | |
329 'ldflags': [ | |
330 '<!@(<(pkg-config) --libs-only-L --libs-only-other xi)', | |
331 ], | |
332 'libraries': [ | |
333 '<!@(<(pkg-config) --libs-only-l xi)', | |
334 ], | |
335 }, | |
336 }, | |
337 { | |
338 'target_name': 'xrandr', | |
339 'type': 'none', | |
340 'toolsets': ['host', 'target'], | |
341 'conditions': [ | |
342 ['_toolset=="target"', { | |
343 'direct_dependent_settings': { | |
344 'cflags': [ | |
345 '<!@(<(pkg-config) --cflags xrandr)', | |
346 ], | |
347 }, | |
348 'link_settings': { | |
349 'ldflags': [ | |
350 '<!@(<(pkg-config) --libs-only-L --libs-only-other xrandr)', | |
351 ], | |
352 'libraries': [ | |
353 '<!@(<(pkg-config) --libs-only-l xrandr)', | |
354 ], | |
355 }, | |
356 }, { | |
357 'direct_dependent_settings': { | |
358 'cflags': [ | |
359 '<!@(<(pkg-config) --cflags xrandr)', | |
360 ], | |
361 }, | |
362 'link_settings': { | |
363 'ldflags': [ | |
364 '<!@(<(pkg-config) --libs-only-L --libs-only-other xrandr)', | |
365 ], | |
366 'libraries': [ | |
367 '<!@(<(pkg-config) --libs-only-l xrandr)', | |
368 ], | |
369 }, | |
370 }], | |
371 ], | |
372 }, | |
373 { | |
374 'target_name': 'xrender', | |
375 'type': 'none', | |
376 'direct_dependent_settings': { | |
377 'cflags': [ | |
378 '<!@(<(pkg-config) --cflags xrender)', | |
379 ], | |
380 }, | |
381 'link_settings': { | |
382 'ldflags': [ | |
383 '<!@(<(pkg-config) --libs-only-L --libs-only-other xrender)', | |
384 ], | |
385 'libraries': [ | |
386 '<!@(<(pkg-config) --libs-only-l xrender)', | |
387 ], | |
388 }, | |
389 }, | |
390 { | |
391 'target_name': 'xtst', | |
392 'type': 'none', | |
393 'toolsets': ['host', 'target'], | |
394 'conditions': [ | |
395 ['_toolset=="target"', { | |
396 'direct_dependent_settings': { | |
397 'cflags': [ | |
398 '<!@(<(pkg-config) --cflags xtst)', | |
399 ], | |
400 }, | |
401 'link_settings': { | |
402 'ldflags': [ | |
403 '<!@(<(pkg-config) --libs-only-L --libs-only-other xtst)', | |
404 ], | |
405 'libraries': [ | |
406 '<!@(<(pkg-config) --libs-only-l xtst)', | |
407 ], | |
408 }, | |
409 }, { | |
410 'direct_dependent_settings': { | |
411 'cflags': [ | |
412 '<!@(<(pkg-config) --cflags xtst)', | |
413 ], | |
414 }, | |
415 'link_settings': { | |
416 'ldflags': [ | |
417 '<!@(<(pkg-config) --libs-only-L --libs-only-other xtst)', | |
418 ], | |
419 'libraries': [ | |
420 '<!@(<(pkg-config) --libs-only-l xtst)', | |
421 ], | |
422 }, | |
423 }] | |
424 ] | |
425 } | |
426 ], # targets | |
427 }], | |
428 ['use_gtk3==1', { | |
429 # Hide GTK3 and related dependencies when use_gtk3==0 because the user | |
430 # might not have the GTK3 headers yet. | |
431 'targets': [ | |
432 { | |
433 'target_name': 'gtk3', | |
434 'type': 'none', | |
435 'toolsets': ['host', 'target'], | |
436 'variables': { | |
437 # gtk requires gmodule, but it does not list it as a dependency | |
438 # in some misconfigured systems. | |
439 'gtk_packages': 'gmodule-2.0 gtk+-3.0 gthread-2.0', | |
440 }, | |
441 'conditions': [ | |
442 ['_toolset=="target"', { | |
443 'all_dependent_settings': { | |
444 'cflags': [ | |
445 '<!@(<(pkg-config) --cflags <(gtk_packages))', | |
446 ], | |
447 }, | |
448 'link_settings': { | |
449 'ldflags': [ | |
450 '<!@(<(pkg-config) --libs-only-L --libs-only-other <(gtk_packa
ges))', | |
451 ], | |
452 'libraries': [ | |
453 '<!@(<(pkg-config) --libs-only-l <(gtk_packages))', | |
454 ], | |
455 }, | |
456 }, { | |
457 'all_dependent_settings': { | |
458 'cflags': [ | |
459 '<!@(<(pkg-config) --cflags <(gtk_packages))', | |
460 ], | |
461 }, | |
462 'link_settings': { | |
463 'ldflags': [ | |
464 '<!@(<(pkg-config) --libs-only-L --libs-only-other <(gtk_packa
ges))', | |
465 ], | |
466 'libraries': [ | |
467 '<!@(<(pkg-config) --libs-only-l <(gtk_packages))', | |
468 ], | |
469 }, | |
470 }], | |
471 ], | |
472 }, | |
473 { | |
474 'target_name': 'gtkprint3', | |
475 'type': 'none', | |
476 'conditions': [ | |
477 ['_toolset=="target"', { | |
478 'direct_dependent_settings': { | |
479 'cflags': [ | |
480 '<!@(<(pkg-config) --cflags gtk+-unix-print-3.0)', | |
481 ], | |
482 }, | |
483 'link_settings': { | |
484 'ldflags': [ | |
485 '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-unix-p
rint-3.0)', | |
486 ], | |
487 'libraries': [ | |
488 '<!@(<(pkg-config) --libs-only-l gtk+-unix-print-3.0)', | |
489 ], | |
490 }, | |
491 }], | |
492 ], | |
493 }, | |
494 ], | |
495 }], | |
496 ['use_x11==1 and chromeos==0', { | |
497 'targets': [ | |
498 { | |
499 'target_name': 'xscrnsaver', | |
500 'type': 'none', | |
501 'direct_dependent_settings': { | |
502 'cflags': [ | |
503 '<!@(<(pkg-config) --cflags xscrnsaver)', | |
504 ], | |
505 }, | |
506 'link_settings': { | |
507 'ldflags': [ | |
508 '<!@(<(pkg-config) --libs-only-L --libs-only-other xscrnsaver)', | |
509 ], | |
510 'libraries': [ | |
511 '<!@(<(pkg-config) --libs-only-l xscrnsaver)', | |
512 ], | |
513 }, | |
514 }, | |
515 ], # targets | |
516 }], | |
517 ['use_evdev_gestures==1', { | |
518 'targets': [ | |
519 { | |
520 'target_name': 'libevdev-cros', | |
521 'type': 'none', | |
522 'direct_dependent_settings': { | |
523 'cflags': [ | |
524 '<!@(<(pkg-config) --cflags libevdev-cros)' | |
525 ], | |
526 }, | |
527 'link_settings': { | |
528 'ldflags': [ | |
529 '<!@(<(pkg-config) --libs-only-L --libs-only-other libevdev-cros)'
, | |
530 ], | |
531 'libraries': [ | |
532 '<!@(<(pkg-config) --libs-only-l libevdev-cros)', | |
533 ], | |
534 }, | |
535 }, | |
536 { | |
537 'target_name': 'libgestures', | |
538 'type': 'none', | |
539 'direct_dependent_settings': { | |
540 'cflags': [ | |
541 '<!@(<(pkg-config) --cflags libgestures)' | |
542 ], | |
543 }, | |
544 'link_settings': { | |
545 'ldflags': [ | |
546 '<!@(<(pkg-config) --libs-only-L --libs-only-other libgestures)', | |
547 ], | |
548 'libraries': [ | |
549 '<!@(<(pkg-config) --libs-only-l libgestures)', | |
550 ], | |
551 }, | |
552 }, | |
553 ], | |
554 }], | |
555 ['use_xkbcommon==1', { | |
556 'targets': [ | |
557 { | |
558 'target_name': 'xkbcommon', | |
559 'type': 'none', | |
560 'direct_dependent_settings': { | |
561 'cflags': [ | |
562 '<!@(<(pkg-config) --cflags xkbcommon)' | |
563 ], | |
564 }, | |
565 'link_settings': { | |
566 'ldflags': [ | |
567 '<!@(<(pkg-config) --libs-only-L --libs-only-other xkbcommon)', | |
568 ], | |
569 'libraries': [ | |
570 '<!@(<(pkg-config) --libs-only-l xkbcommon)', | |
571 ], | |
572 }, | |
573 }, | |
574 ], | |
575 }], | |
576 ['ozone_platform_gbm==1 or chromeos==1', { | |
577 'targets': [ | |
578 { | |
579 'target_name': 'libdrm', | |
580 'type': 'none', | |
581 'direct_dependent_settings': { | |
582 'cflags': [ | |
583 '<!@(<(pkg-config) --cflags libdrm)', | |
584 ], | |
585 }, | |
586 'link_settings': { | |
587 'ldflags': [ | |
588 '<!@(<(pkg-config) --libs-only-L --libs-only-other libdrm)', | |
589 ], | |
590 'libraries': [ | |
591 '<!@(<(pkg-config) --libs-only-l libdrm)', | |
592 ], | |
593 }, | |
594 }, | |
595 ], | |
596 }], | |
597 ['ozone_platform_wayland==1', { | |
598 'targets': [ | |
599 { | |
600 'target_name': 'wayland-egl', | |
601 'type': 'none', | |
602 'direct_dependent_settings': { | |
603 'cflags': [ | |
604 '<!@(<(pkg-config) --cflags wayland-egl)', | |
605 ], | |
606 }, | |
607 'link_settings': { | |
608 'ldflags': [ | |
609 '<!@(<(pkg-config) --libs-only-L --libs-only-other wayland-egl)', | |
610 ], | |
611 'libraries': [ | |
612 '<!@(<(pkg-config) --libs-only-l wayland-egl)', | |
613 ], | |
614 }, | |
615 }, | |
616 ], | |
617 }], | |
618 ['use_udev==1', { | |
619 'targets': [ | |
620 { | |
621 'target_name': 'udev', | |
622 'type': 'static_library', | |
623 'conditions': [ | |
624 ['_toolset=="target"', { | |
625 'include_dirs': [ | |
626 '../..', | |
627 ], | |
628 'hard_dependency': 1, | |
629 'actions': [ | |
630 { | |
631 'variables': { | |
632 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libu
dev0.h', | |
633 'output_cc': '<(INTERMEDIATE_DIR)/libudev0_loader.cc', | |
634 'generator': '../../tools/generate_library_loader/generate_l
ibrary_loader.py', | |
635 }, | |
636 'action_name': 'generate_libudev0_loader', | |
637 'inputs': [ | |
638 '<(generator)', | |
639 ], | |
640 'outputs': [ | |
641 '<(output_h)', | |
642 '<(output_cc)', | |
643 ], | |
644 'action': ['python', | |
645 '<(generator)', | |
646 '--name', 'LibUdev0Loader', | |
647 '--output-h', '<(output_h)', | |
648 '--output-cc', '<(output_cc)', | |
649 '--header', '"third_party/libudev/libudev0.h"', | |
650 '--link-directly=0', | |
651 '<@(libudev_functions)', | |
652 ], | |
653 'message': 'Generating libudev0 library loader', | |
654 'process_outputs_as_sources': 1, | |
655 }, | |
656 { | |
657 'variables': { | |
658 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libu
dev1.h', | |
659 'output_cc': '<(INTERMEDIATE_DIR)/libudev1_loader.cc', | |
660 'generator': '../../tools/generate_library_loader/generate_l
ibrary_loader.py', | |
661 }, | |
662 'action_name': 'generate_libudev1_loader', | |
663 'inputs': [ | |
664 '<(generator)', | |
665 ], | |
666 'outputs': [ | |
667 '<(output_h)', | |
668 '<(output_cc)', | |
669 ], | |
670 'action': ['python', | |
671 '<(generator)', | |
672 '--name', 'LibUdev1Loader', | |
673 '--output-h', '<(output_h)', | |
674 '--output-cc', '<(output_cc)', | |
675 '--header', '"third_party/libudev/libudev1.h"', | |
676 '--link-directly=0', | |
677 '<@(libudev_functions)', | |
678 ], | |
679 'message': 'Generating libudev1 library loader', | |
680 'process_outputs_as_sources': 1, | |
681 }, | |
682 ], | |
683 }], | |
684 ], | |
685 }, | |
686 ], | |
687 }], | |
688 ['use_libpci==1', { | |
689 'targets': [ | |
690 { | |
691 'target_name': 'libpci', | |
692 'type': 'static_library', | |
693 'cflags': [ | |
694 '<!@(<(pkg-config) --cflags libpci)', | |
695 ], | |
696 'direct_dependent_settings': { | |
697 'include_dirs': [ | |
698 '<(SHARED_INTERMEDIATE_DIR)', | |
699 ], | |
700 'conditions': [ | |
701 ['linux_link_libpci==1', { | |
702 'link_settings': { | |
703 'ldflags': [ | |
704 '<!@(<(pkg-config) --libs-only-L --libs-only-other libpci)', | |
705 ], | |
706 'libraries': [ | |
707 '<!@(<(pkg-config) --libs-only-l libpci)', | |
708 ], | |
709 } | |
710 }], | |
711 ], | |
712 }, | |
713 'include_dirs': [ | |
714 '../..', | |
715 ], | |
716 'hard_dependency': 1, | |
717 'actions': [ | |
718 { | |
719 'variables': { | |
720 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libpci.h
', | |
721 'output_cc': '<(INTERMEDIATE_DIR)/libpci_loader.cc', | |
722 'generator': '../../tools/generate_library_loader/generate_libra
ry_loader.py', | |
723 }, | |
724 'action_name': 'generate_libpci_loader', | |
725 'inputs': [ | |
726 '<(generator)', | |
727 ], | |
728 'outputs': [ | |
729 '<(output_h)', | |
730 '<(output_cc)', | |
731 ], | |
732 'action': ['python', | |
733 '<(generator)', | |
734 '--name', 'LibPciLoader', | |
735 '--output-h', '<(output_h)', | |
736 '--output-cc', '<(output_cc)', | |
737 '--header', '<pci/pci.h>', | |
738 # TODO(phajdan.jr): Report problem to pciutils project | |
739 # and get it fixed so that we don't need --use-extern-c
. | |
740 '--use-extern-c', | |
741 '--link-directly=<(linux_link_libpci)', | |
742 '<@(libpci_functions)', | |
743 ], | |
744 'message': 'Generating libpci library loader', | |
745 'process_outputs_as_sources': 1, | |
746 }, | |
747 ], | |
748 }, | |
749 ], | |
750 }], | |
751 ], # conditions | |
752 'targets': [ | |
753 { | |
754 'target_name': 'dbus', | |
755 'type': 'none', | |
756 'direct_dependent_settings': { | |
757 'cflags': [ | |
758 '<!@(<(pkg-config) --cflags dbus-1)', | |
759 ], | |
760 }, | |
761 'link_settings': { | |
762 'ldflags': [ | |
763 '<!@(<(pkg-config) --libs-only-L --libs-only-other dbus-1)', | |
764 ], | |
765 'libraries': [ | |
766 '<!@(<(pkg-config) --libs-only-l dbus-1)', | |
767 ], | |
768 }, | |
769 }, | |
770 { | |
771 'target_name': 'fontconfig', | |
772 'type': 'none', | |
773 'conditions': [ | |
774 ['_toolset=="target"', { | |
775 'conditions': [ | |
776 ['use_system_fontconfig==1', { | |
777 'direct_dependent_settings': { | |
778 'cflags': [ | |
779 '<!@(<(pkg-config) --cflags fontconfig)', | |
780 ], | |
781 }, | |
782 'link_settings': { | |
783 'ldflags': [ | |
784 '<!@(<(pkg-config) --libs-only-L --libs-only-other fontconfig)
', | |
785 ], | |
786 'libraries': [ | |
787 '<!@(<(pkg-config) --libs-only-l fontconfig)', | |
788 ], | |
789 }, | |
790 }, { # use_system_fontconfig==0 | |
791 'dependencies': [ | |
792 '../../third_party/fontconfig/fontconfig.gyp:fontconfig', | |
793 ], | |
794 'export_dependent_settings' : [ | |
795 '../../third_party/fontconfig/fontconfig.gyp:fontconfig', | |
796 ], | |
797 }], | |
798 ], | |
799 }], | |
800 ], | |
801 }, | |
802 { | |
803 'target_name': 'freetype2', | |
804 'type': 'none', | |
805 'conditions': [ | |
806 ['chromecast==1', { | |
807 'dependencies': [ | |
808 '../../third_party/freetype-android/freetype.gyp:ft2', | |
809 ], | |
810 'export_dependent_settings' : [ | |
811 '../../third_party/freetype-android/freetype.gyp:ft2', | |
812 ], | |
813 }, '_toolset=="target"', { | |
814 'direct_dependent_settings': { | |
815 'cflags': [ | |
816 '<!@(<(pkg-config) --cflags freetype2)', | |
817 ], | |
818 }, | |
819 'link_settings': { | |
820 'ldflags': [ | |
821 '<!@(<(pkg-config) --libs-only-L --libs-only-other freetype2)', | |
822 ], | |
823 'libraries': [ | |
824 '<!@(<(pkg-config) --libs-only-l freetype2)', | |
825 ], | |
826 }, | |
827 }], | |
828 ], | |
829 }, | |
830 { | |
831 'target_name': 'gconf', | |
832 'type': 'none', | |
833 'conditions': [ | |
834 ['use_gconf==1 and _toolset=="target"', { | |
835 'direct_dependent_settings': { | |
836 'cflags': [ | |
837 '<!@(<(pkg-config) --cflags gconf-2.0)', | |
838 ], | |
839 'defines': [ | |
840 'USE_GCONF', | |
841 ], | |
842 }, | |
843 'link_settings': { | |
844 'ldflags': [ | |
845 '<!@(<(pkg-config) --libs-only-L --libs-only-other gconf-2.0)', | |
846 ], | |
847 'libraries': [ | |
848 '<!@(<(pkg-config) --libs-only-l gconf-2.0)', | |
849 ], | |
850 }, | |
851 }], | |
852 ], | |
853 }, | |
854 { | |
855 'target_name': 'gio', | |
856 'type': 'static_library', | |
857 'conditions': [ | |
858 ['use_gio==1 and _toolset=="target"', { | |
859 'cflags': [ | |
860 '<!@(<(pkg-config) --cflags gio-2.0)', | |
861 ], | |
862 'variables': { | |
863 'gio_warning_define': [ | |
864 # glib >=2.40 deprecate g_settings_list_schemas in favor of | |
865 # g_settings_schema_source_list_schemas. This function is not | |
866 # available on earlier versions that we still need to support | |
867 # (specifically, 2.32), so disable the warning. | |
868 # TODO(mgiuca): Remove this suppression (and variable) when we | |
869 # drop support for Ubuntu 13.10 (saucy) and earlier. Update the | |
870 # code to use g_settings_schema_source_list_schemas instead. | |
871 'GLIB_DISABLE_DEPRECATION_WARNINGS', | |
872 ], | |
873 }, | |
874 'defines': [ | |
875 '<(gio_warning_define)', | |
876 ], | |
877 'direct_dependent_settings': { | |
878 'cflags': [ | |
879 '<!@(<(pkg-config) --cflags gio-2.0)', | |
880 ], | |
881 'defines': [ | |
882 'USE_GIO', | |
883 '<(gio_warning_define)', | |
884 ], | |
885 'include_dirs': [ | |
886 '<(SHARED_INTERMEDIATE_DIR)', | |
887 ], | |
888 }, | |
889 'include_dirs': [ | |
890 '../..', | |
891 ], | |
892 'link_settings': { | |
893 'ldflags': [ | |
894 '<!@(<(pkg-config) --libs-only-L --libs-only-other gio-2.0)', | |
895 ], | |
896 'libraries': [ | |
897 '<!@(<(pkg-config) --libs-only-l gio-2.0)', | |
898 ], | |
899 'conditions': [ | |
900 ['linux_link_gsettings==0 and OS=="linux"', { | |
901 'libraries': [ | |
902 '-ldl', | |
903 ], | |
904 }], | |
905 ], | |
906 }, | |
907 'hard_dependency': 1, | |
908 'actions': [ | |
909 { | |
910 'variables': { | |
911 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libgio.h
', | |
912 'output_cc': '<(INTERMEDIATE_DIR)/libgio_loader.cc', | |
913 'generator': '../../tools/generate_library_loader/generate_libra
ry_loader.py', | |
914 }, | |
915 'action_name': 'generate_libgio_loader', | |
916 'inputs': [ | |
917 '<(generator)', | |
918 ], | |
919 'outputs': [ | |
920 '<(output_h)', | |
921 '<(output_cc)', | |
922 ], | |
923 'action': ['python', | |
924 '<(generator)', | |
925 '--name', 'LibGioLoader', | |
926 '--output-h', '<(output_h)', | |
927 '--output-cc', '<(output_cc)', | |
928 '--header', '<gio/gio.h>', | |
929 '--link-directly=<(linux_link_gsettings)', | |
930 '<@(libgio_functions)', | |
931 ], | |
932 'message': 'Generating libgio library loader', | |
933 'process_outputs_as_sources': 1, | |
934 }, | |
935 ], | |
936 }], | |
937 ], | |
938 }, | |
939 { | |
940 'target_name': 'glib', | |
941 'type': 'none', | |
942 'toolsets': ['host', 'target'], | |
943 'variables': { | |
944 'glib_packages': 'glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0', | |
945 }, | |
946 'conditions': [ | |
947 ['_toolset=="target"', { | |
948 'direct_dependent_settings': { | |
949 'cflags': [ | |
950 '<!@(<(pkg-config) --cflags <(glib_packages))', | |
951 ], | |
952 }, | |
953 'link_settings': { | |
954 'ldflags': [ | |
955 '<!@(<(pkg-config) --libs-only-L --libs-only-other <(glib_packages
))', | |
956 ], | |
957 'libraries': [ | |
958 '<!@(<(pkg-config) --libs-only-l <(glib_packages))', | |
959 ], | |
960 }, | |
961 }, { | |
962 'direct_dependent_settings': { | |
963 'cflags': [ | |
964 '<!@(<(pkg-config) --cflags <(glib_packages))', | |
965 ], | |
966 }, | |
967 'link_settings': { | |
968 'ldflags': [ | |
969 '<!@(<(pkg-config) --libs-only-L --libs-only-other <(glib_packages
))', | |
970 ], | |
971 'libraries': [ | |
972 '<!@(<(pkg-config) --libs-only-l <(glib_packages))', | |
973 ], | |
974 }, | |
975 }], | |
976 ], | |
977 }, | |
978 { | |
979 'target_name': 'gnome_keyring', | |
980 'type': 'none', | |
981 'conditions': [ | |
982 ['use_gnome_keyring==1', { | |
983 'direct_dependent_settings': { | |
984 'cflags': [ | |
985 '<!@(<(pkg-config) --cflags gnome-keyring-1)', | |
986 ], | |
987 'defines': [ | |
988 'USE_GNOME_KEYRING', | |
989 ], | |
990 }, | |
991 }], | |
992 ], | |
993 }, | |
994 { | |
995 # The unit tests use a few convenience functions from the GNOME | |
996 # Keyring library directly. We link directly in this version of | |
997 # the target to allow this. | |
998 # *** Do not use this target in the main binary! *** | |
999 'target_name': 'gnome_keyring_direct', | |
1000 'type': 'none', | |
1001 'conditions': [ | |
1002 ['use_gnome_keyring==1', { | |
1003 'direct_dependent_settings': { | |
1004 'cflags': [ | |
1005 '<!@(<(pkg-config) --cflags gnome-keyring-1)', | |
1006 ], | |
1007 'defines': [ | |
1008 'USE_GNOME_KEYRING', | |
1009 ], | |
1010 }, | |
1011 'link_settings': { | |
1012 'ldflags': [ | |
1013 '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1
)', | |
1014 ], | |
1015 'libraries': [ | |
1016 '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)', | |
1017 ], | |
1018 }, | |
1019 }], | |
1020 ], | |
1021 }, | |
1022 { | |
1023 'target_name': 'libbrlapi', | |
1024 'type': 'static_library', | |
1025 'all_dependent_settings': { | |
1026 'include_dirs': [ | |
1027 '<(SHARED_INTERMEDIATE_DIR)', | |
1028 ], | |
1029 'defines': [ | |
1030 'USE_BRLAPI', | |
1031 ], | |
1032 'conditions': [ | |
1033 ['linux_link_libbrlapi==1', { | |
1034 'link_settings': { | |
1035 'libraries': [ | |
1036 '-lbrlapi', | |
1037 ], | |
1038 } | |
1039 }], | |
1040 ], | |
1041 }, | |
1042 'include_dirs': [ | |
1043 '../..', | |
1044 ], | |
1045 'hard_dependency': 1, | |
1046 'actions': [ | |
1047 { | |
1048 'variables': { | |
1049 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libbrlapi.h'
, | |
1050 'output_cc': '<(INTERMEDIATE_DIR)/libbrlapi_loader.cc', | |
1051 'generator': '../../tools/generate_library_loader/generate_library_l
oader.py', | |
1052 }, | |
1053 'action_name': 'generate_brlapi_loader', | |
1054 'inputs': [ | |
1055 '<(generator)', | |
1056 ], | |
1057 'outputs': [ | |
1058 '<(output_h)', | |
1059 '<(output_cc)', | |
1060 ], | |
1061 'action': ['python', | |
1062 '<(generator)', | |
1063 '--name', 'LibBrlapiLoader', | |
1064 '--output-h', '<(output_h)', | |
1065 '--output-cc', '<(output_cc)', | |
1066 '--header', '<brlapi.h>', | |
1067 '--link-directly=<(linux_link_libbrlapi)', | |
1068 '<@(libbrlapi_functions)', | |
1069 ], | |
1070 'message': 'Generating libbrlapi library loader', | |
1071 'process_outputs_as_sources': 1, | |
1072 }, | |
1073 ], | |
1074 }, | |
1075 { | |
1076 'target_name': 'libcap', | |
1077 'type': 'none', | |
1078 'link_settings': { | |
1079 'libraries': [ | |
1080 '-lcap', | |
1081 ], | |
1082 }, | |
1083 }, | |
1084 { | |
1085 'target_name': 'libresolv', | |
1086 'type': 'none', | |
1087 'link_settings': { | |
1088 'libraries': [ | |
1089 '-lresolv', | |
1090 ], | |
1091 }, | |
1092 }, | |
1093 { | |
1094 # GN version: //third_party/speech-dispatcher | |
1095 'target_name': 'libspeechd', | |
1096 'type': 'static_library', | |
1097 'direct_dependent_settings': { | |
1098 'include_dirs': [ | |
1099 '<(SHARED_INTERMEDIATE_DIR)', | |
1100 ], | |
1101 'conditions': [ | |
1102 ['linux_link_libspeechd==1', { | |
1103 'link_settings': { | |
1104 'libraries': [ | |
1105 '-lspeechd', | |
1106 ], | |
1107 } | |
1108 }], | |
1109 ], | |
1110 }, | |
1111 'include_dirs': [ | |
1112 '../..', | |
1113 ], | |
1114 'hard_dependency': 1, | |
1115 'actions': [ | |
1116 { | |
1117 'variables': { | |
1118 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libspeechd.h
', | |
1119 'output_cc': '<(INTERMEDIATE_DIR)/libspeechd_loader.cc', | |
1120 'generator': '../../tools/generate_library_loader/generate_library_l
oader.py', | |
1121 | |
1122 # speech-dispatcher >= 0.8 installs libspeechd.h into | |
1123 # speech-dispatcher/libspeechd.h, whereas speech-dispatcher < 0.8 | |
1124 # puts libspeechd.h in the top-level include directory. | |
1125 # Since we need to support both cases for now, we ship a copy of | |
1126 # libspeechd.h in third_party/speech-dispatcher. If the user | |
1127 # prefers to link against the speech-dispatcher directly, the | |
1128 # `libspeechd_h_prefix' variable can be passed to gyp with a value | |
1129 # such as "speech-dispatcher/" that will be prepended to | |
1130 # "libspeechd.h" in the #include directive. | |
1131 # TODO(phaldan.jr): Once we do not need to support | |
1132 # speech-dispatcher < 0.8 we can get rid of all this (including | |
1133 # third_party/speech-dispatcher) and just include | |
1134 # speech-dispatcher/libspeechd.h unconditionally. | |
1135 'libspeechd_h_prefix%': '', | |
1136 }, | |
1137 'action_name': 'generate_libspeechd_loader', | |
1138 'inputs': [ | |
1139 '<(generator)', | |
1140 ], | |
1141 'outputs': [ | |
1142 '<(output_h)', | |
1143 '<(output_cc)', | |
1144 ], | |
1145 'action': ['python', | |
1146 '<(generator)', | |
1147 '--name', 'LibSpeechdLoader', | |
1148 '--output-h', '<(output_h)', | |
1149 '--output-cc', '<(output_cc)', | |
1150 '--header', '<<(libspeechd_h_prefix)libspeechd.h>', | |
1151 '--bundled-header', | |
1152 '"third_party/speech-dispatcher/libspeechd.h"', | |
1153 '--link-directly=<(linux_link_libspeechd)', | |
1154 'spd_open', | |
1155 'spd_say', | |
1156 'spd_stop', | |
1157 'spd_close', | |
1158 'spd_pause', | |
1159 'spd_resume', | |
1160 'spd_set_notification_on', | |
1161 'spd_set_voice_rate', | |
1162 'spd_set_voice_pitch', | |
1163 'spd_list_synthesis_voices', | |
1164 'spd_set_synthesis_voice', | |
1165 'spd_list_modules', | |
1166 'spd_set_output_module', | |
1167 'spd_set_language', | |
1168 ], | |
1169 'message': 'Generating libspeechd library loader', | |
1170 'process_outputs_as_sources': 1, | |
1171 }, | |
1172 ], | |
1173 }, | |
1174 { | |
1175 'target_name': 'pangocairo', | |
1176 'type': 'none', | |
1177 'toolsets': ['host', 'target'], | |
1178 'conditions': [ | |
1179 ['use_pango==1 and use_cairo==1', { | |
1180 'conditions': [ | |
1181 ['_toolset=="target"', { | |
1182 'direct_dependent_settings': { | |
1183 'cflags': [ | |
1184 '<!@(<(pkg-config) --cflags pangocairo)', | |
1185 ], | |
1186 }, | |
1187 'link_settings': { | |
1188 'ldflags': [ | |
1189 '<!@(<(pkg-config) --libs-only-L --libs-only-other pangocairo)
', | |
1190 ], | |
1191 'libraries': [ | |
1192 '<!@(<(pkg-config) --libs-only-l pangocairo)', | |
1193 ], | |
1194 }, | |
1195 }, { | |
1196 'direct_dependent_settings': { | |
1197 'cflags': [ | |
1198 '<!@(<(pkg-config) --cflags pangocairo)', | |
1199 ], | |
1200 }, | |
1201 'link_settings': { | |
1202 'ldflags': [ | |
1203 '<!@(<(pkg-config) --libs-only-L --libs-only-other pangocairo)
', | |
1204 ], | |
1205 'libraries': [ | |
1206 '<!@(<(pkg-config) --libs-only-l pangocairo)', | |
1207 ], | |
1208 }, | |
1209 }], | |
1210 ], | |
1211 }], | |
1212 ], | |
1213 }, | |
1214 { | |
1215 'target_name': 'nss', | |
1216 'type': 'none', | |
1217 'conditions': [ | |
1218 # Link in the system NSS if it is used for the platform certificate | |
1219 # library (use_nss_certs==1). | |
1220 ['_toolset=="target" and use_nss_certs==1', { | |
1221 'direct_dependent_settings': { | |
1222 'cflags': [ | |
1223 '<!@(<(pkg-config) --cflags nss)', | |
1224 ], | |
1225 }, | |
1226 'link_settings': { | |
1227 'ldflags': [ | |
1228 '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)', | |
1229 ], | |
1230 'libraries': [ | |
1231 '<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")', | |
1232 ], | |
1233 }, | |
1234 'conditions': [ | |
1235 ['clang==1', { | |
1236 'direct_dependent_settings': { | |
1237 'cflags': [ | |
1238 # There is a broken header guard in /usr/include/nss/secmod.h: | |
1239 # https://bugzilla.mozilla.org/show_bug.cgi?id=884072 | |
1240 '-Wno-header-guard', | |
1241 ], | |
1242 }, | |
1243 }], | |
1244 ], | |
1245 }], | |
1246 ] | |
1247 }, | |
1248 { | |
1249 'target_name': 'libffi', | |
1250 'type': 'none', | |
1251 'conditions': [ | |
1252 ['_toolset=="target"', { | |
1253 'direct_dependent_settings': { | |
1254 'cflags': [ | |
1255 '<!@(<(pkg-config) --cflags libffi)', | |
1256 ], | |
1257 }, | |
1258 'link_settings': { | |
1259 'ldflags': [ | |
1260 '<!@(<(pkg-config) --libs-only-L --libs-only-other libffi)', | |
1261 ], | |
1262 'libraries': [ | |
1263 '<!@(<(pkg-config) --libs-only-l libffi)', | |
1264 ], | |
1265 }, | |
1266 }], | |
1267 ], | |
1268 }, | |
1269 ], | |
1270 } | |
OLD | NEW |