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.
9 'pkg-config': './pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
11 'pkg-config': 'pkg-config'
15 'linux_link_libgps%': 0,
16 'linux_link_libpci%': 0,
17 'linux_link_libspeechd%': 0,
18 'linux_link_libbrlapi%': 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.
29 ['_toolset=="target"', {
30 'direct_dependent_settings': {
32 '<!@(<(pkg-config) --cflags gdk-2.0)',
37 '<!@(<(pkg-config) --libs-only-L --libs-only-other gdk-2.0)',
40 '<!@(<(pkg-config) --libs-only-l gdk-2.0)',
49 'toolsets': ['host', 'target'],
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',
56 ['_toolset=="target"', {
57 'all_dependent_settings': {
59 '<!@(<(pkg-config) --cflags <(gtk_packages))',
64 '<!@(<(pkg-config) --libs-only-L --libs-only-other <(gtk_packages))',
67 '<!@(<(pkg-config) --libs-only-l <(gtk_packages))',
71 'all_dependent_settings': {
73 '<!@(pkg-config --cflags <(gtk_packages))',
78 '<!@(pkg-config --libs-only-L --libs-only-other <(gtk_packages))',
81 '<!@(pkg-config --libs-only-l <(gtk_packages))',
88 'target_name': 'gtkprint',
91 ['_toolset=="target"', {
92 'direct_dependent_settings': {
94 '<!@(<(pkg-config) --cflags gtk+-unix-print-2.0)',
99 '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-unix-print-2.0)',
102 '<!@(<(pkg-config) --libs-only-l gtk+-unix-print-2.0)',
113 'target_name': 'dbus',
115 'direct_dependent_settings': {
117 '<!@(<(pkg-config) --cflags dbus-1)',
122 '<!@(<(pkg-config) --libs-only-L --libs-only-other dbus-1)',
125 '<!@(<(pkg-config) --libs-only-l dbus-1)',
130 'target_name': 'dridrm',
132 'direct_dependent_settings': {
134 '<!@(<(pkg-config) --cflags libdrm)',
139 '<!@(<(pkg-config) --libs-only-l libdrm)',
144 'target_name': 'fontconfig',
147 ['_toolset=="target"', {
149 ['use_system_fontconfig==1', {
150 'direct_dependent_settings': {
152 '<!@(<(pkg-config) --cflags fontconfig)',
157 '<!@(<(pkg-config) --libs-only-L --libs-only-other fontconfig)',
160 '<!@(<(pkg-config) --libs-only-l fontconfig)',
163 }, { # use_system_fontconfig==0
165 '../../third_party/fontconfig/fontconfig.gyp:fontconfig',
167 'export_dependent_settings' : [
168 '../../third_party/fontconfig/fontconfig.gyp:fontconfig',
176 'target_name': 'freetype2',
179 ['_toolset=="target"', {
180 'direct_dependent_settings': {
182 '<!@(<(pkg-config) --cflags freetype2)',
187 '<!@(<(pkg-config) --libs-only-L --libs-only-other freetype2)',
190 '<!@(<(pkg-config) --libs-only-l freetype2)',
197 'target_name': 'gconf',
200 ['use_gconf==1 and _toolset=="target"', {
201 'direct_dependent_settings': {
203 '<!@(<(pkg-config) --cflags gconf-2.0)',
211 '<!@(<(pkg-config) --libs-only-L --libs-only-other gconf-2.0)',
214 '<!@(<(pkg-config) --libs-only-l gconf-2.0)',
221 'target_name': 'gio',
222 'type': 'static_library',
224 ['use_gio==1 and _toolset=="target"', {
226 '<!@(<(pkg-config) --cflags gio-2.0)',
228 'direct_dependent_settings': {
230 '<!@(<(pkg-config) --cflags gio-2.0)',
236 '<(SHARED_INTERMEDIATE_DIR)',
244 '<!@(<(pkg-config) --libs-only-L --libs-only-other gio-2.0)',
247 '<!@(<(pkg-config) --libs-only-l gio-2.0)',
250 ['linux_link_gsettings==0 and OS=="linux"', {
257 'hard_dependency': 1,
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',
265 'action_name': 'generate_libgio_loader',
275 '--name', 'LibGioLoader',
276 '--output-h', '<(output_h)',
277 '--output-cc', '<(output_cc)',
278 '--header', '<gio/gio.h>',
279 '--link-directly=<(linux_link_gsettings)',
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',
288 'message': 'Generating libgio library loader',
289 'process_outputs_as_sources': 1,
296 'target_name': 'glib',
298 'toolsets': ['host', 'target'],
303 'glib_packages': 'glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0',
306 ['_toolset=="target"', {
307 'direct_dependent_settings': {
309 '<!@(<(pkg-config) --cflags <(glib_packages))',
314 '<!@(<(pkg-config) --libs-only-L --libs-only-other <(glib_packages))',
317 '<!@(<(pkg-config) --libs-only-l <(glib_packages))',
321 'direct_dependent_settings': {
323 '<!@(pkg-config --cflags <(glib_packages))',
328 '<!@(pkg-config --libs-only-L --libs-only-other <(glib_packages))',
331 '<!@(pkg-config --libs-only-l <(glib_packages))',
338 'target_name': 'gnome_keyring',
341 ['use_gnome_keyring==1', {
342 'direct_dependent_settings': {
344 '<!@(<(pkg-config) --cflags gnome-keyring-1)',
350 ['linux_link_gnome_keyring==0', {
351 'defines': ['DLOPEN_GNOME_KEYRING'],
356 ['linux_link_gnome_keyring!=0', {
359 '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
362 '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
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',
388 ['use_gnome_keyring==1', {
389 'direct_dependent_settings': {
391 '<!@(<(pkg-config) --cflags gnome-keyring-1)',
397 ['linux_link_gnome_keyring==0', {
398 'defines': ['DLOPEN_GNOME_KEYRING'],
404 '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
407 '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
414 'target_name': 'libbrlapi',
415 'type': 'static_library',
416 'all_dependent_settings': {
418 '<(SHARED_INTERMEDIATE_DIR)',
424 ['linux_link_libbrlapi==1', {
436 'hard_dependency': 1,
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',
444 'action_name': 'generate_brlapi_loader',
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',
463 'brlapi__acceptKeys',
464 'brlapi__openConnection',
465 'brlapi__closeConnection',
466 'brlapi__getDisplaySize',
467 'brlapi__enterTtyModeWithPath',
468 'brlapi__leaveTtyMode',
472 'message': 'Generating libbrlapi library loader',
473 'process_outputs_as_sources': 1,
478 'target_name': 'libcap',
487 'target_name': 'libgcrypt',
490 ['_toolset=="target" and use_cups==1', {
491 'direct_dependent_settings': {
493 '<!@(libgcrypt-config --cflags)',
498 '<!@(libgcrypt-config --libs)',
505 'target_name': 'libpci',
506 'type': 'static_library',
508 '<!@(<(pkg-config) --cflags libpci)',
510 'direct_dependent_settings': {
512 '<(SHARED_INTERMEDIATE_DIR)',
515 ['linux_link_libpci==1', {
518 '<!@(<(pkg-config) --libs-only-L --libs-only-other libpci)',
521 '<!@(<(pkg-config) --libs-only-l libpci)',
530 'hard_dependency': 1,
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',
538 'action_name': 'generate_libpci_loader',
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.
555 '--link-directly=<(linux_link_libpci)',
563 'message': 'Generating libpci library loader',
564 'process_outputs_as_sources': 1,
569 'target_name': 'libresolv',
578 'target_name': 'libspeechd',
579 'type': 'static_library',
580 'direct_dependent_settings': {
582 '<(SHARED_INTERMEDIATE_DIR)',
585 ['linux_link_libspeechd==1', {
597 'hard_dependency': 1,
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%': '',
620 'action_name': 'generate_libspeechd_loader',
630 '--name', 'LibSpeechdLoader',
631 '--output-h', '<(output_h)',
632 '--output-cc', '<(output_cc)',
633 '--header', '<<(libspeechd_h_prefix)libspeechd.h>',
635 '"third_party/speech-dispatcher/libspeechd.h"',
636 '--link-directly=<(linux_link_libspeechd)',
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',
649 'spd_set_output_module',
651 'message': 'Generating libspeechd library loader',
652 'process_outputs_as_sources': 1,
657 'target_name': 'pangocairo',
659 'toolsets': ['host', 'target'],
661 ['_toolset=="target"', {
662 'direct_dependent_settings': {
664 '<!@(<(pkg-config) --cflags pangocairo pangoft2)',
669 '<!@(<(pkg-config) --libs-only-L --libs-only-other pangocairo pangoft2)',
672 '<!@(<(pkg-config) --libs-only-l pangocairo pangoft2)',
676 'direct_dependent_settings': {
678 '<!@(pkg-config --cflags pangocairo pangoft2)',
683 '<!@(pkg-config --libs-only-L --libs-only-other pangocairo pangoft2)',
686 '<!@(pkg-config --libs-only-l pangocairo pangoft2)',
693 'target_name': 'ssl',
696 ['_toolset=="target"', {
700 '../../third_party/openssl/openssl.gyp:openssl',
705 '../../net/third_party/nss/ssl.gyp:libssl',
707 'direct_dependent_settings': {
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',
714 '<!@(<(pkg-config) --cflags nss)',
719 '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
722 '<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")',
726 ['use_openssl==0 and clang==1', {
727 'direct_dependent_settings': {
729 # There is a broken header guard in /usr/include/nss/secmod.h:
730 # https://bugzilla.mozilla.org/show_bug.cgi?id=884072
740 'target_name': 'udev',
743 # libudev is not available on *BSD
744 ['_toolset=="target" and os_bsd!=1', {
745 'direct_dependent_settings': {
747 '<!@(<(pkg-config) --cflags libudev)'
752 '<!@(<(pkg-config) --libs-only-L --libs-only-other libudev)',
755 '<!@(<(pkg-config) --libs-only-l libudev)',
762 'target_name': 'x11',
764 'toolsets': ['host', 'target'],
766 ['_toolset=="target"', {
767 'direct_dependent_settings': {
769 '<!@(<(pkg-config) --cflags x11)',
774 '<!@(<(pkg-config) --libs-only-L --libs-only-other x11 xi)',
777 '<!@(<(pkg-config) --libs-only-l x11 xi)',
781 'direct_dependent_settings': {
783 '<!@(pkg-config --cflags x11)',
788 '<!@(pkg-config --libs-only-L --libs-only-other x11 xi)',
791 '<!@(pkg-config --libs-only-l x11 xi)',
798 'target_name': 'xcursor',
800 'direct_dependent_settings': {
802 '<!@(<(pkg-config) --cflags xcursor)',
807 '<!@(<(pkg-config) --libs-only-L --libs-only-other xcursor)',
810 '<!@(<(pkg-config) --libs-only-l xcursor)',
815 'target_name': 'xcomposite',
817 'direct_dependent_settings': {
819 '<!@(<(pkg-config) --cflags xcomposite)',
824 '<!@(<(pkg-config) --libs-only-L --libs-only-other xcomposite)',
827 '<!@(<(pkg-config) --libs-only-l xcomposite)',
832 'target_name': 'xdamage',
834 'direct_dependent_settings': {
836 '<!@(<(pkg-config) --cflags xdamage)',
841 '<!@(<(pkg-config) --libs-only-L --libs-only-other xdamage)',
844 '<!@(<(pkg-config) --libs-only-l xdamage)',
849 'target_name': 'xext',
851 'direct_dependent_settings': {
853 '<!@(<(pkg-config) --cflags xext)',
858 '<!@(<(pkg-config) --libs-only-L --libs-only-other xext)',
861 '<!@(<(pkg-config) --libs-only-l xext)',
866 'target_name': 'xfixes',
868 'direct_dependent_settings': {
870 '<!@(<(pkg-config) --cflags xfixes)',
875 '<!@(<(pkg-config) --libs-only-L --libs-only-other xfixes)',
878 '<!@(<(pkg-config) --libs-only-l xfixes)',
885 'direct_dependent_settings': {
887 '<!@(<(pkg-config) --cflags xi)',
892 '<!@(<(pkg-config) --libs-only-L --libs-only-other xi)',
895 '<!@(<(pkg-config) --libs-only-l xi)',
900 'target_name': 'xrandr',
902 'toolsets': ['host', 'target'],
904 ['_toolset=="target"', {
905 'direct_dependent_settings': {
907 '<!@(<(pkg-config) --cflags xrandr)',
912 '<!@(<(pkg-config) --libs-only-L --libs-only-other xrandr)',
915 '<!@(<(pkg-config) --libs-only-l xrandr)',
919 'direct_dependent_settings': {
921 '<!@(pkg-config --cflags xrandr)',
926 '<!@(pkg-config --libs-only-L --libs-only-other xrandr)',
929 '<!@(pkg-config --libs-only-l xrandr)',
936 'target_name': 'xrender',
938 'direct_dependent_settings': {
940 '<!@(<(pkg-config) --cflags xrender)',
945 '<!@(<(pkg-config) --libs-only-L --libs-only-other xrender)',
948 '<!@(<(pkg-config) --libs-only-l xrender)',
953 'target_name': 'xscrnsaver',
955 'direct_dependent_settings': {
957 '<!@(<(pkg-config) --cflags xscrnsaver)',
962 '<!@(<(pkg-config) --libs-only-L --libs-only-other xscrnsaver)',
965 '<!@(<(pkg-config) --libs-only-l xscrnsaver)',
970 'target_name': 'xtst',
972 'toolsets': ['host', 'target'],
974 ['_toolset=="target"', {
975 'direct_dependent_settings': {
977 '<!@(<(pkg-config) --cflags xtst)',
982 '<!@(<(pkg-config) --libs-only-L --libs-only-other xtst)',
985 '<!@(<(pkg-config) --libs-only-l xtst)',
989 'direct_dependent_settings': {
991 '<!@(pkg-config --cflags xtst)',
996 '<!@(pkg-config --libs-only-L --libs-only-other xtst)',
999 '<!@(pkg-config --libs-only-l xtst)',