<div dir="ltr"><div><div>Hi, I&#39;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&#39;ve tried setting the global variable<br>
  set(CMAKE_INSTALL_NAME_DIR &quot;@executable_path/../Frameworks/&quot;)<br>I&#39;ve tried editing the target properties with<br>  set_target_properties(aname PROPERTIES INSTALL_NAME_DIR  &quot;@executable_path/../Frameworks/&quot;)<br>
</div>and also tried manually editing the link flags with <br><div>  set_target_properties(aname PROPERTIES LINK_FLAGS  &quot;-install_name @executable_path/../Frameworks/libaname.dylib&quot;)<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&#39;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&#39;t understand what&#39;s wrong.<br>
</div><div><br></div><div>I&#39;ve even doublechecked with get_target_property and the INSTALL_NAME_DIR is correctly initialized.<br></div><div>So I&#39;m completely out of options, any help is appreciated.<br></div><div>
Vittorio<br></div></div>