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'],
300 'glib_packages': 'glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0',
303 ['_toolset=="target"', {
304 'direct_dependent_settings': {
306 '<!@(<(pkg-config) --cflags <(glib_packages))',
311 '<!@(<(pkg-config) --libs-only-L --libs-only-other <(glib_packages))',
314 '<!@(<(pkg-config) --libs-only-l <(glib_packages))',
318 'direct_dependent_settings': {
320 '<!@(pkg-config --cflags <(glib_packages))',
325 '<!@(pkg-config --libs-only-L --libs-only-other <(glib_packages))',
328 '<!@(pkg-config --libs-only-l <(glib_packages))',
334 'libraries': [ '-lXtst' ]
340 'target_name': 'gnome_keyring',
343 ['use_gnome_keyring==1', {
344 'direct_dependent_settings': {
346 '<!@(<(pkg-config) --cflags gnome-keyring-1)',
352 ['linux_link_gnome_keyring==0', {
353 'defines': ['DLOPEN_GNOME_KEYRING'],
358 ['linux_link_gnome_keyring!=0', {
361 '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
364 '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
383 # The unit tests use a few convenience functions from the GNOME
384 # Keyring library directly. We ignore linux_link_gnome_keyring and
385 # link directly in this version of the target to allow this.
386 # *** Do not use this target in the main binary! ***
387 'target_name': 'gnome_keyring_direct',
390 ['use_gnome_keyring==1', {
391 'direct_dependent_settings': {
393 '<!@(<(pkg-config) --cflags gnome-keyring-1)',
399 ['linux_link_gnome_keyring==0', {
400 'defines': ['DLOPEN_GNOME_KEYRING'],
406 '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
409 '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
416 'target_name': 'libbrlapi',
417 'type': 'static_library',
418 'all_dependent_settings': {
420 '<(SHARED_INTERMEDIATE_DIR)',
426 ['linux_link_libbrlapi==1', {
438 'hard_dependency': 1,
442 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libbrlapi.h',
443 'output_cc': '<(INTERMEDIATE_DIR)/libbrlapi_loader.cc',
444 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
446 'action_name': 'generate_brlapi_loader',
456 '--name', 'LibBrlapiLoader',
457 '--output-h', '<(output_h)',
458 '--output-cc', '<(output_cc)',
459 '--header', '<brlapi.h>',
460 '--link-directly=<(linux_link_libbrlapi)',
461 'brlapi_getHandleSize',
462 'brlapi_error_location',
463 'brlapi_expandKeyCode',
465 'brlapi__acceptKeys',
466 'brlapi__openConnection',
467 'brlapi__closeConnection',
468 'brlapi__getDisplaySize',
469 'brlapi__enterTtyModeWithPath',
470 'brlapi__leaveTtyMode',
474 'message': 'Generating libbrlapi library loader',
475 'process_outputs_as_sources': 1,
480 'target_name': 'libcap',
489 'target_name': 'libgcrypt',
492 ['_toolset=="target" and use_cups==1', {
493 'direct_dependent_settings': {
495 '<!@(libgcrypt-config --cflags)',
500 '<!@(libgcrypt-config --libs)',
507 'target_name': 'libpci',
508 'type': 'static_library',
510 '<!@(<(pkg-config) --cflags libpci)',
512 'direct_dependent_settings': {
514 '<(SHARED_INTERMEDIATE_DIR)',
517 ['linux_link_libpci==1', {
520 '<!@(<(pkg-config) --libs-only-L --libs-only-other libpci)',
523 '<!@(<(pkg-config) --libs-only-l libpci)',
532 'hard_dependency': 1,
536 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libpci.h',
537 'output_cc': '<(INTERMEDIATE_DIR)/libpci_loader.cc',
538 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
540 'action_name': 'generate_libpci_loader',
550 '--name', 'LibPciLoader',
551 '--output-h', '<(output_h)',
552 '--output-cc', '<(output_cc)',
553 '--header', '<pci/pci.h>',
554 # TODO(phajdan.jr): Report problem to pciutils project
555 # and get it fixed so that we don't need --use-extern-c.
557 '--link-directly=<(linux_link_libpci)',
565 'message': 'Generating libpci library loader',
566 'process_outputs_as_sources': 1,
571 'target_name': 'libresolv',
580 'target_name': 'libspeechd',
581 'type': 'static_library',
582 'direct_dependent_settings': {
584 '<(SHARED_INTERMEDIATE_DIR)',
587 ['linux_link_libspeechd==1', {
599 'hard_dependency': 1,
603 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libspeechd.h',
604 'output_cc': '<(INTERMEDIATE_DIR)/libspeechd_loader.cc',
605 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
607 # speech-dispatcher >= 0.8 installs libspeechd.h into
608 # speech-dispatcher/libspeechd.h, whereas speech-dispatcher < 0.8
609 # puts libspeechd.h in the top-level include directory.
610 # Since we need to support both cases for now, we ship a copy of
611 # libspeechd.h in third_party/speech-dispatcher. If the user
612 # prefers to link against the speech-dispatcher directly, the
613 # `libspeechd_h_prefix' variable can be passed to gyp with a value
614 # such as "speech-dispatcher/" that will be prepended to
615 # "libspeechd.h" in the #include directive.
616 # TODO(phaldan.jr): Once we do not need to support
617 # speech-dispatcher < 0.8 we can get rid of all this (including
618 # third_party/speech-dispatcher) and just include
619 # speech-dispatcher/libspeechd.h unconditionally.
620 'libspeechd_h_prefix%': '',
622 'action_name': 'generate_libspeechd_loader',
632 '--name', 'LibSpeechdLoader',
633 '--output-h', '<(output_h)',
634 '--output-cc', '<(output_cc)',
635 '--header', '<<(libspeechd_h_prefix)libspeechd.h>',
637 '"third_party/speech-dispatcher/libspeechd.h"',
638 '--link-directly=<(linux_link_libspeechd)',
645 'spd_set_notification_on',
646 'spd_set_voice_rate',
647 'spd_set_voice_pitch',
648 'spd_list_synthesis_voices',
649 'spd_set_synthesis_voice',
651 'spd_set_output_module',
653 'message': 'Generating libspeechd library loader',
654 'process_outputs_as_sources': 1,
659 'target_name': 'pangocairo',
661 'toolsets': ['host', 'target'],
663 ['_toolset=="target"', {
664 'direct_dependent_settings': {
666 '<!@(<(pkg-config) --cflags pangocairo pangoft2)',
671 '<!@(<(pkg-config) --libs-only-L --libs-only-other pangocairo pangoft2)',
674 '<!@(<(pkg-config) --libs-only-l pangocairo pangoft2)',
678 'direct_dependent_settings': {
680 '<!@(pkg-config --cflags pangocairo pangoft2)',
685 '<!@(pkg-config --libs-only-L --libs-only-other pangocairo pangoft2)',
688 '<!@(pkg-config --libs-only-l pangocairo pangoft2)',
695 'target_name': 'ssl',
698 ['_toolset=="target"', {
702 '../../third_party/openssl/openssl.gyp:openssl',
707 '../../net/third_party/nss/ssl.gyp:libssl',
709 'direct_dependent_settings': {
711 # We need for our local copies of the libssl3 headers to come
712 # before other includes, as we are shadowing system headers.
713 '<(DEPTH)/net/third_party/nss/ssl',
716 '<!@(<(pkg-config) --cflags nss)',
721 '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
724 '<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")',
728 ['use_openssl==0 and clang==1', {
729 'direct_dependent_settings': {
731 # There is a broken header guard in /usr/include/nss/secmod.h:
732 # https://bugzilla.mozilla.org/show_bug.cgi?id=884072
742 'target_name': 'udev',
745 # libudev is not available on *BSD
746 ['_toolset=="target" and os_bsd!=1', {
747 'direct_dependent_settings': {
749 '<!@(<(pkg-config) --cflags libudev)'
754 '<!@(<(pkg-config) --libs-only-L --libs-only-other libudev)',
757 '<!@(<(pkg-config) --libs-only-l libudev)',
764 'target_name': 'x11',
766 'toolsets': ['host', 'target'],
768 ['_toolset=="target"', {
769 'direct_dependent_settings': {
771 '<!@(<(pkg-config) --cflags x11)',
776 '<!@(<(pkg-config) --libs-only-L --libs-only-other x11 xi)',
779 '<!@(<(pkg-config) --libs-only-l x11 xi)',
783 'direct_dependent_settings': {
785 '<!@(pkg-config --cflags x11)',
790 '<!@(pkg-config --libs-only-L --libs-only-other x11 xi)',
793 '<!@(pkg-config --libs-only-l x11 xi)',
800 'target_name': 'xcursor',
802 'direct_dependent_settings': {
804 '<!@(<(pkg-config) --cflags xcursor)',
809 '<!@(<(pkg-config) --libs-only-L --libs-only-other xcursor)',
812 '<!@(<(pkg-config) --libs-only-l xcursor)',
817 'target_name': 'xcomposite',
819 'direct_dependent_settings': {
821 '<!@(<(pkg-config) --cflags xcomposite)',
826 '<!@(<(pkg-config) --libs-only-L --libs-only-other xcomposite)',
829 '<!@(<(pkg-config) --libs-only-l xcomposite)',
834 'target_name': 'xdamage',
836 'direct_dependent_settings': {
838 '<!@(<(pkg-config) --cflags xdamage)',
843 '<!@(<(pkg-config) --libs-only-L --libs-only-other xdamage)',
846 '<!@(<(pkg-config) --libs-only-l xdamage)',
851 'target_name': 'xext',
853 'direct_dependent_settings': {
855 '<!@(<(pkg-config) --cflags xext)',
860 '<!@(<(pkg-config) --libs-only-L --libs-only-other xext)',
863 '<!@(<(pkg-config) --libs-only-l xext)',
868 'target_name': 'xfixes',
870 'direct_dependent_settings': {
872 '<!@(<(pkg-config) --cflags xfixes)',
877 '<!@(<(pkg-config) --libs-only-L --libs-only-other xfixes)',
880 '<!@(<(pkg-config) --libs-only-l xfixes)',
887 'direct_dependent_settings': {
889 '<!@(<(pkg-config) --cflags xi)',
894 '<!@(<(pkg-config) --libs-only-L --libs-only-other xi)',
897 '<!@(<(pkg-config) --libs-only-l xi)',
902 'target_name': 'xrandr',
904 'toolsets': ['host', 'target'],
906 ['_toolset=="target"', {
907 'direct_dependent_settings': {
909 '<!@(<(pkg-config) --cflags xrandr)',
914 '<!@(<(pkg-config) --libs-only-L --libs-only-other xrandr)',
917 '<!@(<(pkg-config) --libs-only-l xrandr)',
921 'direct_dependent_settings': {
923 '<!@(pkg-config --cflags xrandr)',
928 '<!@(pkg-config --libs-only-L --libs-only-other xrandr)',
931 '<!@(pkg-config --libs-only-l xrandr)',
938 'target_name': 'xrender',
940 'direct_dependent_settings': {
942 '<!@(<(pkg-config) --cflags xrender)',
947 '<!@(<(pkg-config) --libs-only-L --libs-only-other xrender)',
950 '<!@(<(pkg-config) --libs-only-l xrender)',
955 'target_name': 'xtst',
957 'direct_dependent_settings': {
959 '<!@(<(pkg-config) --cflags xtst)',
964 '<!@(<(pkg-config) --libs-only-L --libs-only-other xtst)',
967 '<!@(<(pkg-config) --libs-only-l xtst)',