<div dir="ltr"><div><div><div><div><div>Hi, <br><br></div>In case, you think about having more than on executable in different folder or if you will have plugins, I wouldn't recommend using "@executable_path" instead "@loader_path" is the way to go. <br>

<br></div>This is discussed here :<a href="http://cmake.3232098.n2.nabble.com/Mac-loader-path-for-rpath-questions-tp7587456p7587710.html">http://cmake.3232098.n2.nabble.com/Mac-loader-path-for-rpath-questions-tp7587456p7587710.html</a><br>

<br></div>There is also a topic here [1] that would need some love and care ... if there is some interest, I could rebase the topic but would need help for other to write test and move forward with integration in CMake proper.<br>

<br></div>Thanks<br></div>Jc<br><div><div><br>[1] <a href="https://github.com/jcfr/CMake/tree/tweak-bundleutilities-for-rpath">https://github.com/jcfr/CMake/tree/tweak-bundleutilities-for-rpath</a><br></div></div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">On Wed, Jun 18, 2014 at 5:12 PM, Zack Galbreath <span dir="ltr"><<a href="mailto:zack.galbreath@kitware.com" target="_blank">zack.galbreath@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr"><div class="">On Wed, Jun 18, 2014 at 10:14 AM, Sankhesh Jhaveri <span dir="ltr"><<a href="mailto:sankhesh.jhaveri@kitware.com" target="_blank">sankhesh.jhaveri@kitware.com</a>></span> wrote:<br></div>

<div class="gmail_extra">
<div class="gmail_quote"><div class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>


  
  

<div>
<br>
Any ideas/suggestions how to properly package Linux archive?<br>
<br></div></blockquote></div><div><br><br><br><div><div>This has worked for me in the past:<br><br>set(origin "$ORIGIN")<br>if (APPLE)<br>  set(origin "@executable_path")<br>endif()<br>set(CMAKE_INSTALL_RPATH "${origin}/../lib:${origin}/")<br>


<br></div>This was for a project with a typical install tree: the executables in 
bin/ and the libraries in a sibling directory named lib/.  The only 
other trick was to tell fixup_bundle() to ignore the files in the lib/ 
dir of the install tree.  I did this by defining the following function before my call to 
fixup_bundle():<br><br>function(gp_resolved_file_type_override resolved_file type_var)<br>  if(resolved_file MATCHES "\\.\\./lib")<br>    set(${type_var} "local" PARENT_SCOPE)<br>  endif()<br>endfunction()<br>


</div></div></div></div></div>
<br>--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br></blockquote></div><br><br clear="all"><br>-- <br>+1 919 869 8849<br>
</div>