wangyu5 / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

support propagating link_settings from targets with non-library types #173

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have a .lib file that I want to add as a dependency whenever someone declares 
a dependency on my target.

Currently I do the following:

    {
      'target_name': 'icudata',
      'type': '<(library)',
      'msvs_guid': 'D3A97815-3309-44F8-B9BB-CBBE2393A454',
      'sources': [
         'linux/icudt42l_dat.S',
         'mac/icudt42l_dat.s',
      ],
      'conditions': [
        [ 'OS == "win"', {
          'link_settings': {
            'libraries': [
              '<(DEPTH)/third_party/icu/icudt42.lib',
            ],
          },
          'sources': [
            # In order to pass our icudt42.lib dependency on to dependent
            # targets, we need to have at least one source file.
            'empty.c',
          ],
        }],

I'd like to declare a type of 'none' and not need any sources. This is what I 
want:

    {
      'target_name': 'icudata',
      'type': '<(library)',
      'msvs_guid': 'D3A97815-3309-44F8-B9BB-CBBE2393A454',
      'sources': [
         'linux/icudt42l_dat.S',
         'mac/icudt42l_dat.s',
      ],
      'conditions': [
        [ 'OS == "win"', {
          'type': 'none',
          'link_settings': {
            'libraries': [
              '<(DEPTH)/third_party/icu/icudt42.lib',
            ],
          },
        }],

Original issue reported on code.google.com by bmcqu...@google.com on 13 Jan 2011 at 2:54