I'm creating C++ Unity plugin in Xcode with OpenCV for OS X. The plugin compiles and works on my Mac, but on other machines it tries to load dynamic libraries (for example, ffmpeg, libtiff, webp) from /usr/local/opt... (Library not loaded: /usr/local/opt/webp/lib/libwebp.6.dylib etc.)
Brew install solves the problem, but it is necessary to distribute this plugin "as is".
I have 2 questions: 1) how can I know if my project will try to use dynamic libraries (on other machine)?
2) how can I make my project to load them from bundle, not from /usr/local/opt? (I tried link with -static, but there were 136 errors "Undefined symbols for architecture x86_64 - _OSSpinLockLock, _dispatch_get_global_queue and many others).