Home | History | Annotate | Download | only in linux
      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.
      4 
      5 {
      6   'variables': {
      7     'conditions': [
      8       ['sysroot!=""', {
      9         'pkg-config': './pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
     10       }, {
     11         'pkg-config': 'pkg-config'
     12       }],
     13     ],
     14 
     15     'linux_link_libgps%': 0,
     16     'linux_link_libpci%': 0,
     17     'linux_link_libspeechd%': 0,
     18   },
     19   'conditions': [
     20     [ 'os_posix==1 and OS!="mac"', {
     21       'variables': {
     22         # We use our own copy of libssl3, although we still need to link against
     23         # the rest of NSS.
     24         'use_system_ssl%': 0,
     25       },
     26     }, {
     27       'variables': {
     28         'use_system_ssl%': 1,
     29       },
     30     }],
     31     [ 'chromeos==0', {
     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.
     34       'targets': [
     35         {
     36           'target_name': 'gtk',
     37           'type': 'none',
     38           'toolsets': ['host', 'target'],
     39           'variables': {
     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',
     43           },
     44           'conditions': [
     45             ['_toolset=="target"', {
     46               'all_dependent_settings': {
     47                 'cflags': [
     48                   '<!@(<(pkg-config) --cflags <(gtk_packages))',
     49                 ],
     50               },
     51               'link_settings': {
     52                 'ldflags': [
     53                   '<!@(<(pkg-config) --libs-only-L --libs-only-other <(gtk_packages))',
     54                 ],
     55                 'libraries': [
     56                   '<!@(<(pkg-config) --libs-only-l <(gtk_packages))',
     57                 ],
     58               },
     59             }, {
     60               'all_dependent_settings': {
     61                 'cflags': [
     62                   '<!@(pkg-config --cflags <(gtk_packages))',
     63                 ],
     64               },
     65               'link_settings': {
     66                 'ldflags': [
     67                   '<!@(pkg-config --libs-only-L --libs-only-other <(gtk_packages))',
     68                 ],
     69                 'libraries': [
     70                   '<!@(pkg-config --libs-only-l <(gtk_packages))',
     71                 ],
     72               },
     73             }],
     74           ],
     75         },
     76         {
     77           'target_name': 'gtkprint',
     78           'type': 'none',
     79           'conditions': [
     80             ['_toolset=="target"', {
     81               'direct_dependent_settings': {
     82                 'cflags': [
     83                   '<!@(<(pkg-config) --cflags gtk+-unix-print-2.0)',
     84                 ],
     85               },
     86               'link_settings': {
     87                 'ldflags': [
     88                   '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-unix-print-2.0)',
     89                 ],
     90                 'libraries': [
     91                   '<!@(<(pkg-config) --libs-only-l gtk+-unix-print-2.0)',
     92                 ],
     93               },
     94             }],
     95           ],
     96         },
     97         {
     98           'target_name': 'gdk',
     99           'type': 'none',
    100           'conditions': [
    101             ['_toolset=="target"', {
    102               'direct_dependent_settings': {
    103                 'cflags': [
    104                   '<!@(<(pkg-config) --cflags gdk-2.0)',
    105                 ],
    106               },
    107               'link_settings': {
    108                 'ldflags': [
    109                   '<!@(<(pkg-config) --libs-only-L --libs-only-other gdk-2.0)',
    110                 ],
    111                 'libraries': [
    112                   '<!@(<(pkg-config) --libs-only-l gdk-2.0)',
    113                 ],
    114               },
    115             }],
    116           ],
    117         },
    118       ],  # targets
    119     }],
    120     ['linux_use_libgps==1', {
    121       'targets': [
    122         {
    123           'target_name': 'libgps',
    124           'type': 'static_library',
    125           'dependencies': [
    126             '../../base/base.gyp:base',
    127           ],
    128           'all_dependent_settings': {
    129             'defines': [
    130               'USE_LIBGPS',
    131             ],
    132             'include_dirs': [
    133               '<(SHARED_INTERMEDIATE_DIR)',
    134             ],
    135             'conditions': [
    136               ['linux_link_libgps==1', {
    137                 'cflags': [
    138                   '<!@(<(pkg-config) --cflags libgps)',
    139                 ],
    140                 'link_settings': {
    141                   'ldflags': [
    142                     '<!@(<(pkg-config) --libs-only-L --libs-only-other libgps)',
    143                   ],
    144                   'libraries': [
    145                     '<!@(<(pkg-config) --libs-only-l libgps)',
    146                   ],
    147                 }
    148               }],
    149             ],
    150           },
    151           'hard_dependency': 1,
    152           'actions': [
    153             {
    154               'variables': {
    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',
    158               },
    159               'action_name': 'generate_libgps_loader',
    160               'inputs': [
    161                 '<(generator)',
    162               ],
    163               'outputs': [
    164                 '<(output_h)',
    165                 '<(output_cc)',
    166               ],
    167               'action': ['python',
    168                          '<(generator)',
    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)',
    175                          'gps_open',
    176                          'gps_close',
    177                          'gps_read',
    178                          # We don't use gps_shm_read() directly, just to make
    179                          # sure that libgps has the shared memory support.
    180                          'gps_shm_read',
    181               ],
    182               'message': 'Generating libgps library loader.',
    183               'process_outputs_as_sources': 1,
    184             },
    185           ],
    186         },
    187       ],
    188     }],
    189   ],  # conditions
    190   'targets': [
    191     {
    192       'target_name': 'ssl',
    193       'type': 'none',
    194       'conditions': [
    195         ['_toolset=="target"', {
    196           'conditions': [
    197             ['use_openssl==1', {
    198               'dependencies': [
    199                 '../../third_party/openssl/openssl.gyp:openssl',
    200               ],
    201             }],
    202             ['use_openssl==0 and use_system_ssl==0', {
    203               'dependencies': [
    204                 '../../net/third_party/nss/ssl.gyp:libssl',
    205                 '../../third_party/zlib/zlib.gyp:zlib',
    206               ],
    207               'direct_dependent_settings': {
    208                 'include_dirs+': [
    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',
    212                 ],
    213                 'cflags': [
    214                   '<!@(<(pkg-config) --cflags nss)',
    215                 ],
    216               },
    217               'link_settings': {
    218                 'ldflags': [
    219                   '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
    220                 ],
    221                 'libraries': [
    222                   '<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")',
    223                 ],
    224               },
    225             }],
    226             ['use_openssl==0 and use_system_ssl==1', {
    227               'direct_dependent_settings': {
    228                 'cflags': [
    229                   '<!@(<(pkg-config) --cflags nss)',
    230                 ],
    231                 'defines': [
    232                   'USE_SYSTEM_SSL',
    233                 ],
    234               },
    235               'link_settings': {
    236                 'ldflags': [
    237                   '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
    238                 ],
    239                 'libraries': [
    240                   '<!@(<(pkg-config) --libs-only-l nss)',
    241                 ],
    242               },
    243             }],
    244             ['use_openssl==0 and clang==1', {
    245               'direct_dependent_settings': {
    246                 'cflags': [
    247                   # There is a broken header guard in /usr/include/nss/secmod.h:
    248                   # https://bugzilla.mozilla.org/show_bug.cgi?id=884072
    249                   '-Wno-header-guard',
    250                 ],
    251               },
    252             }],
    253           ]
    254         }],
    255       ],
    256     },
    257     {
    258       'target_name': 'freetype2',
    259       'type': 'none',
    260       'conditions': [
    261         ['_toolset=="target"', {
    262           'direct_dependent_settings': {
    263             'cflags': [
    264               '<!@(<(pkg-config) --cflags freetype2)',
    265             ],
    266           },
    267           'link_settings': {
    268             'ldflags': [
    269               '<!@(<(pkg-config) --libs-only-L --libs-only-other freetype2)',
    270             ],
    271             'libraries': [
    272               '<!@(<(pkg-config) --libs-only-l freetype2)',
    273             ],
    274           },
    275         }],
    276       ],
    277     },
    278     {
    279       'target_name': 'fontconfig',
    280       'type': 'none',
    281       'conditions': [
    282         ['_toolset=="target"', {
    283           'direct_dependent_settings': {
    284             'cflags': [
    285               '<!@(<(pkg-config) --cflags fontconfig)',
    286             ],
    287           },
    288           'link_settings': {
    289             'ldflags': [
    290               '<!@(<(pkg-config) --libs-only-L --libs-only-other fontconfig)',
    291             ],
    292             'libraries': [
    293               '<!@(<(pkg-config) --libs-only-l fontconfig)',
    294             ],
    295           },
    296         }],
    297       ],
    298     },
    299     {
    300       'target_name': 'gconf',
    301       'type': 'none',
    302       'conditions': [
    303         ['use_gconf==1 and _toolset=="target"', {
    304           'direct_dependent_settings': {
    305             'cflags': [
    306               '<!@(<(pkg-config) --cflags gconf-2.0)',
    307             ],
    308             'defines': [
    309               'USE_GCONF',
    310             ],
    311           },
    312           'link_settings': {
    313             'ldflags': [
    314               '<!@(<(pkg-config) --libs-only-L --libs-only-other gconf-2.0)',
    315             ],
    316             'libraries': [
    317               '<!@(<(pkg-config) --libs-only-l gconf-2.0)',
    318             ],
    319           },
    320         }],
    321       ],
    322     },
    323     {
    324       'target_name': 'gio',
    325       'type': 'static_library',
    326       'conditions': [
    327         ['use_gio==1 and _toolset=="target"', {
    328           'dependencies': [
    329             '../../base/base.gyp:base',
    330           ],
    331           'cflags': [
    332             '<!@(<(pkg-config) --cflags gio-2.0)',
    333           ],
    334           'direct_dependent_settings': {
    335             'cflags': [
    336               '<!@(<(pkg-config) --cflags gio-2.0)',
    337             ],
    338             'defines': [
    339               'USE_GIO',
    340             ],
    341             'include_dirs': [
    342               '<(SHARED_INTERMEDIATE_DIR)',
    343             ],
    344           },
    345           'link_settings': {
    346             'ldflags': [
    347               '<!@(<(pkg-config) --libs-only-L --libs-only-other gio-2.0)',
    348             ],
    349             'libraries': [
    350               '<!@(<(pkg-config) --libs-only-l gio-2.0)',
    351             ],
    352             'conditions': [
    353               ['linux_link_gsettings==0 and OS=="linux"', {
    354                 'libraries': [
    355                   '-ldl',
    356                 ],
    357               }],
    358             ],
    359           },
    360           'hard_dependency': 1,
    361           'actions': [
    362             {
    363               'variables': {
    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',
    367               },
    368               'action_name': 'generate_libgio_loader',
    369               'inputs': [
    370                 '<(generator)',
    371               ],
    372               'outputs': [
    373                 '<(output_h)',
    374                 '<(output_cc)',
    375               ],
    376               'action': ['python',
    377                          '<(generator)',
    378                          '--name', 'LibGioLoader',
    379                          '--output-h', '<(output_h)',
    380                          '--output-cc', '<(output_cc)',
    381                          '--header', '<gio/gio.h>',
    382                          '--link-directly=<(linux_link_gsettings)',
    383                          'g_settings_new',
    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',
    390               ],
    391               'message': 'Generating libgio library loader.',
    392               'process_outputs_as_sources': 1,
    393             },
    394           ],
    395         }],
    396       ],
    397     },
    398     {
    399       'target_name': 'libpci',
    400       'type': 'static_library',
    401       'cflags': [
    402         '<!@(<(pkg-config) --cflags libpci)',
    403       ],
    404       'dependencies': [
    405         '../../base/base.gyp:base',
    406       ],
    407       'direct_dependent_settings': {
    408         'include_dirs': [
    409           '<(SHARED_INTERMEDIATE_DIR)',
    410         ],
    411         'conditions': [
    412           ['linux_link_libpci==1', {
    413             'link_settings': {
    414               'ldflags': [
    415                 '<!@(<(pkg-config) --libs-only-L --libs-only-other libpci)',
    416               ],
    417               'libraries': [
    418                 '<!@(<(pkg-config) --libs-only-l libpci)',
    419               ],
    420             }
    421           }],
    422         ],
    423       },
    424       'hard_dependency': 1,
    425       'actions': [
    426         {
    427           'variables': {
    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',
    431           },
    432           'action_name': 'generate_libpci_loader',
    433           'inputs': [
    434             '<(generator)',
    435           ],
    436           'outputs': [
    437             '<(output_h)',
    438             '<(output_cc)',
    439           ],
    440           'action': ['python',
    441                      '<(generator)',
    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.
    448                      '--use-extern-c',
    449                      '--link-directly=<(linux_link_libpci)',
    450                      'pci_alloc',
    451                      'pci_init',
    452                      'pci_cleanup',
    453                      'pci_scan_bus',
    454                      'pci_fill_info',
    455                      'pci_lookup_name',
    456           ],
    457           'message': 'Generating libpci library loader.',
    458           'process_outputs_as_sources': 1,
    459         },
    460       ],
    461     },
    462     {
    463       'target_name': 'libspeechd',
    464       'type': 'static_library',
    465       'dependencies': [
    466         '../../base/base.gyp:base',
    467       ],
    468       'direct_dependent_settings': {
    469         'include_dirs': [
    470           '<(SHARED_INTERMEDIATE_DIR)',
    471         ],
    472         'conditions': [
    473           ['linux_link_libspeechd==1', {
    474             'link_settings': {
    475               'libraries': [
    476                 '-lspeechd',
    477               ],
    478             }
    479           }],
    480         ],
    481       },
    482       'hard_dependency': 1,
    483       'actions': [
    484         {
    485           'variables': {
    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',
    489 
    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%': '',
    504           },
    505           'action_name': 'generate_libspeechd_loader',
    506           'inputs': [
    507             '<(generator)',
    508           ],
    509           'outputs': [
    510             '<(output_h)',
    511             '<(output_cc)',
    512           ],
    513           'action': ['python',
    514                      '<(generator)',
    515                      '--name', 'LibSpeechdLoader',
    516                      '--output-h', '<(output_h)',
    517                      '--output-cc', '<(output_cc)',
    518                      '--header', '<<(libspeechd_h_prefix)libspeechd.h>',
    519                      '--bundled-header',
    520                      '"third_party/speech-dispatcher/libspeechd.h"',
    521                      '--link-directly=<(linux_link_libspeechd)',
    522                      'spd_open',
    523                      'spd_say',
    524                      'spd_stop',
    525                      'spd_close',
    526                      'spd_pause',
    527                      'spd_resume',
    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',
    533                      'spd_list_modules',
    534                      'spd_set_output_module',
    535           ],
    536           'message': 'Generating libspeechd library loader.',
    537           'process_outputs_as_sources': 1,
    538         },
    539       ],
    540     },
    541     {
    542       'target_name': 'x11',
    543       'type': 'none',
    544       'toolsets': ['host', 'target'],
    545       'conditions': [
    546         ['_toolset=="target"', {
    547           'direct_dependent_settings': {
    548             'cflags': [
    549               '<!@(<(pkg-config) --cflags x11)',
    550             ],
    551           },
    552           'link_settings': {
    553             'ldflags': [
    554               '<!@(<(pkg-config) --libs-only-L --libs-only-other x11 xi)',
    555             ],
    556             'libraries': [
    557               '<!@(<(pkg-config) --libs-only-l x11 xi)',
    558             ],
    559           },
    560         }, {
    561           'direct_dependent_settings': {
    562             'cflags': [
    563               '<!@(pkg-config --cflags x11)',
    564             ],
    565           },
    566           'link_settings': {
    567             'ldflags': [
    568               '<!@(pkg-config --libs-only-L --libs-only-other x11 xi)',
    569             ],
    570             'libraries': [
    571               '<!@(pkg-config --libs-only-l x11 xi)',
    572             ],
    573           },
    574         }],
    575       ],
    576     },
    577     {
    578       'target_name': 'xext',
    579       'type': 'none',
    580       'conditions': [
    581         ['_toolset=="target"', {
    582           'direct_dependent_settings': {
    583             'cflags': [
    584               '<!@(<(pkg-config) --cflags xext)',
    585             ],
    586           },
    587           'link_settings': {
    588             'ldflags': [
    589               '<!@(<(pkg-config) --libs-only-L --libs-only-other xext)',
    590             ],
    591             'libraries': [
    592               '<!@(<(pkg-config) --libs-only-l xext)',
    593             ],
    594           },
    595         }],
    596       ],
    597     },
    598     {
    599       'target_name': 'xfixes',
    600       'type': 'none',
    601       'conditions': [
    602         ['_toolset=="target"', {
    603           'direct_dependent_settings': {
    604             'cflags': [
    605               '<!@(<(pkg-config) --cflags xfixes)',
    606             ],
    607           },
    608           'link_settings': {
    609             'ldflags': [
    610               '<!@(<(pkg-config) --libs-only-L --libs-only-other xfixes)',
    611             ],
    612             'libraries': [
    613               '<!@(<(pkg-config) --libs-only-l xfixes)',
    614             ],
    615           },
    616         }],
    617       ],
    618     },
    619     {
    620       'target_name': 'libgcrypt',
    621       'type': 'none',
    622       'conditions': [
    623         ['_toolset=="target" and use_cups==1', {
    624           'direct_dependent_settings': {
    625             'cflags': [
    626               '<!@(libgcrypt-config --cflags)',
    627             ],
    628           },
    629           'link_settings': {
    630             'libraries': [
    631               '<!@(libgcrypt-config --libs)',
    632             ],
    633           },
    634         }],
    635       ],
    636     },
    637     {
    638       'target_name': 'gnome_keyring',
    639       'type': 'none',
    640       'conditions': [
    641         ['use_gnome_keyring==1', {
    642           'direct_dependent_settings': {
    643             'cflags': [
    644               '<!@(<(pkg-config) --cflags gnome-keyring-1)',
    645             ],
    646             'defines': [
    647               'USE_GNOME_KEYRING',
    648             ],
    649             'conditions': [
    650               ['linux_link_gnome_keyring==0', {
    651                 'defines': ['DLOPEN_GNOME_KEYRING'],
    652               }],
    653             ],
    654           },
    655           'conditions': [
    656             ['linux_link_gnome_keyring!=0', {
    657               'link_settings': {
    658                 'ldflags': [
    659                   '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
    660                 ],
    661                 'libraries': [
    662                   '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
    663                 ],
    664               },
    665             }, {
    666               'conditions': [
    667                 ['OS=="linux"', {
    668                  'link_settings': {
    669                    'libraries': [
    670                      '-ldl',
    671                    ],
    672                  },
    673                 }],
    674               ],
    675             }],
    676           ],
    677         }],
    678       ],
    679     },
    680     {
    681       # The unit tests use a few convenience functions from the GNOME
    682       # Keyring library directly. We ignore linux_link_gnome_keyring and
    683       # link directly in this version of the target to allow this.
    684       # *** Do not use this target in the main binary! ***
    685       'target_name': 'gnome_keyring_direct',
    686       'type': 'none',
    687       'conditions': [
    688         ['use_gnome_keyring==1', {
    689           'direct_dependent_settings': {
    690             'cflags': [
    691               '<!@(<(pkg-config) --cflags gnome-keyring-1)',
    692             ],
    693             'defines': [
    694               'USE_GNOME_KEYRING',
    695             ],
    696             'conditions': [
    697               ['linux_link_gnome_keyring==0', {
    698                 'defines': ['DLOPEN_GNOME_KEYRING'],
    699               }],
    700             ],
    701           },
    702           'link_settings': {
    703             'ldflags': [
    704               '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
    705             ],
    706             'libraries': [
    707               '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
    708             ],
    709           },
    710         }],
    711       ],
    712     },
    713     {
    714       'target_name': 'dbus',
    715       'type': 'none',
    716       'direct_dependent_settings': {
    717         'cflags': [
    718           '<!@(<(pkg-config) --cflags dbus-1)',
    719         ],
    720       },
    721       'link_settings': {
    722         'ldflags': [
    723           '<!@(<(pkg-config) --libs-only-L --libs-only-other dbus-1)',
    724         ],
    725         'libraries': [
    726           '<!@(<(pkg-config) --libs-only-l dbus-1)',
    727         ],
    728       },
    729     },
    730     {
    731       'target_name': 'glib',
    732       'type': 'none',
    733       'toolsets': ['host', 'target'],
    734       'variables': {
    735         'glib_packages': 'glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0',
    736       },
    737       'conditions': [
    738         ['_toolset=="target"', {
    739           'direct_dependent_settings': {
    740             'cflags': [
    741               '<!@(<(pkg-config) --cflags <(glib_packages))',
    742             ],
    743           },
    744           'link_settings': {
    745             'ldflags': [
    746               '<!@(<(pkg-config) --libs-only-L --libs-only-other <(glib_packages))',
    747             ],
    748             'libraries': [
    749               '<!@(<(pkg-config) --libs-only-l <(glib_packages))',
    750             ],
    751           },
    752         }, {
    753           'direct_dependent_settings': {
    754             'cflags': [
    755               '<!@(pkg-config --cflags <(glib_packages))',
    756             ],
    757           },
    758           'link_settings': {
    759             'ldflags': [
    760               '<!@(pkg-config --libs-only-L --libs-only-other <(glib_packages))',
    761             ],
    762             'libraries': [
    763               '<!@(pkg-config --libs-only-l <(glib_packages))',
    764             ],
    765           },
    766         }],
    767         ['use_x11==1', {
    768           'link_settings': {
    769             'libraries': [ '-lXtst' ]
    770           }
    771         }],
    772       ],
    773     },
    774     {
    775       'target_name': 'pangocairo',
    776       'type': 'none',
    777       'toolsets': ['host', 'target'],
    778       'conditions': [
    779         ['_toolset=="target"', {
    780           'direct_dependent_settings': {
    781             'cflags': [
    782               '<!@(<(pkg-config) --cflags pangocairo pangoft2)',
    783             ],
    784           },
    785           'link_settings': {
    786             'ldflags': [
    787               '<!@(<(pkg-config) --libs-only-L --libs-only-other pangocairo pangoft2)',
    788             ],
    789             'libraries': [
    790               '<!@(<(pkg-config) --libs-only-l pangocairo pangoft2)',
    791             ],
    792           },
    793         }, {
    794           'direct_dependent_settings': {
    795             'cflags': [
    796               '<!@(pkg-config --cflags pangocairo pangoft2)',
    797             ],
    798           },
    799           'link_settings': {
    800             'ldflags': [
    801               '<!@(pkg-config --libs-only-L --libs-only-other pangocairo pangoft2)',
    802             ],
    803             'libraries': [
    804               '<!@(pkg-config --libs-only-l pangocairo pangoft2)',
    805             ],
    806           },
    807         }],
    808       ],
    809     },
    810     {
    811       'target_name': 'libresolv',
    812       'type': 'none',
    813       'link_settings': {
    814         'libraries': [
    815           '-lresolv',
    816         ],
    817       },
    818     },
    819     {
    820       'target_name': 'udev',
    821       'type': 'none',
    822       'conditions': [
    823         # libudev is not available on *BSD
    824         ['_toolset=="target" and os_bsd!=1', {
    825           'direct_dependent_settings': {
    826             'cflags': [
    827               '<!@(<(pkg-config) --cflags libudev)'
    828             ],
    829           },
    830           'link_settings': {
    831             'ldflags': [
    832               '<!@(<(pkg-config) --libs-only-L --libs-only-other libudev)',
    833             ],
    834             'libraries': [
    835               '<!@(<(pkg-config) --libs-only-l libudev)',
    836             ],
    837           },
    838         }],
    839       ],
    840     },
    841   ],
    842 }
    843