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': '<(chroot_cmd) ./pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
10 # libgcrypt-config-wrapper invokes libgcrypt-config directly from the
11 # sysroot, so there's no need to prefix it with <(chroot_cmd).
12 'libgcrypt-config': './libgcrypt-config-wrapper "<(sysroot)"',
14 'pkg-config': 'pkg-config',
15 'libgcrypt-config': 'libgcrypt-config',
19 'linux_link_libgps%': 0,
20 'linux_link_libpci%': 0,
21 'linux_link_libspeechd%': 0,
22 'linux_link_libbrlapi%': 0,
25 [ 'chromeos==0 and use_ozone==0', {
26 # Hide GTK and related dependencies for Chrome OS and Ozone, so they won't get
27 # added back to Chrome OS and Ozone. Don't try to use GTK on Chrome OS and Ozone.
33 ['_toolset=="target"', {
34 'direct_dependent_settings': {
36 '<!@(<(pkg-config) --cflags gdk-2.0)',
41 '<!@(<(pkg-config) --libs-only-L --libs-only-other gdk-2.0)',
44 '<!@(<(pkg-config) --libs-only-l gdk-2.0)',
53 'toolsets': ['host', 'target'],
55 # gtk requires gmodule, but it does not list it as a dependency
56 # in some misconfigured systems.
57 'gtk_packages': 'gmodule-2.0 gtk+-2.0 gthread-2.0',
60 ['_toolset=="target"', {
61 'all_dependent_settings': {
63 '<!@(<(pkg-config) --cflags <(gtk_packages))',
68 '<!@(<(pkg-config) --libs-only-L --libs-only-other <(gtk_packages))',
71 '<!@(<(pkg-config) --libs-only-l <(gtk_packages))',
75 'all_dependent_settings': {
77 '<!@(pkg-config --cflags <(gtk_packages))',
82 '<!@(pkg-config --libs-only-L --libs-only-other <(gtk_packages))',
85 '<!@(pkg-config --libs-only-l <(gtk_packages))',
92 'target_name': 'gtkprint',
95 ['_toolset=="target"', {
96 'direct_dependent_settings': {
98 '<!@(<(pkg-config) --cflags gtk+-unix-print-2.0)',
103 '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-unix-print-2.0)',
106 '<!@(<(pkg-config) --libs-only-l gtk+-unix-print-2.0)',
115 # Hide X11 and related dependencies when use_x11=0
118 'target_name': 'x11',
120 'toolsets': ['host', 'target'],
122 ['_toolset=="target"', {
123 'direct_dependent_settings': {
125 '<!@(<(pkg-config) --cflags x11)',
130 '<!@(<(pkg-config) --libs-only-L --libs-only-other x11 xi)',
133 '<!@(<(pkg-config) --libs-only-l x11 xi)',
137 'direct_dependent_settings': {
139 '<!@(pkg-config --cflags x11)',
144 '<!@(pkg-config --libs-only-L --libs-only-other x11 xi)',
147 '<!@(pkg-config --libs-only-l x11 xi)',
154 'target_name': 'xcursor',
156 'direct_dependent_settings': {
158 '<!@(<(pkg-config) --cflags xcursor)',
163 '<!@(<(pkg-config) --libs-only-L --libs-only-other xcursor)',
166 '<!@(<(pkg-config) --libs-only-l xcursor)',
171 'target_name': 'xcomposite',
173 'direct_dependent_settings': {
175 '<!@(<(pkg-config) --cflags xcomposite)',
180 '<!@(<(pkg-config) --libs-only-L --libs-only-other xcomposite)',
183 '<!@(<(pkg-config) --libs-only-l xcomposite)',
188 'target_name': 'xdamage',
190 'direct_dependent_settings': {
192 '<!@(<(pkg-config) --cflags xdamage)',
197 '<!@(<(pkg-config) --libs-only-L --libs-only-other xdamage)',
200 '<!@(<(pkg-config) --libs-only-l xdamage)',
205 'target_name': 'xext',
207 'direct_dependent_settings': {
209 '<!@(<(pkg-config) --cflags xext)',
214 '<!@(<(pkg-config) --libs-only-L --libs-only-other xext)',
217 '<!@(<(pkg-config) --libs-only-l xext)',
222 'target_name': 'xfixes',
224 'direct_dependent_settings': {
226 '<!@(<(pkg-config) --cflags xfixes)',
231 '<!@(<(pkg-config) --libs-only-L --libs-only-other xfixes)',
234 '<!@(<(pkg-config) --libs-only-l xfixes)',
241 'direct_dependent_settings': {
243 '<!@(<(pkg-config) --cflags xi)',
248 '<!@(<(pkg-config) --libs-only-L --libs-only-other xi)',
251 '<!@(<(pkg-config) --libs-only-l xi)',
256 'target_name': 'xrandr',
258 'toolsets': ['host', 'target'],
260 ['_toolset=="target"', {
261 'direct_dependent_settings': {
263 '<!@(<(pkg-config) --cflags xrandr)',
268 '<!@(<(pkg-config) --libs-only-L --libs-only-other xrandr)',
271 '<!@(<(pkg-config) --libs-only-l xrandr)',
275 'direct_dependent_settings': {
277 '<!@(pkg-config --cflags xrandr)',
282 '<!@(pkg-config --libs-only-L --libs-only-other xrandr)',
285 '<!@(pkg-config --libs-only-l xrandr)',
292 'target_name': 'xrender',
294 'direct_dependent_settings': {
296 '<!@(<(pkg-config) --cflags xrender)',
301 '<!@(<(pkg-config) --libs-only-L --libs-only-other xrender)',
304 '<!@(<(pkg-config) --libs-only-l xrender)',
309 'target_name': 'xscrnsaver',
311 'direct_dependent_settings': {
313 '<!@(<(pkg-config) --cflags xscrnsaver)',
318 '<!@(<(pkg-config) --libs-only-L --libs-only-other xscrnsaver)',
321 '<!@(<(pkg-config) --libs-only-l xscrnsaver)',
326 'target_name': 'xtst',
328 'toolsets': ['host', 'target'],
330 ['_toolset=="target"', {
331 'direct_dependent_settings': {
333 '<!@(<(pkg-config) --cflags xtst)',
338 '<!@(<(pkg-config) --libs-only-L --libs-only-other xtst)',
341 '<!@(<(pkg-config) --libs-only-l xtst)',
345 'direct_dependent_settings': {
347 '<!@(pkg-config --cflags xtst)',
352 '<!@(pkg-config --libs-only-L --libs-only-other xtst)',
355 '<!@(pkg-config --libs-only-l xtst)',
363 ['use_evdev_gestures==1', {
366 'target_name': 'libevdev-cros',
368 'direct_dependent_settings': {
370 '<!@(<(pkg-config) --cflags libevdev-cros)'
375 '<!@(<(pkg-config) --libs-only-L --libs-only-other libevdev-cros)',
378 '<!@(<(pkg-config) --libs-only-l libevdev-cros)',
383 'target_name': 'libgestures',
385 'direct_dependent_settings': {
387 '<!@(<(pkg-config) --cflags libgestures)'
392 '<!@(<(pkg-config) --libs-only-L --libs-only-other libgestures)',
395 '<!@(<(pkg-config) --libs-only-l libgestures)',
404 'target_name': 'dbus',
406 'direct_dependent_settings': {
408 '<!@(<(pkg-config) --cflags dbus-1)',
413 '<!@(<(pkg-config) --libs-only-L --libs-only-other dbus-1)',
416 '<!@(<(pkg-config) --libs-only-l dbus-1)',
421 'target_name': 'dridrm',
423 'direct_dependent_settings': {
425 '<!@(<(pkg-config) --cflags libdrm)',
430 '<!@(<(pkg-config) --libs-only-l libdrm)',
435 'target_name': 'fontconfig',
438 ['_toolset=="target"', {
440 ['use_system_fontconfig==1', {
441 'direct_dependent_settings': {
443 '<!@(<(pkg-config) --cflags fontconfig)',
448 '<!@(<(pkg-config) --libs-only-L --libs-only-other fontconfig)',
451 '<!@(<(pkg-config) --libs-only-l fontconfig)',
454 }, { # use_system_fontconfig==0
456 '../../third_party/fontconfig/fontconfig.gyp:fontconfig',
458 'export_dependent_settings' : [
459 '../../third_party/fontconfig/fontconfig.gyp:fontconfig',
467 'target_name': 'freetype2',
470 ['_toolset=="target"', {
471 'direct_dependent_settings': {
473 '<!@(<(pkg-config) --cflags freetype2)',
478 '<!@(<(pkg-config) --libs-only-L --libs-only-other freetype2)',
481 '<!@(<(pkg-config) --libs-only-l freetype2)',
488 'target_name': 'gconf',
491 ['use_gconf==1 and _toolset=="target"', {
492 'direct_dependent_settings': {
494 '<!@(<(pkg-config) --cflags gconf-2.0)',
502 '<!@(<(pkg-config) --libs-only-L --libs-only-other gconf-2.0)',
505 '<!@(<(pkg-config) --libs-only-l gconf-2.0)',
512 'target_name': 'gio',
513 'type': 'static_library',
515 ['use_gio==1 and _toolset=="target"', {
517 '<!@(<(pkg-config) --cflags gio-2.0)',
519 'direct_dependent_settings': {
521 '<!@(<(pkg-config) --cflags gio-2.0)',
527 '<(SHARED_INTERMEDIATE_DIR)',
535 '<!@(<(pkg-config) --libs-only-L --libs-only-other gio-2.0)',
538 '<!@(<(pkg-config) --libs-only-l gio-2.0)',
541 ['linux_link_gsettings==0 and OS=="linux"', {
548 'hard_dependency': 1,
552 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libgio.h',
553 'output_cc': '<(INTERMEDIATE_DIR)/libgio_loader.cc',
554 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
556 'action_name': 'generate_libgio_loader',
566 '--name', 'LibGioLoader',
567 '--output-h', '<(output_h)',
568 '--output-cc', '<(output_cc)',
569 '--header', '<gio/gio.h>',
570 '--link-directly=<(linux_link_gsettings)',
572 'g_settings_get_child',
573 'g_settings_get_string',
574 'g_settings_get_boolean',
575 'g_settings_get_int',
576 'g_settings_get_strv',
577 'g_settings_list_schemas',
579 'message': 'Generating libgio library loader',
580 'process_outputs_as_sources': 1,
587 'target_name': 'glib',
589 'toolsets': ['host', 'target'],
591 'glib_packages': 'glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0',
594 ['_toolset=="target"', {
595 'direct_dependent_settings': {
597 '<!@(<(pkg-config) --cflags <(glib_packages))',
602 '<!@(<(pkg-config) --libs-only-L --libs-only-other <(glib_packages))',
605 '<!@(<(pkg-config) --libs-only-l <(glib_packages))',
609 'direct_dependent_settings': {
611 '<!@(pkg-config --cflags <(glib_packages))',
616 '<!@(pkg-config --libs-only-L --libs-only-other <(glib_packages))',
619 '<!@(pkg-config --libs-only-l <(glib_packages))',
626 'target_name': 'gnome_keyring',
629 ['use_gnome_keyring==1', {
630 'direct_dependent_settings': {
632 '<!@(<(pkg-config) --cflags gnome-keyring-1)',
638 ['linux_link_gnome_keyring==0', {
639 'defines': ['DLOPEN_GNOME_KEYRING'],
644 ['linux_link_gnome_keyring!=0', {
647 '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
650 '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
669 # The unit tests use a few convenience functions from the GNOME
670 # Keyring library directly. We ignore linux_link_gnome_keyring and
671 # link directly in this version of the target to allow this.
672 # *** Do not use this target in the main binary! ***
673 'target_name': 'gnome_keyring_direct',
676 ['use_gnome_keyring==1', {
677 'direct_dependent_settings': {
679 '<!@(<(pkg-config) --cflags gnome-keyring-1)',
685 ['linux_link_gnome_keyring==0', {
686 'defines': ['DLOPEN_GNOME_KEYRING'],
692 '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
695 '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
702 'target_name': 'libbrlapi',
703 'type': 'static_library',
704 'all_dependent_settings': {
706 '<(SHARED_INTERMEDIATE_DIR)',
712 ['linux_link_libbrlapi==1', {
724 'hard_dependency': 1,
728 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libbrlapi.h',
729 'output_cc': '<(INTERMEDIATE_DIR)/libbrlapi_loader.cc',
730 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
732 'action_name': 'generate_brlapi_loader',
742 '--name', 'LibBrlapiLoader',
743 '--output-h', '<(output_h)',
744 '--output-cc', '<(output_cc)',
745 '--header', '<brlapi.h>',
746 '--link-directly=<(linux_link_libbrlapi)',
747 'brlapi_getHandleSize',
748 'brlapi_error_location',
749 'brlapi_expandKeyCode',
751 'brlapi__acceptKeys',
752 'brlapi__openConnection',
753 'brlapi__closeConnection',
754 'brlapi__getDisplaySize',
755 'brlapi__enterTtyModeWithPath',
756 'brlapi__leaveTtyMode',
760 'message': 'Generating libbrlapi library loader',
761 'process_outputs_as_sources': 1,
766 'target_name': 'libcap',
775 'target_name': 'libgcrypt',
778 ['_toolset=="target" and use_cups==1', {
779 'direct_dependent_settings': {
781 '<!@(<(libgcrypt-config) --cflags)',
786 # libgcrypt-config does not support --libs-only-l options,
787 # and the result contains -L options, which shouldn't be in
788 # the entries of 'libraries'. So filter them out.
789 '<!@(<(libgcrypt-config) --libs | sed -e \'s/-L[^ ]*//g\')',
796 'target_name': 'libpci',
797 'type': 'static_library',
799 '<!@(<(pkg-config) --cflags libpci)',
801 'direct_dependent_settings': {
803 '<(SHARED_INTERMEDIATE_DIR)',
806 ['linux_link_libpci==1', {
809 '<!@(<(pkg-config) --libs-only-L --libs-only-other libpci)',
812 '<!@(<(pkg-config) --libs-only-l libpci)',
821 'hard_dependency': 1,
825 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libpci.h',
826 'output_cc': '<(INTERMEDIATE_DIR)/libpci_loader.cc',
827 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
829 'action_name': 'generate_libpci_loader',
839 '--name', 'LibPciLoader',
840 '--output-h', '<(output_h)',
841 '--output-cc', '<(output_cc)',
842 '--header', '<pci/pci.h>',
843 # TODO(phajdan.jr): Report problem to pciutils project
844 # and get it fixed so that we don't need --use-extern-c.
846 '--link-directly=<(linux_link_libpci)',
854 'message': 'Generating libpci library loader',
855 'process_outputs_as_sources': 1,
860 'target_name': 'libresolv',
869 'target_name': 'libspeechd',
870 'type': 'static_library',
871 'direct_dependent_settings': {
873 '<(SHARED_INTERMEDIATE_DIR)',
876 ['linux_link_libspeechd==1', {
888 'hard_dependency': 1,
892 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libspeechd.h',
893 'output_cc': '<(INTERMEDIATE_DIR)/libspeechd_loader.cc',
894 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
896 # speech-dispatcher >= 0.8 installs libspeechd.h into
897 # speech-dispatcher/libspeechd.h, whereas speech-dispatcher < 0.8
898 # puts libspeechd.h in the top-level include directory.
899 # Since we need to support both cases for now, we ship a copy of
900 # libspeechd.h in third_party/speech-dispatcher. If the user
901 # prefers to link against the speech-dispatcher directly, the
902 # `libspeechd_h_prefix' variable can be passed to gyp with a value
903 # such as "speech-dispatcher/" that will be prepended to
904 # "libspeechd.h" in the #include directive.
905 # TODO(phaldan.jr): Once we do not need to support
906 # speech-dispatcher < 0.8 we can get rid of all this (including
907 # third_party/speech-dispatcher) and just include
908 # speech-dispatcher/libspeechd.h unconditionally.
909 'libspeechd_h_prefix%': '',
911 'action_name': 'generate_libspeechd_loader',
921 '--name', 'LibSpeechdLoader',
922 '--output-h', '<(output_h)',
923 '--output-cc', '<(output_cc)',
924 '--header', '<<(libspeechd_h_prefix)libspeechd.h>',
926 '"third_party/speech-dispatcher/libspeechd.h"',
927 '--link-directly=<(linux_link_libspeechd)',
934 'spd_set_notification_on',
935 'spd_set_voice_rate',
936 'spd_set_voice_pitch',
937 'spd_list_synthesis_voices',
938 'spd_set_synthesis_voice',
940 'spd_set_output_module',
942 'message': 'Generating libspeechd library loader',
943 'process_outputs_as_sources': 1,
948 'target_name': 'pangocairo',
950 'toolsets': ['host', 'target'],
952 ['_toolset=="target"', {
953 'direct_dependent_settings': {
955 '<!@(<(pkg-config) --cflags pangocairo pangoft2)',
960 '<!@(<(pkg-config) --libs-only-L --libs-only-other pangocairo pangoft2)',
963 '<!@(<(pkg-config) --libs-only-l pangocairo pangoft2)',
967 'direct_dependent_settings': {
969 '<!@(pkg-config --cflags pangocairo pangoft2)',
974 '<!@(pkg-config --libs-only-L --libs-only-other pangocairo pangoft2)',
977 '<!@(pkg-config --libs-only-l pangocairo pangoft2)',
984 'target_name': 'ssl',
987 ['_toolset=="target"', {
991 '../../third_party/openssl/openssl.gyp:openssl',
996 '../../net/third_party/nss/ssl.gyp:libssl',
998 'direct_dependent_settings': {
1000 # We need for our local copies of the libssl3 headers to come
1001 # before other includes, as we are shadowing system headers.
1002 '<(DEPTH)/net/third_party/nss/ssl',
1005 '<!@(<(pkg-config) --cflags nss)',
1010 '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
1013 '<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")',
1017 ['use_openssl==0 and clang==1', {
1018 'direct_dependent_settings': {
1020 # There is a broken header guard in /usr/include/nss/secmod.h:
1021 # https://bugzilla.mozilla.org/show_bug.cgi?id=884072
1022 '-Wno-header-guard',
1031 'target_name': 'udev',
1034 # libudev is not available on *BSD
1035 ['_toolset=="target" and os_bsd!=1', {
1036 'direct_dependent_settings': {
1038 '<!@(<(pkg-config) --cflags libudev)'
1043 '<!@(<(pkg-config) --libs-only-L --libs-only-other libudev)',
1046 '<!@(<(pkg-config) --libs-only-l libudev)',