I wonder how @rpath is supposed to work on OSX/BigSur …
I build a framework with CMake, that basically works
But all tests are failing with a message basically saying the framework can not be found, but it’s there.
./build/bin/my_test dyld: Library not loaded: @rpath/MyProject.framework/Versions/0.0.0/MyProject Referenced from: /Users/a4z/project/./build/bin/my_test Reason: image not found zsh: abort ./build/bin/my_test -> ls build/lib/MyProject.framework/Versions/0.0.0/MyProject build/lib/MyProject.framework/Versions/0.0.0/MyProject
I tried to set , as described here, https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling, but have no success.
Any idea what I could do to run the tests using the framework ?
PS: creating a dynlib, not a framework, works when I set the LD_LIBRARY_PATH , but since we build also for iOS, I need a framework …
install_name_tool to replace the rpath with an absolute path seem to work …