Clean up dependencies on X11 libraries
[chromium-blink-merge.git] / build / linux / system.gyp
blob94163fc21fd4d96ad0bae68f8437a4e0a399943a
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.
6   'variables': {
7     'conditions': [
8       ['sysroot!=""', {
9         'pkg-config': './pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
10       }, {
11         'pkg-config': 'pkg-config'
12       }],
13     ],
15     'linux_link_libgps%': 0,
16     'linux_link_libpci%': 0,
17     'linux_link_libspeechd%': 0,
18     'linux_link_libbrlapi%': 0,
19   },
20   'conditions': [
21     [ 'chromeos==0', {
22       # Hide GTK and related dependencies for Chrome OS, so they won't get
23       # added back to Chrome OS. Don't try to use GTK on Chrome OS.
24       'targets': [
25         {
26           'target_name': 'gdk',
27           'type': 'none',
28           'conditions': [
29             ['_toolset=="target"', {
30               'direct_dependent_settings': {
31                 'cflags': [
32                   '<!@(<(pkg-config) --cflags gdk-2.0)',
33                 ],
34               },
35               'link_settings': {
36                 'ldflags': [
37                   '<!@(<(pkg-config) --libs-only-L --libs-only-other gdk-2.0)',
38                 ],
39                 'libraries': [
40                   '<!@(<(pkg-config) --libs-only-l gdk-2.0)',
41                 ],
42               },
43             }],
44           ],
45         },
46         {
47           'target_name': 'gtk',
48           'type': 'none',
49           'toolsets': ['host', 'target'],
50           'variables': {
51             # gtk requires gmodule, but it does not list it as a dependency
52             # in some misconfigured systems.
53             'gtk_packages': 'gmodule-2.0 gtk+-2.0 gthread-2.0',
54           },
55           'conditions': [
56             ['_toolset=="target"', {
57               'all_dependent_settings': {
58                 'cflags': [
59                   '<!@(<(pkg-config) --cflags <(gtk_packages))',
60                 ],
61               },
62               'link_settings': {
63                 'ldflags': [
64                   '<!@(<(pkg-config) --libs-only-L --libs-only-other <(gtk_packages))',
65                 ],
66                 'libraries': [
67                   '<!@(<(pkg-config) --libs-only-l <(gtk_packages))',
68                 ],
69               },
70             }, {
71               'all_dependent_settings': {
72                 'cflags': [
73                   '<!@(pkg-config --cflags <(gtk_packages))',
74                 ],
75               },
76               'link_settings': {
77                 'ldflags': [
78                   '<!@(pkg-config --libs-only-L --libs-only-other <(gtk_packages))',
79                 ],
80                 'libraries': [
81                   '<!@(pkg-config --libs-only-l <(gtk_packages))',
82                 ],
83               },
84             }],
85           ],
86         },
87         {
88           'target_name': 'gtkprint',
89           'type': 'none',
90           'conditions': [
91             ['_toolset=="target"', {
92               'direct_dependent_settings': {
93                 'cflags': [
94                   '<!@(<(pkg-config) --cflags gtk+-unix-print-2.0)',
95                 ],
96               },
97               'link_settings': {
98                 'ldflags': [
99                   '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-unix-print-2.0)',
100                 ],
101                 'libraries': [
102                   '<!@(<(pkg-config) --libs-only-l gtk+-unix-print-2.0)',
103                 ],
104               },
105             }],
106           ],
107         },
108       ],  # targets
109     }],
110   ],  # conditions
111   'targets': [
112     {
113       'target_name': 'dbus',
114       'type': 'none',
115       'direct_dependent_settings': {
116         'cflags': [
117           '<!@(<(pkg-config) --cflags dbus-1)',
118         ],
119       },
120       'link_settings': {
121         'ldflags': [
122           '<!@(<(pkg-config) --libs-only-L --libs-only-other dbus-1)',
123         ],
124         'libraries': [
125           '<!@(<(pkg-config) --libs-only-l dbus-1)',
126         ],
127       },
128     },
129     {
130       'target_name': 'dridrm',
131       'type': 'none',
132       'direct_dependent_settings': {
133         'cflags': [
134           '<!@(<(pkg-config) --cflags libdrm)',
135         ],
136       },
137       'link_settings': {
138         'libraries': [
139           '<!@(<(pkg-config) --libs-only-l libdrm)',
140         ],
141       },
142     },
143     {
144       'target_name': 'fontconfig',
145       'type': 'none',
146       'conditions': [
147         ['_toolset=="target"', {
148           'conditions': [
149             ['use_system_fontconfig==1', {
150               'direct_dependent_settings': {
151                 'cflags': [
152                   '<!@(<(pkg-config) --cflags fontconfig)',
153                 ],
154               },
155               'link_settings': {
156                 'ldflags': [
157                   '<!@(<(pkg-config) --libs-only-L --libs-only-other fontconfig)',
158                 ],
159                 'libraries': [
160                   '<!@(<(pkg-config) --libs-only-l fontconfig)',
161                 ],
162               },
163             }, {  # use_system_fontconfig==0
164               'dependencies': [
165                 '../../third_party/fontconfig/fontconfig.gyp:fontconfig',
166               ],
167               'export_dependent_settings' : [
168                 '../../third_party/fontconfig/fontconfig.gyp:fontconfig',
169               ],
170             }],
171           ],
172         }],
173       ],
174     },
175     {
176       'target_name': 'freetype2',
177       'type': 'none',
178       'conditions': [
179         ['_toolset=="target"', {
180           'direct_dependent_settings': {
181             'cflags': [
182               '<!@(<(pkg-config) --cflags freetype2)',
183             ],
184           },
185           'link_settings': {
186             'ldflags': [
187               '<!@(<(pkg-config) --libs-only-L --libs-only-other freetype2)',
188             ],
189             'libraries': [
190               '<!@(<(pkg-config) --libs-only-l freetype2)',
191             ],
192           },
193         }],
194       ],
195     },
196     {
197       'target_name': 'gconf',
198       'type': 'none',
199       'conditions': [
200         ['use_gconf==1 and _toolset=="target"', {
201           'direct_dependent_settings': {
202             'cflags': [
203               '<!@(<(pkg-config) --cflags gconf-2.0)',
204             ],
205             'defines': [
206               'USE_GCONF',
207             ],
208           },
209           'link_settings': {
210             'ldflags': [
211               '<!@(<(pkg-config) --libs-only-L --libs-only-other gconf-2.0)',
212             ],
213             'libraries': [
214               '<!@(<(pkg-config) --libs-only-l gconf-2.0)',
215             ],
216           },
217         }],
218       ],
219     },
220     {
221       'target_name': 'gio',
222       'type': 'static_library',
223       'conditions': [
224         ['use_gio==1 and _toolset=="target"', {
225           'cflags': [
226             '<!@(<(pkg-config) --cflags gio-2.0)',
227           ],
228           'direct_dependent_settings': {
229             'cflags': [
230               '<!@(<(pkg-config) --cflags gio-2.0)',
231             ],
232             'defines': [
233               'USE_GIO',
234             ],
235             'include_dirs': [
236               '<(SHARED_INTERMEDIATE_DIR)',
237             ],
238           },
239           'include_dirs': [
240             '../..',
241           ],
242           'link_settings': {
243             'ldflags': [
244               '<!@(<(pkg-config) --libs-only-L --libs-only-other gio-2.0)',
245             ],
246             'libraries': [
247               '<!@(<(pkg-config) --libs-only-l gio-2.0)',
248             ],
249             'conditions': [
250               ['linux_link_gsettings==0 and OS=="linux"', {
251                 'libraries': [
252                   '-ldl',
253                 ],
254               }],
255             ],
256           },
257           'hard_dependency': 1,
258           'actions': [
259             {
260               'variables': {
261                 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libgio.h',
262                 'output_cc': '<(INTERMEDIATE_DIR)/libgio_loader.cc',
263                 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
264               },
265               'action_name': 'generate_libgio_loader',
266               'inputs': [
267                 '<(generator)',
268               ],
269               'outputs': [
270                 '<(output_h)',
271                 '<(output_cc)',
272               ],
273               'action': ['python',
274                          '<(generator)',
275                          '--name', 'LibGioLoader',
276                          '--output-h', '<(output_h)',
277                          '--output-cc', '<(output_cc)',
278                          '--header', '<gio/gio.h>',
279                          '--link-directly=<(linux_link_gsettings)',
280                          'g_settings_new',
281                          'g_settings_get_child',
282                          'g_settings_get_string',
283                          'g_settings_get_boolean',
284                          'g_settings_get_int',
285                          'g_settings_get_strv',
286                          'g_settings_list_schemas',
287               ],
288               'message': 'Generating libgio library loader',
289               'process_outputs_as_sources': 1,
290             },
291           ],
292         }],
293       ],
294     },
295     {
296       'target_name': 'glib',
297       'type': 'none',
298       'toolsets': ['host', 'target'],
299       'dependencies': [
300         'xtst'
301       ],
302       'variables': {
303         'glib_packages': 'glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0',
304       },
305       'conditions': [
306         ['_toolset=="target"', {
307           'direct_dependent_settings': {
308             'cflags': [
309               '<!@(<(pkg-config) --cflags <(glib_packages))',
310             ],
311           },
312           'link_settings': {
313             'ldflags': [
314               '<!@(<(pkg-config) --libs-only-L --libs-only-other <(glib_packages))',
315             ],
316             'libraries': [
317               '<!@(<(pkg-config) --libs-only-l <(glib_packages))',
318             ],
319           },
320         }, {
321           'direct_dependent_settings': {
322             'cflags': [
323               '<!@(pkg-config --cflags <(glib_packages))',
324             ],
325           },
326           'link_settings': {
327             'ldflags': [
328               '<!@(pkg-config --libs-only-L --libs-only-other <(glib_packages))',
329             ],
330             'libraries': [
331               '<!@(pkg-config --libs-only-l <(glib_packages))',
332             ],
333           },
334         }],
335       ],
336     },
337     {
338       'target_name': 'gnome_keyring',
339       'type': 'none',
340       'conditions': [
341         ['use_gnome_keyring==1', {
342           'direct_dependent_settings': {
343             'cflags': [
344               '<!@(<(pkg-config) --cflags gnome-keyring-1)',
345             ],
346             'defines': [
347               'USE_GNOME_KEYRING',
348             ],
349             'conditions': [
350               ['linux_link_gnome_keyring==0', {
351                 'defines': ['DLOPEN_GNOME_KEYRING'],
352               }],
353             ],
354           },
355           'conditions': [
356             ['linux_link_gnome_keyring!=0', {
357               'link_settings': {
358                 'ldflags': [
359                   '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
360                 ],
361                 'libraries': [
362                   '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
363                 ],
364               },
365             }, {
366               'conditions': [
367                 ['OS=="linux"', {
368                  'link_settings': {
369                    'libraries': [
370                      '-ldl',
371                    ],
372                  },
373                 }],
374               ],
375             }],
376           ],
377         }],
378       ],
379     },
380     {
381       # The unit tests use a few convenience functions from the GNOME
382       # Keyring library directly. We ignore linux_link_gnome_keyring and
383       # link directly in this version of the target to allow this.
384       # *** Do not use this target in the main binary! ***
385       'target_name': 'gnome_keyring_direct',
386       'type': 'none',
387       'conditions': [
388         ['use_gnome_keyring==1', {
389           'direct_dependent_settings': {
390             'cflags': [
391               '<!@(<(pkg-config) --cflags gnome-keyring-1)',
392             ],
393             'defines': [
394               'USE_GNOME_KEYRING',
395             ],
396             'conditions': [
397               ['linux_link_gnome_keyring==0', {
398                 'defines': ['DLOPEN_GNOME_KEYRING'],
399               }],
400             ],
401           },
402           'link_settings': {
403             'ldflags': [
404               '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
405             ],
406             'libraries': [
407               '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
408             ],
409           },
410         }],
411       ],
412     },
413     {
414       'target_name': 'libbrlapi',
415       'type': 'static_library',
416       'all_dependent_settings': {
417         'include_dirs': [
418           '<(SHARED_INTERMEDIATE_DIR)',
419         ],
420         'defines': [
421           'USE_BRLAPI',
422         ],
423         'conditions': [
424           ['linux_link_libbrlapi==1', {
425             'link_settings': {
426               'libraries': [
427                 '-lbrlapi',
428               ],
429             }
430           }],
431         ],
432       },
433       'include_dirs': [
434         '../..',
435       ],
436       'hard_dependency': 1,
437       'actions': [
438         {
439           'variables': {
440             'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libbrlapi.h',
441             'output_cc': '<(INTERMEDIATE_DIR)/libbrlapi_loader.cc',
442             'generator': '../../tools/generate_library_loader/generate_library_loader.py',
443           },
444           'action_name': 'generate_brlapi_loader',
445           'inputs': [
446             '<(generator)',
447           ],
448           'outputs': [
449             '<(output_h)',
450             '<(output_cc)',
451           ],
452           'action': ['python',
453                      '<(generator)',
454                      '--name', 'LibBrlapiLoader',
455                      '--output-h', '<(output_h)',
456                      '--output-cc', '<(output_cc)',
457                      '--header', '<brlapi.h>',
458                      '--link-directly=<(linux_link_libbrlapi)',
459                      'brlapi_getHandleSize',
460                      'brlapi_error_location',
461                      'brlapi_expandKeyCode',
462                      'brlapi_strerror',
463                      'brlapi__acceptKeys',
464                      'brlapi__openConnection',
465                      'brlapi__closeConnection',
466                      'brlapi__getDisplaySize',
467                      'brlapi__enterTtyModeWithPath',
468                      'brlapi__leaveTtyMode',
469                      'brlapi__writeDots',
470                      'brlapi__readKey',
471           ],
472           'message': 'Generating libbrlapi library loader',
473           'process_outputs_as_sources': 1,
474         },
475       ],
476     },
477     {
478       'target_name': 'libcap',
479       'type': 'none',
480       'link_settings': {
481         'libraries': [
482           '-lcap',
483         ],
484       },
485     },
486     {
487       'target_name': 'libgcrypt',
488       'type': 'none',
489       'conditions': [
490         ['_toolset=="target" and use_cups==1', {
491           'direct_dependent_settings': {
492             'cflags': [
493               '<!@(libgcrypt-config --cflags)',
494             ],
495           },
496           'link_settings': {
497             'libraries': [
498               '<!@(libgcrypt-config --libs)',
499             ],
500           },
501         }],
502       ],
503     },
504     {
505       'target_name': 'libpci',
506       'type': 'static_library',
507       'cflags': [
508         '<!@(<(pkg-config) --cflags libpci)',
509       ],
510       'direct_dependent_settings': {
511         'include_dirs': [
512           '<(SHARED_INTERMEDIATE_DIR)',
513         ],
514         'conditions': [
515           ['linux_link_libpci==1', {
516             'link_settings': {
517               'ldflags': [
518                 '<!@(<(pkg-config) --libs-only-L --libs-only-other libpci)',
519               ],
520               'libraries': [
521                 '<!@(<(pkg-config) --libs-only-l libpci)',
522               ],
523             }
524           }],
525         ],
526       },
527       'include_dirs': [
528         '../..',
529       ],
530       'hard_dependency': 1,
531       'actions': [
532         {
533           'variables': {
534             'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libpci.h',
535             'output_cc': '<(INTERMEDIATE_DIR)/libpci_loader.cc',
536             'generator': '../../tools/generate_library_loader/generate_library_loader.py',
537           },
538           'action_name': 'generate_libpci_loader',
539           'inputs': [
540             '<(generator)',
541           ],
542           'outputs': [
543             '<(output_h)',
544             '<(output_cc)',
545           ],
546           'action': ['python',
547                      '<(generator)',
548                      '--name', 'LibPciLoader',
549                      '--output-h', '<(output_h)',
550                      '--output-cc', '<(output_cc)',
551                      '--header', '<pci/pci.h>',
552                      # TODO(phajdan.jr): Report problem to pciutils project
553                      # and get it fixed so that we don't need --use-extern-c.
554                      '--use-extern-c',
555                      '--link-directly=<(linux_link_libpci)',
556                      'pci_alloc',
557                      'pci_init',
558                      'pci_cleanup',
559                      'pci_scan_bus',
560                      'pci_fill_info',
561                      'pci_lookup_name',
562           ],
563           'message': 'Generating libpci library loader',
564           'process_outputs_as_sources': 1,
565         },
566       ],
567     },
568     {
569       'target_name': 'libresolv',
570       'type': 'none',
571       'link_settings': {
572         'libraries': [
573           '-lresolv',
574         ],
575       },
576     },
577     {
578       'target_name': 'libspeechd',
579       'type': 'static_library',
580       'direct_dependent_settings': {
581         'include_dirs': [
582           '<(SHARED_INTERMEDIATE_DIR)',
583         ],
584         'conditions': [
585           ['linux_link_libspeechd==1', {
586             'link_settings': {
587               'libraries': [
588                 '-lspeechd',
589               ],
590             }
591           }],
592         ],
593       },
594       'include_dirs': [
595         '../..',
596       ],
597       'hard_dependency': 1,
598       'actions': [
599         {
600           'variables': {
601             'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libspeechd.h',
602             'output_cc': '<(INTERMEDIATE_DIR)/libspeechd_loader.cc',
603             'generator': '../../tools/generate_library_loader/generate_library_loader.py',
605             # speech-dispatcher >= 0.8 installs libspeechd.h into
606             # speech-dispatcher/libspeechd.h, whereas speech-dispatcher < 0.8
607             # puts libspeechd.h in the top-level include directory.
608             # Since we need to support both cases for now, we ship a copy of
609             # libspeechd.h in third_party/speech-dispatcher. If the user
610             # prefers to link against the speech-dispatcher directly, the
611             # `libspeechd_h_prefix' variable can be passed to gyp with a value
612             # such as "speech-dispatcher/" that will be prepended to
613             # "libspeechd.h" in the #include directive.
614             # TODO(phaldan.jr): Once we do not need to support
615             # speech-dispatcher < 0.8 we can get rid of all this (including
616             # third_party/speech-dispatcher) and just include
617             # speech-dispatcher/libspeechd.h unconditionally.
618             'libspeechd_h_prefix%': '',
619           },
620           'action_name': 'generate_libspeechd_loader',
621           'inputs': [
622             '<(generator)',
623           ],
624           'outputs': [
625             '<(output_h)',
626             '<(output_cc)',
627           ],
628           'action': ['python',
629                      '<(generator)',
630                      '--name', 'LibSpeechdLoader',
631                      '--output-h', '<(output_h)',
632                      '--output-cc', '<(output_cc)',
633                      '--header', '<<(libspeechd_h_prefix)libspeechd.h>',
634                      '--bundled-header',
635                      '"third_party/speech-dispatcher/libspeechd.h"',
636                      '--link-directly=<(linux_link_libspeechd)',
637                      'spd_open',
638                      'spd_say',
639                      'spd_stop',
640                      'spd_close',
641                      'spd_pause',
642                      'spd_resume',
643                      'spd_set_notification_on',
644                      'spd_set_voice_rate',
645                      'spd_set_voice_pitch',
646                      'spd_list_synthesis_voices',
647                      'spd_set_synthesis_voice',
648                      'spd_list_modules',
649                      'spd_set_output_module',
650           ],
651           'message': 'Generating libspeechd library loader',
652           'process_outputs_as_sources': 1,
653         },
654       ],
655     },
656     {
657       'target_name': 'pangocairo',
658       'type': 'none',
659       'toolsets': ['host', 'target'],
660       'conditions': [
661         ['_toolset=="target"', {
662           'direct_dependent_settings': {
663             'cflags': [
664               '<!@(<(pkg-config) --cflags pangocairo pangoft2)',
665             ],
666           },
667           'link_settings': {
668             'ldflags': [
669               '<!@(<(pkg-config) --libs-only-L --libs-only-other pangocairo pangoft2)',
670             ],
671             'libraries': [
672               '<!@(<(pkg-config) --libs-only-l pangocairo pangoft2)',
673             ],
674           },
675         }, {
676           'direct_dependent_settings': {
677             'cflags': [
678               '<!@(pkg-config --cflags pangocairo pangoft2)',
679             ],
680           },
681           'link_settings': {
682             'ldflags': [
683               '<!@(pkg-config --libs-only-L --libs-only-other pangocairo pangoft2)',
684             ],
685             'libraries': [
686               '<!@(pkg-config --libs-only-l pangocairo pangoft2)',
687             ],
688           },
689         }],
690       ],
691     },
692     {
693       'target_name': 'ssl',
694       'type': 'none',
695       'conditions': [
696         ['_toolset=="target"', {
697           'conditions': [
698             ['use_openssl==1', {
699               'dependencies': [
700                 '../../third_party/openssl/openssl.gyp:openssl',
701               ],
702             }],
703             ['use_openssl==0', {
704               'dependencies': [
705                 '../../net/third_party/nss/ssl.gyp:libssl',
706               ],
707               'direct_dependent_settings': {
708                 'include_dirs+': [
709                   # We need for our local copies of the libssl3 headers to come
710                   # before other includes, as we are shadowing system headers.
711                   '<(DEPTH)/net/third_party/nss/ssl',
712                 ],
713                 'cflags': [
714                   '<!@(<(pkg-config) --cflags nss)',
715                 ],
716               },
717               'link_settings': {
718                 'ldflags': [
719                   '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
720                 ],
721                 'libraries': [
722                   '<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")',
723                 ],
724               },
725             }],
726             ['use_openssl==0 and clang==1', {
727               'direct_dependent_settings': {
728                 'cflags': [
729                   # There is a broken header guard in /usr/include/nss/secmod.h:
730                   # https://bugzilla.mozilla.org/show_bug.cgi?id=884072
731                   '-Wno-header-guard',
732                 ],
733               },
734             }],
735           ]
736         }],
737       ],
738     },
739     {
740       'target_name': 'udev',
741       'type': 'none',
742       'conditions': [
743         # libudev is not available on *BSD
744         ['_toolset=="target" and os_bsd!=1', {
745           'direct_dependent_settings': {
746             'cflags': [
747               '<!@(<(pkg-config) --cflags libudev)'
748             ],
749           },
750           'link_settings': {
751             'ldflags': [
752               '<!@(<(pkg-config) --libs-only-L --libs-only-other libudev)',
753             ],
754             'libraries': [
755               '<!@(<(pkg-config) --libs-only-l libudev)',
756             ],
757           },
758         }],
759       ],
760     },
761     {
762       'target_name': 'x11',
763       'type': 'none',
764       'toolsets': ['host', 'target'],
765       'conditions': [
766         ['_toolset=="target"', {
767           'direct_dependent_settings': {
768             'cflags': [
769               '<!@(<(pkg-config) --cflags x11)',
770             ],
771           },
772           'link_settings': {
773             'ldflags': [
774               '<!@(<(pkg-config) --libs-only-L --libs-only-other x11 xi)',
775             ],
776             'libraries': [
777               '<!@(<(pkg-config) --libs-only-l x11 xi)',
778             ],
779           },
780         }, {
781           'direct_dependent_settings': {
782             'cflags': [
783               '<!@(pkg-config --cflags x11)',
784             ],
785           },
786           'link_settings': {
787             'ldflags': [
788               '<!@(pkg-config --libs-only-L --libs-only-other x11 xi)',
789             ],
790             'libraries': [
791               '<!@(pkg-config --libs-only-l x11 xi)',
792             ],
793           },
794         }],
795       ],
796     },
797     {
798       'target_name': 'xcursor',
799       'type': 'none',
800       'direct_dependent_settings': {
801         'cflags': [
802           '<!@(<(pkg-config) --cflags xcursor)',
803         ],
804       },
805       'link_settings': {
806         'ldflags': [
807           '<!@(<(pkg-config) --libs-only-L --libs-only-other xcursor)',
808         ],
809         'libraries': [
810           '<!@(<(pkg-config) --libs-only-l xcursor)',
811         ],
812       },
813     },
814     {
815       'target_name': 'xcomposite',
816       'type': 'none',
817       'direct_dependent_settings': {
818         'cflags': [
819           '<!@(<(pkg-config) --cflags xcomposite)',
820         ],
821       },
822       'link_settings': {
823         'ldflags': [
824           '<!@(<(pkg-config) --libs-only-L --libs-only-other xcomposite)',
825         ],
826         'libraries': [
827           '<!@(<(pkg-config) --libs-only-l xcomposite)',
828         ],
829       },
830     },
831     {
832       'target_name': 'xdamage',
833       'type': 'none',
834       'direct_dependent_settings': {
835         'cflags': [
836           '<!@(<(pkg-config) --cflags xdamage)',
837         ],
838       },
839       'link_settings': {
840         'ldflags': [
841           '<!@(<(pkg-config) --libs-only-L --libs-only-other xdamage)',
842         ],
843         'libraries': [
844           '<!@(<(pkg-config) --libs-only-l xdamage)',
845         ],
846       },
847     },
848     {
849       'target_name': 'xext',
850       'type': 'none',
851       'direct_dependent_settings': {
852         'cflags': [
853           '<!@(<(pkg-config) --cflags xext)',
854         ],
855       },
856       'link_settings': {
857         'ldflags': [
858           '<!@(<(pkg-config) --libs-only-L --libs-only-other xext)',
859         ],
860         'libraries': [
861           '<!@(<(pkg-config) --libs-only-l xext)',
862         ],
863       },
864     },
865     {
866       'target_name': 'xfixes',
867       'type': 'none',
868       'direct_dependent_settings': {
869         'cflags': [
870           '<!@(<(pkg-config) --cflags xfixes)',
871         ],
872       },
873       'link_settings': {
874         'ldflags': [
875           '<!@(<(pkg-config) --libs-only-L --libs-only-other xfixes)',
876         ],
877         'libraries': [
878           '<!@(<(pkg-config) --libs-only-l xfixes)',
879         ],
880       },
881     },
882     {
883       'target_name': 'xi',
884       'type': 'none',
885       'direct_dependent_settings': {
886         'cflags': [
887           '<!@(<(pkg-config) --cflags xi)',
888         ],
889       },
890       'link_settings': {
891         'ldflags': [
892           '<!@(<(pkg-config) --libs-only-L --libs-only-other xi)',
893         ],
894         'libraries': [
895           '<!@(<(pkg-config) --libs-only-l xi)',
896         ],
897       },
898     },
899     {
900       'target_name': 'xrandr',
901       'type': 'none',
902       'toolsets': ['host', 'target'],
903       'conditions': [
904         ['_toolset=="target"', {
905           'direct_dependent_settings': {
906             'cflags': [
907               '<!@(<(pkg-config) --cflags xrandr)',
908             ],
909           },
910           'link_settings': {
911             'ldflags': [
912               '<!@(<(pkg-config) --libs-only-L --libs-only-other xrandr)',
913             ],
914             'libraries': [
915               '<!@(<(pkg-config) --libs-only-l xrandr)',
916             ],
917           },
918         }, {
919           'direct_dependent_settings': {
920             'cflags': [
921               '<!@(pkg-config --cflags xrandr)',
922             ],
923           },
924           'link_settings': {
925             'ldflags': [
926               '<!@(pkg-config --libs-only-L --libs-only-other xrandr)',
927             ],
928             'libraries': [
929               '<!@(pkg-config --libs-only-l xrandr)',
930             ],
931           },
932         }],
933       ],
934     },
935     {
936       'target_name': 'xrender',
937       'type': 'none',
938       'direct_dependent_settings': {
939         'cflags': [
940           '<!@(<(pkg-config) --cflags xrender)',
941         ],
942       },
943       'link_settings': {
944         'ldflags': [
945           '<!@(<(pkg-config) --libs-only-L --libs-only-other xrender)',
946         ],
947         'libraries': [
948           '<!@(<(pkg-config) --libs-only-l xrender)',
949         ],
950       },
951     },
952     {
953       'target_name': 'xscrnsaver',
954       'type': 'none',
955       'direct_dependent_settings': {
956         'cflags': [
957           '<!@(<(pkg-config) --cflags xscrnsaver)',
958         ],
959       },
960       'link_settings': {
961         'ldflags': [
962           '<!@(<(pkg-config) --libs-only-L --libs-only-other xscrnsaver)',
963         ],
964         'libraries': [
965           '<!@(<(pkg-config) --libs-only-l xscrnsaver)',
966         ],
967       },
968     },
969     {
970       'target_name': 'xtst',
971       'type': 'none',
972       'toolsets': ['host', 'target'],
973       'conditions': [
974         ['_toolset=="target"', {
975           'direct_dependent_settings': {
976             'cflags': [
977               '<!@(<(pkg-config) --cflags xtst)',
978             ],
979           },
980           'link_settings': {
981             'ldflags': [
982               '<!@(<(pkg-config) --libs-only-L --libs-only-other xtst)',
983             ],
984             'libraries': [
985               '<!@(<(pkg-config) --libs-only-l xtst)',
986             ],
987           },
988         }, {
989           'direct_dependent_settings': {
990             'cflags': [
991               '<!@(pkg-config --cflags xtst)',
992             ],
993           },
994           'link_settings': {
995             'ldflags': [
996               '<!@(pkg-config --libs-only-L --libs-only-other xtst)',
997             ],
998             'libraries': [
999               '<!@(pkg-config --libs-only-l xtst)',
1000             ],
1001           },
1002         }]
1003       ]
1004     }
1005   ],