123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638 |
- # Copyright (c) 2012 The Chromium Authors. All rights reserved.
- # Use of this source code is governed by a BSD-style license that can be
- # found in the LICENSE file.
- {
- 'variables': {
- 'conditions': [
- ['sysroot!=""', {
- 'pkg-config': './pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
- }, {
- 'pkg-config': 'pkg-config'
- }]
- ],
- },
- 'conditions': [
- [ 'os_posix==1 and OS!="mac"', {
- 'variables': {
- # We use our own copy of libssl3, although we still need to link against
- # the rest of NSS.
- 'use_system_ssl%': 0,
- },
- }, {
- 'variables': {
- 'use_system_ssl%': 1,
- },
- }],
- [ 'chromeos==0', {
- # Hide GTK and related dependencies for Chrome OS, so they won't get
- # added back to Chrome OS. Don't try to use GTK on Chrome OS.
- 'targets': [
- {
- 'target_name': 'gtk',
- 'type': 'none',
- 'toolsets': ['host', 'target'],
- 'variables': {
- # gtk requires gmodule, but it does not list it as a dependency
- # in some misconfigured systems.
- 'gtk_packages': 'gmodule-2.0 gtk+-2.0 gthread-2.0',
- },
- 'conditions': [
- ['_toolset=="target"', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags <(gtk_packages))',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other <(gtk_packages))',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l <(gtk_packages))',
- ],
- },
- }, {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(pkg-config --cflags <(gtk_packages))',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(pkg-config --libs-only-L --libs-only-other <(gtk_packages))',
- ],
- 'libraries': [
- '<!@(pkg-config --libs-only-l <(gtk_packages))',
- ],
- },
- }],
- ],
- },
- {
- 'target_name': 'gtkprint',
- 'type': 'none',
- 'conditions': [
- ['_toolset=="target"', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags gtk+-unix-print-2.0)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-unix-print-2.0)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l gtk+-unix-print-2.0)',
- ],
- },
- }],
- ],
- },
- {
- 'target_name': 'gdk',
- 'type': 'none',
- 'conditions': [
- ['_toolset=="target"', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags gdk-2.0)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other gdk-2.0)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l gdk-2.0)',
- ],
- },
- }],
- ],
- },
- ], # targets
- }, { # chromeos==1
- 'targets': [
- {
- # TODO(satorux): Remove this once dbus-glib clients are gone.
- 'target_name': 'dbus-glib',
- 'type': 'none',
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags dbus-glib-1)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other dbus-glib-1)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l dbus-glib-1)',
- ],
- },
- },
- ],
- }]
- ], # conditions
- 'targets': [
- {
- 'target_name': 'ssl',
- 'type': 'none',
- 'conditions': [
- ['_toolset=="target"', {
- 'conditions': [
- ['use_openssl==1', {
- 'dependencies': [
- '../../third_party/openssl/openssl.gyp:openssl',
- ],
- }],
- ['use_openssl==0 and use_system_ssl==0', {
- 'dependencies': [
- '../../net/third_party/nss/ssl.gyp:libssl',
- '../../third_party/zlib/zlib.gyp:zlib',
- ],
- 'direct_dependent_settings': {
- 'include_dirs+': [
- # We need for our local copies of the libssl3 headers to come
- # before other includes, as we are shadowing system headers.
- '<(DEPTH)/net/third_party/nss/ssl',
- ],
- 'cflags': [
- '<!@(<(pkg-config) --cflags nss)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")',
- ],
- },
- }],
- ['use_openssl==0 and use_system_ssl==1', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags nss)',
- ],
- 'defines': [
- 'USE_SYSTEM_SSL',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l nss)',
- ],
- },
- }],
- ]
- }],
- ],
- },
- {
- 'target_name': 'freetype2',
- 'type': 'none',
- 'conditions': [
- ['_toolset=="target"', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags freetype2)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other freetype2)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l freetype2)',
- ],
- },
- }],
- ],
- },
- {
- 'target_name': 'fontconfig',
- 'type': 'none',
- 'conditions': [
- ['_toolset=="target"', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags fontconfig)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other fontconfig)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l fontconfig)',
- ],
- },
- }],
- ],
- },
- {
- 'target_name': 'gconf',
- 'type': 'none',
- 'conditions': [
- ['use_gconf==1 and _toolset=="target"', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags gconf-2.0)',
- ],
- 'defines': [
- 'USE_GCONF',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other gconf-2.0)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l gconf-2.0)',
- ],
- },
- }],
- ],
- },
- {
- 'target_name': 'gio',
- 'type': 'none',
- 'conditions': [
- ['use_gio==1 and _toolset=="target"', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags gio-2.0)',
- ],
- 'defines': [
- 'USE_GIO',
- ],
- 'conditions': [
- ['linux_link_gsettings==0', {
- 'defines': ['DLOPEN_GSETTINGS'],
- }],
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other gio-2.0)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l gio-2.0)',
- ],
- 'conditions': [
- ['linux_link_gsettings==0 and OS=="linux"', {
- 'libraries': [
- '-ldl',
- ],
- }],
- ],
- },
- }],
- ],
- },
- {
- 'target_name': 'x11',
- 'type': 'none',
- 'toolsets': ['host', 'target'],
- 'conditions': [
- ['_toolset=="target"', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags x11)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other x11 xi)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l x11 xi)',
- ],
- },
- }, {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(pkg-config --cflags x11)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(pkg-config --libs-only-L --libs-only-other x11 xi)',
- ],
- 'libraries': [
- '<!@(pkg-config --libs-only-l x11 xi)',
- ],
- },
- }],
- ],
- },
- {
- 'target_name': 'xext',
- 'type': 'none',
- 'conditions': [
- ['_toolset=="target"', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags xext)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other xext)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l xext)',
- ],
- },
- }],
- ],
- },
- {
- 'target_name': 'xfixes',
- 'type': 'none',
- 'conditions': [
- ['_toolset=="target"', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags xfixes)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other xfixes)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l xfixes)',
- ],
- },
- }],
- ],
- },
- {
- 'target_name': 'libgcrypt',
- 'type': 'none',
- 'conditions': [
- ['_toolset=="target" and use_cups==1', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(libgcrypt-config --cflags)',
- ],
- },
- 'link_settings': {
- 'libraries': [
- '<!@(libgcrypt-config --libs)',
- ],
- },
- }],
- ],
- },
- {
- 'target_name': 'selinux',
- 'type': 'none',
- 'conditions': [
- ['_toolset=="target"', {
- 'link_settings': {
- 'libraries': [
- '-lselinux',
- ],
- },
- }],
- ],
- },
- {
- 'target_name': 'gnome_keyring',
- 'type': 'none',
- 'conditions': [
- ['use_gnome_keyring==1', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags gnome-keyring-1)',
- ],
- 'defines': [
- 'USE_GNOME_KEYRING',
- ],
- 'conditions': [
- ['linux_link_gnome_keyring==0', {
- 'defines': ['DLOPEN_GNOME_KEYRING'],
- }],
- ],
- },
- 'conditions': [
- ['linux_link_gnome_keyring!=0', {
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
- ],
- },
- }, {
- 'conditions': [
- ['OS=="linux"', {
- 'link_settings': {
- 'libraries': [
- '-ldl',
- ],
- },
- }],
- ],
- }],
- ],
- }],
- ],
- },
- {
- # The unit tests use a few convenience functions from the GNOME
- # Keyring library directly. We ignore linux_link_gnome_keyring and
- # link directly in this version of the target to allow this.
- # *** Do not use this target in the main binary! ***
- 'target_name': 'gnome_keyring_direct',
- 'type': 'none',
- 'conditions': [
- ['use_gnome_keyring==1', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags gnome-keyring-1)',
- ],
- 'defines': [
- 'USE_GNOME_KEYRING',
- ],
- 'conditions': [
- ['linux_link_gnome_keyring==0', {
- 'defines': ['DLOPEN_GNOME_KEYRING'],
- }],
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
- ],
- },
- }],
- ],
- },
- {
- 'target_name': 'dbus',
- 'type': 'none',
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags dbus-1)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other dbus-1)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l dbus-1)',
- ],
- },
- },
- {
- 'target_name': 'glib',
- 'type': 'none',
- 'toolsets': ['host', 'target'],
- 'variables': {
- 'glib_packages': 'glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0',
- },
- 'conditions': [
- ['_toolset=="target"', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags <(glib_packages))',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other <(glib_packages))',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l <(glib_packages))',
- ],
- },
- }, {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(pkg-config --cflags <(glib_packages))',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(pkg-config --libs-only-L --libs-only-other <(glib_packages))',
- ],
- 'libraries': [
- '<!@(pkg-config --libs-only-l <(glib_packages))',
- ],
- },
- }],
- ['chromeos==1', {
- 'link_settings': {
- 'libraries': [ '-lXtst' ]
- }
- }],
- ],
- },
- {
- 'target_name': 'pangocairo',
- 'type': 'none',
- 'toolsets': ['host', 'target'],
- 'conditions': [
- ['_toolset=="target"', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags pangocairo)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other pangocairo)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l pangocairo)',
- ],
- },
- }, {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(pkg-config --cflags pangocairo)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(pkg-config --libs-only-L --libs-only-other pangocairo)',
- ],
- 'libraries': [
- '<!@(pkg-config --libs-only-l pangocairo)',
- ],
- },
- }],
- ],
- },
- {
- 'target_name': 'libresolv',
- 'type': 'none',
- 'link_settings': {
- 'libraries': [
- '-lresolv',
- ],
- },
- },
- {
- 'target_name': 'ibus',
- 'type': 'none',
- 'conditions': [
- ['use_ibus==1', {
- 'variables': {
- 'ibus_min_version': '1.3.99.20110425',
- },
- 'direct_dependent_settings': {
- 'defines': ['HAVE_IBUS=1'],
- 'cflags': [
- '<!@(<(pkg-config) --cflags "ibus-1.0 >= <(ibus_min_version)")',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other "ibus-1.0 >= <(ibus_min_version)")',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l "ibus-1.0 >= <(ibus_min_version)")',
- ],
- },
- }],
- ],
- },
- {
- 'target_name': 'udev',
- 'type': 'none',
- 'conditions': [
- # libudev is not available on *BSD
- ['_toolset=="target" and os_bsd!=1', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags libudev)'
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other libudev)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l libudev)',
- ],
- },
- }],
- ],
- },
- ],
- }
|