What I have tried
I am working sample application using Caffe model in MAC OSX. I downloaded Caffe source from https://github.com/BVLC/caffe. Steps:
1.Installed dependencies packages for caffe as said in Caffe Link. Some packages is in /usr/local/lib and some packages /opt/local/lib
2.Builded shared library(SO) file using CMakeLists.txt in CMake GUI.
3.Created sample c++ application
4.Linked all dependencies and caffe library files with c++ application.
- Built the application
After I executed the application, It needed library files of dependencies package from /usr/local/lib
What I want
After I installed caffe dependencies, I copied all library files in another location.
How to link specified location of the library files in Cmake.?
In Mac osx, when the application run, It takes the library form /usr/local/lib not in the current folder(application folder).
How do I set the application to take library files from current folder.?
install_name_tool
, but you want to do that before you build, otherwise the app will look in the wrong location. – dmedine