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)"',
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)',
111 # Hide X11 and related dependencies when use_x11=0
114 'target_name': 'x11',
116 'toolsets': ['host', 'target'],
118 ['_toolset=="target"', {
119 'direct_dependent_settings': {
121 '<!@(<(pkg-config) --cflags x11)',
126 '<!@(<(pkg-config) --libs-only-L --libs-only-other x11 xi)',
129 '<!@(<(pkg-config) --libs-only-l x11 xi)',
133 'direct_dependent_settings': {
135 '<!@(pkg-config --cflags x11)',
140 '<!@(pkg-config --libs-only-L --libs-only-other x11 xi)',
143 '<!@(pkg-config --libs-only-l x11 xi)',
150 'target_name': 'xcursor',
152 'direct_dependent_settings': {
154 '<!@(<(pkg-config) --cflags xcursor)',
159 '<!@(<(pkg-config) --libs-only-L --libs-only-other xcursor)',
162 '<!@(<(pkg-config) --libs-only-l xcursor)',
167 'target_name': 'xcomposite',
169 'direct_dependent_settings': {
171 '<!@(<(pkg-config) --cflags xcomposite)',
176 '<!@(<(pkg-config) --libs-only-L --libs-only-other xcomposite)',
179 '<!@(<(pkg-config) --libs-only-l xcomposite)',
184 'target_name': 'xdamage',
186 'direct_dependent_settings': {
188 '<!@(<(pkg-config) --cflags xdamage)',
193 '<!@(<(pkg-config) --libs-only-L --libs-only-other xdamage)',
196 '<!@(<(pkg-config) --libs-only-l xdamage)',
201 'target_name': 'xext',
203 'direct_dependent_settings': {
205 '<!@(<(pkg-config) --cflags xext)',
210 '<!@(<(pkg-config) --libs-only-L --libs-only-other xext)',
213 '<!@(<(pkg-config) --libs-only-l xext)',
218 'target_name': 'xfixes',
220 'direct_dependent_settings': {
222 '<!@(<(pkg-config) --cflags xfixes)',
227 '<!@(<(pkg-config) --libs-only-L --libs-only-other xfixes)',
230 '<!@(<(pkg-config) --libs-only-l xfixes)',
237 'direct_dependent_settings': {
239 '<!@(<(pkg-config) --cflags xi)',
244 '<!@(<(pkg-config) --libs-only-L --libs-only-other xi)',
247 '<!@(<(pkg-config) --libs-only-l xi)',
252 'target_name': 'xrandr',
254 'toolsets': ['host', 'target'],
256 ['_toolset=="target"', {
257 'direct_dependent_settings': {
259 '<!@(<(pkg-config) --cflags xrandr)',
264 '<!@(<(pkg-config) --libs-only-L --libs-only-other xrandr)',
267 '<!@(<(pkg-config) --libs-only-l xrandr)',
271 'direct_dependent_settings': {
273 '<!@(pkg-config --cflags xrandr)',
278 '<!@(pkg-config --libs-only-L --libs-only-other xrandr)',
281 '<!@(pkg-config --libs-only-l xrandr)',
288 'target_name': 'xrender',
290 'direct_dependent_settings': {
292 '<!@(<(pkg-config) --cflags xrender)',
297 '<!@(<(pkg-config) --libs-only-L --libs-only-other xrender)',
300 '<!@(<(pkg-config) --libs-only-l xrender)',
305 'target_name': 'xscrnsaver',
307 'direct_dependent_settings': {
309 '<!@(<(pkg-config) --cflags xscrnsaver)',
314 '<!@(<(pkg-config) --libs-only-L --libs-only-other xscrnsaver)',
317 '<!@(<(pkg-config) --libs-only-l xscrnsaver)',
322 'target_name': 'xtst',
324 'toolsets': ['host', 'target'],
326 ['_toolset=="target"', {
327 'direct_dependent_settings': {
329 '<!@(<(pkg-config) --cflags xtst)',
334 '<!@(<(pkg-config) --libs-only-L --libs-only-other xtst)',
337 '<!@(<(pkg-config) --libs-only-l xtst)',
341 'direct_dependent_settings': {
343 '<!@(pkg-config --cflags xtst)',
348 '<!@(pkg-config --libs-only-L --libs-only-other xtst)',
351 '<!@(pkg-config --libs-only-l xtst)',
362 'target_name': 'dbus',
364 'direct_dependent_settings': {
366 '<!@(<(pkg-config) --cflags dbus-1)',
371 '<!@(<(pkg-config) --libs-only-L --libs-only-other dbus-1)',
374 '<!@(<(pkg-config) --libs-only-l dbus-1)',
379 'target_name': 'dridrm',
381 'direct_dependent_settings': {
383 '<!@(<(pkg-config) --cflags libdrm)',
388 '<!@(<(pkg-config) --libs-only-l libdrm)',
393 'target_name': 'fontconfig',
396 ['_toolset=="target"', {
398 ['use_system_fontconfig==1', {
399 'direct_dependent_settings': {
401 '<!@(<(pkg-config) --cflags fontconfig)',
406 '<!@(<(pkg-config) --libs-only-L --libs-only-other fontconfig)',
409 '<!@(<(pkg-config) --libs-only-l fontconfig)',
412 }, { # use_system_fontconfig==0
414 '../../third_party/fontconfig/fontconfig.gyp:fontconfig',
416 'export_dependent_settings' : [
417 '../../third_party/fontconfig/fontconfig.gyp:fontconfig',
425 'target_name': 'freetype2',
428 ['_toolset=="target"', {
429 'direct_dependent_settings': {
431 '<!@(<(pkg-config) --cflags freetype2)',
436 '<!@(<(pkg-config) --libs-only-L --libs-only-other freetype2)',
439 '<!@(<(pkg-config) --libs-only-l freetype2)',
446 'target_name': 'gconf',
449 ['use_gconf==1 and _toolset=="target"', {
450 'direct_dependent_settings': {
452 '<!@(<(pkg-config) --cflags gconf-2.0)',
460 '<!@(<(pkg-config) --libs-only-L --libs-only-other gconf-2.0)',
463 '<!@(<(pkg-config) --libs-only-l gconf-2.0)',
470 'target_name': 'gio',
471 'type': 'static_library',
473 ['use_gio==1 and _toolset=="target"', {
475 '<!@(<(pkg-config) --cflags gio-2.0)',
477 'direct_dependent_settings': {
479 '<!@(<(pkg-config) --cflags gio-2.0)',
485 '<(SHARED_INTERMEDIATE_DIR)',
493 '<!@(<(pkg-config) --libs-only-L --libs-only-other gio-2.0)',
496 '<!@(<(pkg-config) --libs-only-l gio-2.0)',
499 ['linux_link_gsettings==0 and OS=="linux"', {
506 'hard_dependency': 1,
510 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libgio.h',
511 'output_cc': '<(INTERMEDIATE_DIR)/libgio_loader.cc',
512 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
514 'action_name': 'generate_libgio_loader',
524 '--name', 'LibGioLoader',
525 '--output-h', '<(output_h)',
526 '--output-cc', '<(output_cc)',
527 '--header', '<gio/gio.h>',
528 '--link-directly=<(linux_link_gsettings)',
530 'g_settings_get_child',
531 'g_settings_get_string',
532 'g_settings_get_boolean',
533 'g_settings_get_int',
534 'g_settings_get_strv',
535 'g_settings_list_schemas',
537 'message': 'Generating libgio library loader',
538 'process_outputs_as_sources': 1,
545 'target_name': 'glib',
547 'toolsets': ['host', 'target'],
549 'glib_packages': 'glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0',
552 ['_toolset=="target"', {
553 'direct_dependent_settings': {
555 '<!@(<(pkg-config) --cflags <(glib_packages))',
560 '<!@(<(pkg-config) --libs-only-L --libs-only-other <(glib_packages))',
563 '<!@(<(pkg-config) --libs-only-l <(glib_packages))',
567 'direct_dependent_settings': {
569 '<!@(pkg-config --cflags <(glib_packages))',
574 '<!@(pkg-config --libs-only-L --libs-only-other <(glib_packages))',
577 '<!@(pkg-config --libs-only-l <(glib_packages))',
584 'target_name': 'gnome_keyring',
587 ['use_gnome_keyring==1', {
588 'direct_dependent_settings': {
590 '<!@(<(pkg-config) --cflags gnome-keyring-1)',
596 ['linux_link_gnome_keyring==0', {
597 'defines': ['DLOPEN_GNOME_KEYRING'],
602 ['linux_link_gnome_keyring!=0', {
605 '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
608 '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
627 # The unit tests use a few convenience functions from the GNOME
628 # Keyring library directly. We ignore linux_link_gnome_keyring and
629 # link directly in this version of the target to allow this.
630 # *** Do not use this target in the main binary! ***
631 'target_name': 'gnome_keyring_direct',
634 ['use_gnome_keyring==1', {
635 'direct_dependent_settings': {
637 '<!@(<(pkg-config) --cflags gnome-keyring-1)',
643 ['linux_link_gnome_keyring==0', {
644 'defines': ['DLOPEN_GNOME_KEYRING'],
650 '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
653 '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
660 'target_name': 'libbrlapi',
661 'type': 'static_library',
662 'all_dependent_settings': {
664 '<(SHARED_INTERMEDIATE_DIR)',
670 ['linux_link_libbrlapi==1', {
682 'hard_dependency': 1,
686 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libbrlapi.h',
687 'output_cc': '<(INTERMEDIATE_DIR)/libbrlapi_loader.cc',
688 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
690 'action_name': 'generate_brlapi_loader',
700 '--name', 'LibBrlapiLoader',
701 '--output-h', '<(output_h)',
702 '--output-cc', '<(output_cc)',
703 '--header', '<brlapi.h>',
704 '--link-directly=<(linux_link_libbrlapi)',
705 'brlapi_getHandleSize',
706 'brlapi_error_location',
707 'brlapi_expandKeyCode',
709 'brlapi__acceptKeys',
710 'brlapi__openConnection',
711 'brlapi__closeConnection',
712 'brlapi__getDisplaySize',
713 'brlapi__enterTtyModeWithPath',
714 'brlapi__leaveTtyMode',
718 'message': 'Generating libbrlapi library loader',
719 'process_outputs_as_sources': 1,
724 'target_name': 'libcap',
733 'target_name': 'libgcrypt',
736 ['_toolset=="target" and use_cups==1', {
737 'direct_dependent_settings': {
739 '<!@(libgcrypt-config --cflags)',
744 '<!@(libgcrypt-config --libs)',
751 'target_name': 'libpci',
752 'type': 'static_library',
754 '<!@(<(pkg-config) --cflags libpci)',
756 'direct_dependent_settings': {
758 '<(SHARED_INTERMEDIATE_DIR)',
761 ['linux_link_libpci==1', {
764 '<!@(<(pkg-config) --libs-only-L --libs-only-other libpci)',
767 '<!@(<(pkg-config) --libs-only-l libpci)',
776 'hard_dependency': 1,
780 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libpci.h',
781 'output_cc': '<(INTERMEDIATE_DIR)/libpci_loader.cc',
782 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
784 'action_name': 'generate_libpci_loader',
794 '--name', 'LibPciLoader',
795 '--output-h', '<(output_h)',
796 '--output-cc', '<(output_cc)',
797 '--header', '<pci/pci.h>',
798 # TODO(phajdan.jr): Report problem to pciutils project
799 # and get it fixed so that we don't need --use-extern-c.
801 '--link-directly=<(linux_link_libpci)',
809 'message': 'Generating libpci library loader',
810 'process_outputs_as_sources': 1,
815 'target_name': 'libresolv',
824 'target_name': 'libspeechd',
825 'type': 'static_library',
826 'direct_dependent_settings': {
828 '<(SHARED_INTERMEDIATE_DIR)',
831 ['linux_link_libspeechd==1', {
843 'hard_dependency': 1,
847 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libspeechd.h',
848 'output_cc': '<(INTERMEDIATE_DIR)/libspeechd_loader.cc',
849 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
851 # speech-dispatcher >= 0.8 installs libspeechd.h into
852 # speech-dispatcher/libspeechd.h, whereas speech-dispatcher < 0.8
853 # puts libspeechd.h in the top-level include directory.
854 # Since we need to support both cases for now, we ship a copy of
855 # libspeechd.h in third_party/speech-dispatcher. If the user
856 # prefers to link against the speech-dispatcher directly, the
857 # `libspeechd_h_prefix' variable can be passed to gyp with a value
858 # such as "speech-dispatcher/" that will be prepended to
859 # "libspeechd.h" in the #include directive.
860 # TODO(phaldan.jr): Once we do not need to support
861 # speech-dispatcher < 0.8 we can get rid of all this (including
862 # third_party/speech-dispatcher) and just include
863 # speech-dispatcher/libspeechd.h unconditionally.
864 'libspeechd_h_prefix%': '',
866 'action_name': 'generate_libspeechd_loader',
876 '--name', 'LibSpeechdLoader',
877 '--output-h', '<(output_h)',
878 '--output-cc', '<(output_cc)',
879 '--header', '<<(libspeechd_h_prefix)libspeechd.h>',
881 '"third_party/speech-dispatcher/libspeechd.h"',
882 '--link-directly=<(linux_link_libspeechd)',
889 'spd_set_notification_on',
890 'spd_set_voice_rate',
891 'spd_set_voice_pitch',
892 'spd_list_synthesis_voices',
893 'spd_set_synthesis_voice',
895 'spd_set_output_module',
897 'message': 'Generating libspeechd library loader',
898 'process_outputs_as_sources': 1,
903 'target_name': 'pangocairo',
905 'toolsets': ['host', 'target'],
907 ['_toolset=="target"', {
908 'direct_dependent_settings': {
910 '<!@(<(pkg-config) --cflags pangocairo pangoft2)',
915 '<!@(<(pkg-config) --libs-only-L --libs-only-other pangocairo pangoft2)',
918 '<!@(<(pkg-config) --libs-only-l pangocairo pangoft2)',
922 'direct_dependent_settings': {
924 '<!@(pkg-config --cflags pangocairo pangoft2)',
929 '<!@(pkg-config --libs-only-L --libs-only-other pangocairo pangoft2)',
932 '<!@(pkg-config --libs-only-l pangocairo pangoft2)',
939 'target_name': 'ssl',
942 ['_toolset=="target"', {
946 '../../third_party/openssl/openssl.gyp:openssl',
951 '../../net/third_party/nss/ssl.gyp:libssl',
953 'direct_dependent_settings': {
955 # We need for our local copies of the libssl3 headers to come
956 # before other includes, as we are shadowing system headers.
957 '<(DEPTH)/net/third_party/nss/ssl',
960 '<!@(<(pkg-config) --cflags nss)',
965 '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
968 '<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")',
972 ['use_openssl==0 and clang==1', {
973 'direct_dependent_settings': {
975 # There is a broken header guard in /usr/include/nss/secmod.h:
976 # https://bugzilla.mozilla.org/show_bug.cgi?id=884072
986 'target_name': 'udev',
989 # libudev is not available on *BSD
990 ['_toolset=="target" and os_bsd!=1', {
991 'direct_dependent_settings': {
993 '<!@(<(pkg-config) --cflags libudev)'
998 '<!@(<(pkg-config) --libs-only-L --libs-only-other libudev)',
1001 '<!@(<(pkg-config) --libs-only-l libudev)',