How to declare inter-dependencies between target dependencies?

20 views
Skip to first unread message

Iñaki Baz Castillo

unread,
Jul 3, 2019, 5:28:03 AM7/3/19
to gyp-developer

Hi,


Let's assume my app.gyp looks as follows:


{
  'target_defaults': {
    'type': 'executable',
    'dependencies':
    [
      'deps/depA/depA.gyp:depA',
      'deps/depB/depB.gyp:depB'
    ],
    # etc
  }
}


Both depA and depB are external libraries (I get them via git clone and keep them into my app).


Now it happens that depB depends on depA being globally installed in the system (this is, depB.cpp does something like #include <depA.hpp>).


Obviously I do not want to depend on depA being globally installed in my system but prefer that depB uses depA which is already present in my app deps folder.


Yes, I can "mangle" deps/depB/depB.gyp and add:


'dependencies': [
  '../depsA/depA.depA',
],


but for obvious reasons I do not want to modify code within deps/ (as I update both external libs often from their respective mainstream projects).

I fail to see how to do this by reading the GYP documentation. Is it possible at all?


Thanks so much.

Reply all
Reply to author
Forward
0 new messages