Using MTP on macOS with Node.js: Part 6

Feature image

Since libmtp is licensed under the LGPL, I'm trying to figure out how I should go about linking and distributing the library with my code without causing any problems. My code is licensed under BSD-2-Clause, and I'd like to keep it that way.

If I understand correctly, as long as I dynamically link to the libmtp library, I'm not creating a derivative work and I can include a copy of the library binaries. Now, do I need to compile my own versions of the libmtp binaries, or can I just copy over the ones installed by Homebrew?

It seems like an important part of LGPL is that people should be able to use a different version of the library with my app. On Linux, libmtp comes preinstalled on most distro's, so I don't mind just linking against that. Unfortunately, on macOS you need to install it first with brew install libmtp. I can't expect end-users to do this, so need to find a way to distribute the library with the app, in such a way that it can be replaced with a different version.