1

I just want to build an android project called hello with gyp, the gyp code like:

#android
{
    'targets': [
        {
            'target_name': 'hello',
            'type': 'executable',
            'link_settings':{
                'libraries+':[
                    './foo/lib/libfoo.a',
                ],
            },
            'sources': [
                    'hello.c',
            ],
        },
    ],
}

And hello need to link with libfoo.a in foo/lib directory. The foo.gyp/foo.gypi like:

{
  "targets": [
    {
      "target_name": "foo",
      "type": "static_library",
      "sources": [
        "foo.c",
      ],
    }
  ]
}

I know this can be solved by add :

'dependencies': ['foo/foo.gypi:foo']

But my project can't use this way. How can I link the static library correcly in gyp.

Chogri
  • 326
  • 3
  • 15

0 Answers0