I'm working on a simple module for node.js in C/C++. The module depends on a third party (open source) C library that may or may not be installed on the machines my module can be compiled on.
My question is, how do I handle this dependency? Does the bindings.gyp offer some sort of mechanism I can use, shoud I just bundle it (if then, how?), or should I document my way out of it and inform users to install the library before compiling my module?
You do this with targets in gyp:
https://code.google.com/p/gyp/wiki/GypUserDocumentation#Dependencies_between_targets
Example in a real module:
https://github.com/developmentseed/node-sqlite3/blob/7d763404079c47319f870ea1d11636517f1f0821/deps/sqlite3/sqlite3.gyp#L40-68
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With