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,
20 [ 'os_posix==1 and OS!="mac"', {
22 # We use our own copy of libssl3, although we still need to link against
32 # Hide GTK and related dependencies for Chrome OS, so they won't get
33 # added back to Chrome OS. Don't try to use GTK on Chrome OS.
38 'toolsets': ['host', 'target'],
40 # gtk requires gmodule, but it does not list it as a dependency
41 # in some misconfigured systems.
42 'gtk_packages': 'gmodule-2.0 gtk+-2.0 gthread-2.0',
45 ['_toolset=="target"', {
46 'direct_dependent_settings': {
48 '<!@(<(pkg-config) --cflags <(gtk_packages))',
53 '<!@(<(pkg-config) --libs-only-L --libs-only-other <(gtk_packages))',
56 '<!@(<(pkg-config) --libs-only-l <(gtk_packages))',
60 'direct_dependent_settings': {
62 '<!@(pkg-config --cflags <(gtk_packages))',
67 '<!@(pkg-config --libs-only-L --libs-only-other <(gtk_packages))',
70 '<!@(pkg-config --libs-only-l <(gtk_packages))',
77 'target_name': 'gtkprint',
80 ['_toolset=="target"', {
81 'direct_dependent_settings': {
83 '<!@(<(pkg-config) --cflags gtk+-unix-print-2.0)',
88 '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-unix-print-2.0)',
91 '<!@(<(pkg-config) --libs-only-l gtk+-unix-print-2.0)',
101 ['_toolset=="target"', {
102 'direct_dependent_settings': {
104 '<!@(<(pkg-config) --cflags gdk-2.0)',
109 '<!@(<(pkg-config) --libs-only-L --libs-only-other gdk-2.0)',
112 '<!@(<(pkg-config) --libs-only-l gdk-2.0)',
120 ['linux_use_libgps==1', {
123 'target_name': 'libgps',
124 'type': 'static_library',
126 '../../base/base.gyp:base',
128 'all_dependent_settings': {
133 '<(SHARED_INTERMEDIATE_DIR)',
136 ['linux_link_libgps==1', {
138 '<!@(<(pkg-config) --cflags libgps)',
142 '<!@(<(pkg-config) --libs-only-L --libs-only-other libgps)',
145 '<!@(<(pkg-config) --libs-only-l libgps)',
151 'hard_dependency': 1,
155 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libgps.h',
156 'output_cc': '<(INTERMEDIATE_DIR)/libgps_loader.cc',
157 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
159 'action_name': 'generate_libgps_loader',
169 '--name', 'LibGpsLoader',
170 '--output-h', '<(output_h)',
171 '--output-cc', '<(output_cc)',
172 '--header', '<gps.h>',
173 '--bundled-header', '"third_party/gpsd/release-3.1/gps.h"',
174 '--link-directly=<(linux_link_libgps)',
178 # We don't use gps_shm_read() directly, just to make
179 # sure that libgps has the shared memory support.
182 'message': 'Generating libgps library loader.',
183 'process_outputs_as_sources': 1,
192 'target_name': 'ssl',
195 ['_toolset=="target"', {
199 '../../third_party/openssl/openssl.gyp:openssl',
202 ['use_openssl==0 and use_system_ssl==0', {
204 '../../net/third_party/nss/ssl.gyp:libssl',
205 '../../third_party/zlib/zlib.gyp:zlib',
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)',
249 'target_name': 'freetype2',
252 ['_toolset=="target"', {
253 'direct_dependent_settings': {
255 '<!@(<(pkg-config) --cflags freetype2)',
260 '<!@(<(pkg-config) --libs-only-L --libs-only-other freetype2)',
263 '<!@(<(pkg-config) --libs-only-l freetype2)',
270 'target_name': 'fontconfig',
273 ['_toolset=="target"', {
274 'direct_dependent_settings': {
276 '<!@(<(pkg-config) --cflags fontconfig)',
281 '<!@(<(pkg-config) --libs-only-L --libs-only-other fontconfig)',
284 '<!@(<(pkg-config) --libs-only-l fontconfig)',
291 'target_name': 'gconf',
294 ['use_gconf==1 and _toolset=="target"', {
295 'direct_dependent_settings': {
297 '<!@(<(pkg-config) --cflags gconf-2.0)',
305 '<!@(<(pkg-config) --libs-only-L --libs-only-other gconf-2.0)',
308 '<!@(<(pkg-config) --libs-only-l gconf-2.0)',
315 'target_name': 'gio',
316 'type': 'static_library',
318 ['use_gio==1 and _toolset=="target"', {
320 '../../base/base.gyp:base',
323 '<!@(<(pkg-config) --cflags gio-2.0)',
325 'direct_dependent_settings': {
327 '<!@(<(pkg-config) --cflags gio-2.0)',
333 '<(SHARED_INTERMEDIATE_DIR)',
338 '<!@(<(pkg-config) --libs-only-L --libs-only-other gio-2.0)',
341 '<!@(<(pkg-config) --libs-only-l gio-2.0)',
344 ['linux_link_gsettings==0 and OS=="linux"', {
351 'hard_dependency': 1,
355 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libgio.h',
356 'output_cc': '<(INTERMEDIATE_DIR)/libgio_loader.cc',
357 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
359 'action_name': 'generate_libgio_loader',
369 '--name', 'LibGioLoader',
370 '--output-h', '<(output_h)',
371 '--output-cc', '<(output_cc)',
372 '--header', '<gio/gio.h>',
373 # TODO(phajdan.jr): This will no longer be needed
374 # after switch to Precise, http://crbug.com/158577 .
375 '--bundled-header', '"build/linux/gsettings.h"',
376 '--link-directly=<(linux_link_gsettings)',
378 'g_settings_get_child',
379 'g_settings_get_string',
380 'g_settings_get_boolean',
381 'g_settings_get_int',
382 'g_settings_get_strv',
383 'g_settings_list_schemas',
385 'message': 'Generating libgio library loader.',
386 'process_outputs_as_sources': 1,
393 'target_name': 'libpci',
394 'type': 'static_library',
396 '<!@(<(pkg-config) --cflags libpci)',
399 '../../base/base.gyp:base',
401 'direct_dependent_settings': {
403 '<(SHARED_INTERMEDIATE_DIR)',
406 ['linux_link_libpci==1', {
409 '<!@(<(pkg-config) --libs-only-L --libs-only-other libpci)',
412 '<!@(<(pkg-config) --libs-only-l libpci)',
418 'hard_dependency': 1,
422 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libpci.h',
423 'output_cc': '<(INTERMEDIATE_DIR)/libpci_loader.cc',
424 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
426 'action_name': 'generate_libpci_loader',
436 '--name', 'LibPciLoader',
437 '--output-h', '<(output_h)',
438 '--output-cc', '<(output_cc)',
439 '--header', '<pci/pci.h>',
440 # TODO(phajdan.jr): Report problem to pciutils project
441 # and get it fixed so that we don't need --use-extern-c.
443 '--link-directly=<(linux_link_libpci)',
451 'message': 'Generating libpci library loader.',
452 'process_outputs_as_sources': 1,
457 'target_name': 'libspeechd',
458 'type': 'static_library',
460 '../../base/base.gyp:base',
462 'direct_dependent_settings': {
464 '<(SHARED_INTERMEDIATE_DIR)',
467 ['linux_link_libspeechd==1', {
476 'hard_dependency': 1,
480 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libspeechd.h',
481 'output_cc': '<(INTERMEDIATE_DIR)/libspeechd_loader.cc',
482 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
484 'action_name': 'generate_libspeechd_loader',
494 '--name', 'LibSpeechdLoader',
495 '--output-h', '<(output_h)',
496 '--output-cc', '<(output_cc)',
497 '--header', '<libspeechd.h>',
498 '--link-directly=<(linux_link_libspeechd)',
503 'spd_set_notification_on',
504 'spd_set_voice_rate',
505 'spd_set_voice_pitch',
507 'message': 'Generating libspeechd library loader.',
508 'process_outputs_as_sources': 1,
513 'target_name': 'x11',
515 'toolsets': ['host', 'target'],
517 ['_toolset=="target"', {
518 'direct_dependent_settings': {
520 '<!@(<(pkg-config) --cflags x11)',
525 '<!@(<(pkg-config) --libs-only-L --libs-only-other x11 xi)',
528 '<!@(<(pkg-config) --libs-only-l x11 xi)',
532 'direct_dependent_settings': {
534 '<!@(pkg-config --cflags x11)',
539 '<!@(pkg-config --libs-only-L --libs-only-other x11 xi)',
542 '<!@(pkg-config --libs-only-l x11 xi)',
549 'target_name': 'xext',
552 ['_toolset=="target"', {
553 'direct_dependent_settings': {
555 '<!@(<(pkg-config) --cflags xext)',
560 '<!@(<(pkg-config) --libs-only-L --libs-only-other xext)',
563 '<!@(<(pkg-config) --libs-only-l xext)',
570 'target_name': 'xfixes',
573 ['_toolset=="target"', {
574 'direct_dependent_settings': {
576 '<!@(<(pkg-config) --cflags xfixes)',
581 '<!@(<(pkg-config) --libs-only-L --libs-only-other xfixes)',
584 '<!@(<(pkg-config) --libs-only-l xfixes)',
591 'target_name': 'libgcrypt',
594 ['_toolset=="target" and use_cups==1', {
595 'direct_dependent_settings': {
597 '<!@(libgcrypt-config --cflags)',
602 '<!@(libgcrypt-config --libs)',
609 'target_name': 'selinux',
612 ['_toolset=="target"', {
622 'target_name': 'gnome_keyring',
625 ['use_gnome_keyring==1', {
626 'direct_dependent_settings': {
628 '<!@(<(pkg-config) --cflags gnome-keyring-1)',
634 ['linux_link_gnome_keyring==0', {
635 'defines': ['DLOPEN_GNOME_KEYRING'],
640 ['linux_link_gnome_keyring!=0', {
643 '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
646 '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
665 # The unit tests use a few convenience functions from the GNOME
666 # Keyring library directly. We ignore linux_link_gnome_keyring and
667 # link directly in this version of the target to allow this.
668 # *** Do not use this target in the main binary! ***
669 'target_name': 'gnome_keyring_direct',
672 ['use_gnome_keyring==1', {
673 'direct_dependent_settings': {
675 '<!@(<(pkg-config) --cflags gnome-keyring-1)',
681 ['linux_link_gnome_keyring==0', {
682 'defines': ['DLOPEN_GNOME_KEYRING'],
688 '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
691 '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
698 'target_name': 'dbus',
700 'direct_dependent_settings': {
702 '<!@(<(pkg-config) --cflags dbus-1)',
707 '<!@(<(pkg-config) --libs-only-L --libs-only-other dbus-1)',
710 '<!@(<(pkg-config) --libs-only-l dbus-1)',
715 'target_name': 'glib',
717 'toolsets': ['host', 'target'],
719 'glib_packages': 'glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0',
722 ['_toolset=="target"', {
723 'direct_dependent_settings': {
725 '<!@(<(pkg-config) --cflags <(glib_packages))',
730 '<!@(<(pkg-config) --libs-only-L --libs-only-other <(glib_packages))',
733 '<!@(<(pkg-config) --libs-only-l <(glib_packages))',
737 'direct_dependent_settings': {
739 '<!@(pkg-config --cflags <(glib_packages))',
744 '<!@(pkg-config --libs-only-L --libs-only-other <(glib_packages))',
747 '<!@(pkg-config --libs-only-l <(glib_packages))',
753 'libraries': [ '-lXtst' ]
759 'target_name': 'pangocairo',
761 'toolsets': ['host', 'target'],
763 ['_toolset=="target"', {
764 'direct_dependent_settings': {
766 '<!@(<(pkg-config) --cflags pangocairo)',
771 '<!@(<(pkg-config) --libs-only-L --libs-only-other pangocairo)',
774 '<!@(<(pkg-config) --libs-only-l pangocairo)',
778 'direct_dependent_settings': {
780 '<!@(pkg-config --cflags pangocairo)',
785 '<!@(pkg-config --libs-only-L --libs-only-other pangocairo)',
788 '<!@(pkg-config --libs-only-l pangocairo)',
795 'target_name': 'libresolv',
804 'target_name': 'udev',
807 # libudev is not available on *BSD
808 ['_toolset=="target" and os_bsd!=1', {
809 'direct_dependent_settings': {
811 '<!@(<(pkg-config) --cflags libudev)'
816 '<!@(<(pkg-config) --libs-only-L --libs-only-other libudev)',
819 '<!@(<(pkg-config) --libs-only-l libudev)',