<div dir="ltr">Thank you Marc.<div><br></div><div>That's interesting, I was not aware that they were relinked. I thought they were just copied.</div><div><br></div><div>I guess I'll have to provide the install directory to pick the libraries found in the install directory instead of the build directory?</div><div><br></div><div>Regards,</div><div>Saad</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jan 12, 2018 at 2:57 AM CHEVRIER, Marc <<a href="mailto:marc.chevrier@sap.com">marc.chevrier@sap.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">







<div bgcolor="white" lang="EN-GB" link="#0563C1" vlink="#954F72">
<div class="m_-6819989091601133313WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">During install step, installed libraries and executables are relinked to generate binaries without absolute paths so installed artifacts are independent from your build tree.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">During build step, build binaries are used as well as absolute paths so produced binaries can be used during build step (i.e. launching an executable produced) without requirements regarding
 paths settings (i.e. PATH or LD_LIBRARY_PATH).<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">CMake <<a href="mailto:cmake-bounces@cmake.org" target="_blank">cmake-bounces@cmake.org</a>> on behalf of Saad Khattak <<a href="mailto:saadrustam@gmail.com" target="_blank">saadrustam@gmail.com</a>><br>
<b>Date: </b>Thursday 11 January 2018 at 19:44<br>
<b>To: </b>Cmake Mailing List <<a href="mailto:cmake@cmake.org" target="_blank">cmake@cmake.org</a>><br>
<b>Subject: </b>[CMake] Get find_package to choose INSTALLed libraries instead of libraries in the build folder<u></u><u></u></span></p>
</div></div></div><div bgcolor="white" lang="EN-GB" link="#0563C1" vlink="#954F72"><div class="m_-6819989091601133313WordSection1">
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Hi, <u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I would like find_package(MyLib) to link find the libraries found in the INSTALL folder instead of the build folder.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Currently, when I do a find_package(MyLib) and then target_link_libraries(target MyLib) the paths all point to MyLib's build folder and not the folder where MyLib's library/headers were installed.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thank you,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Saad<u></u><u></u></p>
</div>
</div>
</div></div></blockquote></div>