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,
21 [ 'os_posix==1 and OS!="mac"', {
23 # We use our own copy of libssl3, although we still need to link against
33 # Hide GTK and related dependencies for Chrome OS, so they won't get
34 # added back to Chrome OS. Don't try to use GTK on Chrome OS.
39 'toolsets': ['host', 'target'],
41 # gtk requires gmodule, but it does not list it as a dependency
42 # in some misconfigured systems.
43 'gtk_packages': 'gmodule-2.0 gtk+-2.0 gthread-2.0',
46 ['_toolset=="target"', {
47 'all_dependent_settings': {
49 '<!@(<(pkg-config) --cflags <(gtk_packages))',
54 '<!@(<(pkg-config) --libs-only-L --libs-only-other <(gtk_packages))',
57 '<!@(<(pkg-config) --libs-only-l <(gtk_packages))',
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))',
78 'target_name': 'gtkprint',
81 ['_toolset=="target"', {
82 'direct_dependent_settings': {
84 '<!@(<(pkg-config) --cflags gtk+-unix-print-2.0)',
89 '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-unix-print-2.0)',
92 '<!@(<(pkg-config) --libs-only-l gtk+-unix-print-2.0)',
102 ['_toolset=="target"', {
103 'direct_dependent_settings': {
105 '<!@(<(pkg-config) --cflags gdk-2.0)',
110 '<!@(<(pkg-config) --libs-only-L --libs-only-other gdk-2.0)',
113 '<!@(<(pkg-config) --libs-only-l gdk-2.0)',
121 ['linux_use_libgps==1', {
124 'target_name': 'libgps',
125 'type': 'static_library',
126 'all_dependent_settings': {
131 '<(SHARED_INTERMEDIATE_DIR)',
134 ['linux_link_libgps==1', {
136 '<!@(<(pkg-config) --cflags libgps)',
140 '<!@(<(pkg-config) --libs-only-L --libs-only-other libgps)',
143 '<!@(<(pkg-config) --libs-only-l libgps)',
152 'hard_dependency': 1,
156 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libgps.h',
157 'output_cc': '<(INTERMEDIATE_DIR)/libgps_loader.cc',
158 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
160 'action_name': 'generate_libgps_loader',
170 '--name', 'LibGpsLoader',
171 '--output-h', '<(output_h)',
172 '--output-cc', '<(output_cc)',
173 '--header', '<gps.h>',
174 '--bundled-header', '"third_party/gpsd/release-3.1/gps.h"',
175 '--link-directly=<(linux_link_libgps)',
179 # We don't use gps_shm_read() directly, just to make
180 # sure that libgps has the shared memory support.
183 'message': 'Generating libgps library loader.',
184 'process_outputs_as_sources': 1,
193 'target_name': 'ssl',
196 ['_toolset=="target"', {
200 '../../third_party/openssl/openssl.gyp:openssl',
203 ['use_openssl==0 and use_system_ssl==0', {
205 '../../net/third_party/nss/ssl.gyp:libssl',
207 'direct_dependent_settings': {
209 # We need for our local copies of the libssl3 headers to come
210 # before other includes, as we are shadowing system headers.
211 '<(DEPTH)/net/third_party/nss/ssl',
214 '<!@(<(pkg-config) --cflags nss)',
219 '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
222 '<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")',
226 ['use_openssl==0 and use_system_ssl==1', {
227 'direct_dependent_settings': {
229 '<!@(<(pkg-config) --cflags nss)',
237 '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
240 '<!@(<(pkg-config) --libs-only-l nss)',
244 ['use_openssl==0 and clang==1', {
245 'direct_dependent_settings': {
247 # There is a broken header guard in /usr/include/nss/secmod.h:
248 # https://bugzilla.mozilla.org/show_bug.cgi?id=884072
258 'target_name': 'freetype2',
261 ['_toolset=="target"', {
262 'direct_dependent_settings': {
264 '<!@(<(pkg-config) --cflags freetype2)',
269 '<!@(<(pkg-config) --libs-only-L --libs-only-other freetype2)',
272 '<!@(<(pkg-config) --libs-only-l freetype2)',
279 'target_name': 'fontconfig',
282 ['_toolset=="target"', {
283 'direct_dependent_settings': {
285 '<!@(<(pkg-config) --cflags fontconfig)',
290 '<!@(<(pkg-config) --libs-only-L --libs-only-other fontconfig)',
293 '<!@(<(pkg-config) --libs-only-l fontconfig)',
300 'target_name': 'gconf',
303 ['use_gconf==1 and _toolset=="target"', {
304 'direct_dependent_settings': {
306 '<!@(<(pkg-config) --cflags gconf-2.0)',
314 '<!@(<(pkg-config) --libs-only-L --libs-only-other gconf-2.0)',
317 '<!@(<(pkg-config) --libs-only-l gconf-2.0)',
324 'target_name': 'gio',
325 'type': 'static_library',
327 ['use_gio==1 and _toolset=="target"', {
329 '<!@(<(pkg-config) --cflags gio-2.0)',
331 'direct_dependent_settings': {
333 '<!@(<(pkg-config) --cflags gio-2.0)',
339 '<(SHARED_INTERMEDIATE_DIR)',
347 '<!@(<(pkg-config) --libs-only-L --libs-only-other gio-2.0)',
350 '<!@(<(pkg-config) --libs-only-l gio-2.0)',
353 ['linux_link_gsettings==0 and OS=="linux"', {
360 'hard_dependency': 1,
364 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libgio.h',
365 'output_cc': '<(INTERMEDIATE_DIR)/libgio_loader.cc',
366 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
368 'action_name': 'generate_libgio_loader',
378 '--name', 'LibGioLoader',
379 '--output-h', '<(output_h)',
380 '--output-cc', '<(output_cc)',
381 '--header', '<gio/gio.h>',
382 '--link-directly=<(linux_link_gsettings)',
384 'g_settings_get_child',
385 'g_settings_get_string',
386 'g_settings_get_boolean',
387 'g_settings_get_int',
388 'g_settings_get_strv',
389 'g_settings_list_schemas',
391 'message': 'Generating libgio library loader.',
392 'process_outputs_as_sources': 1,
399 'target_name': 'libpci',
400 'type': 'static_library',
402 '<!@(<(pkg-config) --cflags libpci)',
404 'direct_dependent_settings': {
406 '<(SHARED_INTERMEDIATE_DIR)',
409 ['linux_link_libpci==1', {
412 '<!@(<(pkg-config) --libs-only-L --libs-only-other libpci)',
415 '<!@(<(pkg-config) --libs-only-l libpci)',
424 'hard_dependency': 1,
428 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libpci.h',
429 'output_cc': '<(INTERMEDIATE_DIR)/libpci_loader.cc',
430 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
432 'action_name': 'generate_libpci_loader',
442 '--name', 'LibPciLoader',
443 '--output-h', '<(output_h)',
444 '--output-cc', '<(output_cc)',
445 '--header', '<pci/pci.h>',
446 # TODO(phajdan.jr): Report problem to pciutils project
447 # and get it fixed so that we don't need --use-extern-c.
449 '--link-directly=<(linux_link_libpci)',
457 'message': 'Generating libpci library loader.',
458 'process_outputs_as_sources': 1,
463 'target_name': 'libspeechd',
464 'type': 'static_library',
465 'direct_dependent_settings': {
467 '<(SHARED_INTERMEDIATE_DIR)',
470 ['linux_link_libspeechd==1', {
482 'hard_dependency': 1,
486 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libspeechd.h',
487 'output_cc': '<(INTERMEDIATE_DIR)/libspeechd_loader.cc',
488 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
490 # speech-dispatcher >= 0.8 installs libspeechd.h into
491 # speech-dispatcher/libspeechd.h, whereas speech-dispatcher < 0.8
492 # puts libspeechd.h in the top-level include directory.
493 # Since we need to support both cases for now, we ship a copy of
494 # libspeechd.h in third_party/speech-dispatcher. If the user
495 # prefers to link against the speech-dispatcher directly, the
496 # `libspeechd_h_prefix' variable can be passed to gyp with a value
497 # such as "speech-dispatcher/" that will be prepended to
498 # "libspeechd.h" in the #include directive.
499 # TODO(phaldan.jr): Once we do not need to support
500 # speech-dispatcher < 0.8 we can get rid of all this (including
501 # third_party/speech-dispatcher) and just include
502 # speech-dispatcher/libspeechd.h unconditionally.
503 'libspeechd_h_prefix%': '',
505 'action_name': 'generate_libspeechd_loader',
515 '--name', 'LibSpeechdLoader',
516 '--output-h', '<(output_h)',
517 '--output-cc', '<(output_cc)',
518 '--header', '<<(libspeechd_h_prefix)libspeechd.h>',
520 '"third_party/speech-dispatcher/libspeechd.h"',
521 '--link-directly=<(linux_link_libspeechd)',
528 'spd_set_notification_on',
529 'spd_set_voice_rate',
530 'spd_set_voice_pitch',
531 'spd_list_synthesis_voices',
532 'spd_set_synthesis_voice',
534 'spd_set_output_module',
536 'message': 'Generating libspeechd library loader.',
537 'process_outputs_as_sources': 1,
542 'target_name': 'libbrlapi',
543 'type': 'static_library',
545 '../../base/base.gyp:base',
547 'all_dependent_settings': {
549 '<(SHARED_INTERMEDIATE_DIR)',
555 ['linux_link_libbrlapi==1', {
564 'hard_dependency': 1,
568 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libbrlapi.h',
569 'output_cc': '<(INTERMEDIATE_DIR)/libbrlapi_loader.cc',
570 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
572 'action_name': 'generate_brlapi_loader',
582 '--name', 'LibBrlapiLoader',
583 '--output-h', '<(output_h)',
584 '--output-cc', '<(output_cc)',
585 '--header', '<brlapi.h>',
586 '--link-directly=<(linux_link_libbrlapi)',
587 'brlapi_getHandleSize',
588 'brlapi_error_location',
589 'brlapi_expandKeyCode',
591 'brlapi__acceptKeys',
592 'brlapi__openConnection',
593 'brlapi__closeConnection',
594 'brlapi__getDisplaySize',
595 'brlapi__enterTtyModeWithPath',
596 'brlapi__leaveTtyMode',
600 'message': 'Generating libbrlapi library loader.',
601 'process_outputs_as_sources': 1,
606 'target_name': 'x11',
608 'toolsets': ['host', 'target'],
610 ['_toolset=="target"', {
611 'direct_dependent_settings': {
613 '<!@(<(pkg-config) --cflags x11)',
618 '<!@(<(pkg-config) --libs-only-L --libs-only-other x11 xi)',
621 '<!@(<(pkg-config) --libs-only-l x11 xi)',
625 'direct_dependent_settings': {
627 '<!@(pkg-config --cflags x11)',
632 '<!@(pkg-config --libs-only-L --libs-only-other x11 xi)',
635 '<!@(pkg-config --libs-only-l x11 xi)',
642 'target_name': 'xext',
645 ['_toolset=="target"', {
646 'direct_dependent_settings': {
648 '<!@(<(pkg-config) --cflags xext)',
653 '<!@(<(pkg-config) --libs-only-L --libs-only-other xext)',
656 '<!@(<(pkg-config) --libs-only-l xext)',
663 'target_name': 'xfixes',
666 ['_toolset=="target"', {
667 'direct_dependent_settings': {
669 '<!@(<(pkg-config) --cflags xfixes)',
674 '<!@(<(pkg-config) --libs-only-L --libs-only-other xfixes)',
677 '<!@(<(pkg-config) --libs-only-l xfixes)',
684 'target_name': 'libgcrypt',
687 ['_toolset=="target" and use_cups==1', {
688 'direct_dependent_settings': {
690 '<!@(libgcrypt-config --cflags)',
695 '<!@(libgcrypt-config --libs)',
702 'target_name': 'gnome_keyring',
705 ['use_gnome_keyring==1', {
706 'direct_dependent_settings': {
708 '<!@(<(pkg-config) --cflags gnome-keyring-1)',
714 ['linux_link_gnome_keyring==0', {
715 'defines': ['DLOPEN_GNOME_KEYRING'],
720 ['linux_link_gnome_keyring!=0', {
723 '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
726 '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
745 # The unit tests use a few convenience functions from the GNOME
746 # Keyring library directly. We ignore linux_link_gnome_keyring and
747 # link directly in this version of the target to allow this.
748 # *** Do not use this target in the main binary! ***
749 'target_name': 'gnome_keyring_direct',
752 ['use_gnome_keyring==1', {
753 'direct_dependent_settings': {
755 '<!@(<(pkg-config) --cflags gnome-keyring-1)',
761 ['linux_link_gnome_keyring==0', {
762 'defines': ['DLOPEN_GNOME_KEYRING'],
768 '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
771 '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
778 'target_name': 'dbus',
780 'direct_dependent_settings': {
782 '<!@(<(pkg-config) --cflags dbus-1)',
787 '<!@(<(pkg-config) --libs-only-L --libs-only-other dbus-1)',
790 '<!@(<(pkg-config) --libs-only-l dbus-1)',
795 'target_name': 'glib',
797 'toolsets': ['host', 'target'],
799 'glib_packages': 'glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0',
802 ['_toolset=="target"', {
803 'direct_dependent_settings': {
805 '<!@(<(pkg-config) --cflags <(glib_packages))',
810 '<!@(<(pkg-config) --libs-only-L --libs-only-other <(glib_packages))',
813 '<!@(<(pkg-config) --libs-only-l <(glib_packages))',
817 'direct_dependent_settings': {
819 '<!@(pkg-config --cflags <(glib_packages))',
824 '<!@(pkg-config --libs-only-L --libs-only-other <(glib_packages))',
827 '<!@(pkg-config --libs-only-l <(glib_packages))',
833 'libraries': [ '-lXtst' ]
839 'target_name': 'pangocairo',
841 'toolsets': ['host', 'target'],
843 ['_toolset=="target"', {
844 'direct_dependent_settings': {
846 '<!@(<(pkg-config) --cflags pangocairo pangoft2)',
851 '<!@(<(pkg-config) --libs-only-L --libs-only-other pangocairo pangoft2)',
854 '<!@(<(pkg-config) --libs-only-l pangocairo pangoft2)',
858 'direct_dependent_settings': {
860 '<!@(pkg-config --cflags pangocairo pangoft2)',
865 '<!@(pkg-config --libs-only-L --libs-only-other pangocairo pangoft2)',
868 '<!@(pkg-config --libs-only-l pangocairo pangoft2)',
875 'target_name': 'libresolv',
884 'target_name': 'udev',
887 # libudev is not available on *BSD
888 ['_toolset=="target" and os_bsd!=1', {
889 'direct_dependent_settings': {
891 '<!@(<(pkg-config) --cflags libudev)'
896 '<!@(<(pkg-config) --libs-only-L --libs-only-other libudev)',
899 '<!@(<(pkg-config) --libs-only-l libudev)',