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)" "<(system_libdir)"',
11 'pkg-config': 'pkg-config',
15 # If any of the linux_link_FOO below are set to 1, then the corresponding
16 # target will be linked against the FOO library (either dynamically or
17 # statically, depending on the pkg-config files), as opposed to loading the
18 # FOO library dynamically with dlopen.
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)',
114 [ 'use_x11==1 or ozone_platform_ozonex==1', {
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': 'xtst',
311 'toolsets': ['host', 'target'],
313 ['_toolset=="target"', {
314 'direct_dependent_settings': {
316 '<!@(<(pkg-config) --cflags xtst)',
321 '<!@(<(pkg-config) --libs-only-L --libs-only-other xtst)',
324 '<!@(<(pkg-config) --libs-only-l xtst)',
328 'direct_dependent_settings': {
330 '<!@(pkg-config --cflags xtst)',
335 '<!@(pkg-config --libs-only-L --libs-only-other xtst)',
338 '<!@(pkg-config --libs-only-l xtst)',
346 ['use_x11==1 and chromeos==0', {
349 'target_name': 'xscrnsaver',
351 'direct_dependent_settings': {
353 '<!@(<(pkg-config) --cflags xscrnsaver)',
358 '<!@(<(pkg-config) --libs-only-L --libs-only-other xscrnsaver)',
361 '<!@(<(pkg-config) --libs-only-l xscrnsaver)',
367 ['use_evdev_gestures==1', {
370 'target_name': 'libevdev-cros',
372 'direct_dependent_settings': {
374 '<!@(<(pkg-config) --cflags libevdev-cros)'
379 '<!@(<(pkg-config) --libs-only-L --libs-only-other libevdev-cros)',
382 '<!@(<(pkg-config) --libs-only-l libevdev-cros)',
387 'target_name': 'libgestures',
389 'direct_dependent_settings': {
391 '<!@(<(pkg-config) --cflags libgestures)'
396 '<!@(<(pkg-config) --libs-only-L --libs-only-other libgestures)',
399 '<!@(<(pkg-config) --libs-only-l libgestures)',
405 ['ozone_platform_gbm==1', {
408 'target_name': 'gbm',
410 'direct_dependent_settings': {
412 '<!@(<(pkg-config) --cflags gbm)',
417 '<!@(<(pkg-config) --libs-only-l gbm)',
423 ['ozone_platform_dri==1 or ozone_platform_gbm==1', {
426 'target_name': 'libdrm',
428 'direct_dependent_settings': {
430 '<!@(<(pkg-config) --cflags libdrm)',
435 '<!@(<(pkg-config) --libs-only-l libdrm)',
444 'target_name': 'udev',
447 ['_toolset=="target"', {
448 'direct_dependent_settings': {
450 '<!@(<(pkg-config) --cflags libudev)'
455 '<!@(<(pkg-config) --libs-only-L --libs-only-other libudev)',
458 '<!@(<(pkg-config) --libs-only-l libudev)',
469 'target_name': 'dbus',
471 'direct_dependent_settings': {
473 '<!@(<(pkg-config) --cflags dbus-1)',
478 '<!@(<(pkg-config) --libs-only-L --libs-only-other dbus-1)',
481 '<!@(<(pkg-config) --libs-only-l dbus-1)',
486 'target_name': 'fontconfig',
489 ['_toolset=="target"', {
491 ['use_system_fontconfig==1', {
492 'direct_dependent_settings': {
494 '<!@(<(pkg-config) --cflags fontconfig)',
499 '<!@(<(pkg-config) --libs-only-L --libs-only-other fontconfig)',
502 '<!@(<(pkg-config) --libs-only-l fontconfig)',
505 }, { # use_system_fontconfig==0
507 '../../third_party/fontconfig/fontconfig.gyp:fontconfig',
509 'export_dependent_settings' : [
510 '../../third_party/fontconfig/fontconfig.gyp:fontconfig',
518 'target_name': 'freetype2',
521 ['_toolset=="target"', {
522 'direct_dependent_settings': {
524 '<!@(<(pkg-config) --cflags freetype2)',
529 '<!@(<(pkg-config) --libs-only-L --libs-only-other freetype2)',
532 '<!@(<(pkg-config) --libs-only-l freetype2)',
539 'target_name': 'gconf',
542 ['use_gconf==1 and _toolset=="target"', {
543 'direct_dependent_settings': {
545 '<!@(<(pkg-config) --cflags gconf-2.0)',
553 '<!@(<(pkg-config) --libs-only-L --libs-only-other gconf-2.0)',
556 '<!@(<(pkg-config) --libs-only-l gconf-2.0)',
563 'target_name': 'gio',
564 'type': 'static_library',
566 ['use_gio==1 and _toolset=="target"', {
568 '<!@(<(pkg-config) --cflags gio-2.0)',
570 'direct_dependent_settings': {
572 '<!@(<(pkg-config) --cflags gio-2.0)',
578 '<(SHARED_INTERMEDIATE_DIR)',
586 '<!@(<(pkg-config) --libs-only-L --libs-only-other gio-2.0)',
589 '<!@(<(pkg-config) --libs-only-l gio-2.0)',
592 ['linux_link_gsettings==0 and OS=="linux"', {
599 'hard_dependency': 1,
603 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libgio.h',
604 'output_cc': '<(INTERMEDIATE_DIR)/libgio_loader.cc',
605 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
607 'action_name': 'generate_libgio_loader',
617 '--name', 'LibGioLoader',
618 '--output-h', '<(output_h)',
619 '--output-cc', '<(output_cc)',
620 '--header', '<gio/gio.h>',
621 '--link-directly=<(linux_link_gsettings)',
623 'g_settings_get_child',
624 'g_settings_get_string',
625 'g_settings_get_boolean',
626 'g_settings_get_int',
627 'g_settings_get_strv',
628 'g_settings_list_schemas',
630 'message': 'Generating libgio library loader',
631 'process_outputs_as_sources': 1,
638 'target_name': 'glib',
640 'toolsets': ['host', 'target'],
642 'glib_packages': 'glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0',
645 ['_toolset=="target"', {
646 'direct_dependent_settings': {
648 '<!@(<(pkg-config) --cflags <(glib_packages))',
653 '<!@(<(pkg-config) --libs-only-L --libs-only-other <(glib_packages))',
656 '<!@(<(pkg-config) --libs-only-l <(glib_packages))',
660 'direct_dependent_settings': {
662 '<!@(pkg-config --cflags <(glib_packages))',
667 '<!@(pkg-config --libs-only-L --libs-only-other <(glib_packages))',
670 '<!@(pkg-config --libs-only-l <(glib_packages))',
677 'target_name': 'gnome_keyring',
680 ['use_gnome_keyring==1', {
681 'direct_dependent_settings': {
683 '<!@(<(pkg-config) --cflags gnome-keyring-1)',
689 ['linux_link_gnome_keyring==0', {
690 'defines': ['DLOPEN_GNOME_KEYRING'],
695 ['linux_link_gnome_keyring!=0', {
698 '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
701 '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
720 # The unit tests use a few convenience functions from the GNOME
721 # Keyring library directly. We ignore linux_link_gnome_keyring and
722 # link directly in this version of the target to allow this.
723 # *** Do not use this target in the main binary! ***
724 'target_name': 'gnome_keyring_direct',
727 ['use_gnome_keyring==1', {
728 'direct_dependent_settings': {
730 '<!@(<(pkg-config) --cflags gnome-keyring-1)',
736 ['linux_link_gnome_keyring==0', {
737 'defines': ['DLOPEN_GNOME_KEYRING'],
743 '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
746 '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
753 'target_name': 'libbrlapi',
754 'type': 'static_library',
755 'all_dependent_settings': {
757 '<(SHARED_INTERMEDIATE_DIR)',
763 ['linux_link_libbrlapi==1', {
775 'hard_dependency': 1,
779 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libbrlapi.h',
780 'output_cc': '<(INTERMEDIATE_DIR)/libbrlapi_loader.cc',
781 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
783 'action_name': 'generate_brlapi_loader',
793 '--name', 'LibBrlapiLoader',
794 '--output-h', '<(output_h)',
795 '--output-cc', '<(output_cc)',
796 '--header', '<brlapi.h>',
797 '--link-directly=<(linux_link_libbrlapi)',
798 'brlapi_getHandleSize',
799 'brlapi_error_location',
801 'brlapi__acceptKeys',
802 'brlapi__openConnection',
803 'brlapi__closeConnection',
804 'brlapi__getDisplaySize',
805 'brlapi__enterTtyModeWithPath',
806 'brlapi__leaveTtyMode',
810 'message': 'Generating libbrlapi library loader',
811 'process_outputs_as_sources': 1,
816 'target_name': 'libcap',
825 'target_name': 'libpci',
826 'type': 'static_library',
828 '<!@(<(pkg-config) --cflags libpci)',
830 'direct_dependent_settings': {
832 '<(SHARED_INTERMEDIATE_DIR)',
835 ['linux_link_libpci==1', {
838 '<!@(<(pkg-config) --libs-only-L --libs-only-other libpci)',
841 '<!@(<(pkg-config) --libs-only-l libpci)',
850 'hard_dependency': 1,
854 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libpci.h',
855 'output_cc': '<(INTERMEDIATE_DIR)/libpci_loader.cc',
856 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
858 'action_name': 'generate_libpci_loader',
868 '--name', 'LibPciLoader',
869 '--output-h', '<(output_h)',
870 '--output-cc', '<(output_cc)',
871 '--header', '<pci/pci.h>',
872 # TODO(phajdan.jr): Report problem to pciutils project
873 # and get it fixed so that we don't need --use-extern-c.
875 '--link-directly=<(linux_link_libpci)',
883 'message': 'Generating libpci library loader',
884 'process_outputs_as_sources': 1,
889 'target_name': 'libresolv',
898 # GN version: //third_party/speech-dispatcher
899 'target_name': 'libspeechd',
900 'type': 'static_library',
901 'direct_dependent_settings': {
903 '<(SHARED_INTERMEDIATE_DIR)',
906 ['linux_link_libspeechd==1', {
918 'hard_dependency': 1,
922 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libspeechd.h',
923 'output_cc': '<(INTERMEDIATE_DIR)/libspeechd_loader.cc',
924 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
926 # speech-dispatcher >= 0.8 installs libspeechd.h into
927 # speech-dispatcher/libspeechd.h, whereas speech-dispatcher < 0.8
928 # puts libspeechd.h in the top-level include directory.
929 # Since we need to support both cases for now, we ship a copy of
930 # libspeechd.h in third_party/speech-dispatcher. If the user
931 # prefers to link against the speech-dispatcher directly, the
932 # `libspeechd_h_prefix' variable can be passed to gyp with a value
933 # such as "speech-dispatcher/" that will be prepended to
934 # "libspeechd.h" in the #include directive.
935 # TODO(phaldan.jr): Once we do not need to support
936 # speech-dispatcher < 0.8 we can get rid of all this (including
937 # third_party/speech-dispatcher) and just include
938 # speech-dispatcher/libspeechd.h unconditionally.
939 'libspeechd_h_prefix%': '',
941 'action_name': 'generate_libspeechd_loader',
951 '--name', 'LibSpeechdLoader',
952 '--output-h', '<(output_h)',
953 '--output-cc', '<(output_cc)',
954 '--header', '<<(libspeechd_h_prefix)libspeechd.h>',
956 '"third_party/speech-dispatcher/libspeechd.h"',
957 '--link-directly=<(linux_link_libspeechd)',
964 'spd_set_notification_on',
965 'spd_set_voice_rate',
966 'spd_set_voice_pitch',
967 'spd_list_synthesis_voices',
968 'spd_set_synthesis_voice',
970 'spd_set_output_module',
972 'message': 'Generating libspeechd library loader',
973 'process_outputs_as_sources': 1,
978 'target_name': 'pangocairo',
980 'toolsets': ['host', 'target'],
982 ['_toolset=="target"', {
983 'direct_dependent_settings': {
985 '<!@(<(pkg-config) --cflags pangocairo pangoft2)',
990 '<!@(<(pkg-config) --libs-only-L --libs-only-other pangocairo pangoft2)',
993 '<!@(<(pkg-config) --libs-only-l pangocairo pangoft2)',
997 'direct_dependent_settings': {
999 '<!@(pkg-config --cflags pangocairo pangoft2)',
1004 '<!@(pkg-config --libs-only-L --libs-only-other pangocairo pangoft2)',
1007 '<!@(pkg-config --libs-only-l pangocairo pangoft2)',
1014 'target_name': 'ssl',
1017 ['_toolset=="target"', {
1019 ['use_openssl==1', {
1021 '../../third_party/boringssl/boringssl.gyp:boringssl',
1024 ['use_openssl==0', {
1026 '../../net/third_party/nss/ssl.gyp:libssl',
1028 'direct_dependent_settings': {
1030 # We need for our local copies of the libssl3 headers to come
1031 # before other includes, as we are shadowing system headers.
1032 '<(DEPTH)/net/third_party/nss/ssl',
1035 '<!@(<(pkg-config) --cflags nss)',
1040 '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
1043 '<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")',
1047 ['use_openssl==0 and clang==1', {
1048 'direct_dependent_settings': {
1050 # There is a broken header guard in /usr/include/nss/secmod.h:
1051 # https://bugzilla.mozilla.org/show_bug.cgi?id=884072
1052 '-Wno-header-guard',