<div dir="ltr"><div><div>Hi, I'm trying to modify the install_name path of a library created with add_library(SHARED) on MacOS, using Unix Makefiles, cmake 2.8.10.2 and 2.8.11.<br><br></div>I've tried setting the global variable<br>
set(CMAKE_INSTALL_NAME_DIR "@executable_path/../Frameworks/")<br>I've tried editing the target properties with<br> set_target_properties(aname PROPERTIES INSTALL_NAME_DIR "@executable_path/../Frameworks/")<br>
</div>and also tried manually editing the link flags with <br><div> set_target_properties(aname PROPERTIES LINK_FLAGS "-install_name @executable_path/../Frameworks/libaname.dylib")<br><br></div><div>However NONE of these methods worked! In the link line there is always an -install_name command that just outputs the name of the library. I've dug around a lot before resorting to the mailing list and found this old threads like <a href="http://www.cmake.org/pipermail/cmake/2011-April/043826.html">http://www.cmake.org/pipermail/cmake/2011-April/043826.html</a> or <a href="http://www.cmake.org/pipermail/cmake/2010-August/038959.html">http://www.cmake.org/pipermail/cmake/2010-August/038959.html</a> and and a few patches that are supposedly working like <a href="http://robotcub-hackers.2198711.n2.nabble.com/CMake-RPATH-in-OS-X-td7578206.html">http://robotcub-hackers.2198711.n2.nabble.com/CMake-RPATH-in-OS-X-td7578206.html</a> so I don't understand what's wrong.<br>
</div><div><br></div><div>I've even doublechecked with get_target_property and the INSTALL_NAME_DIR is correctly initialized.<br></div><div>So I'm completely out of options, any help is appreciated.<br></div><div>
Vittorio<br></div></div>