<div dir="ltr">Thanks Michael. The link is very helpful (although very hard to digest [probably because I am new to CMake] - I have gone over it multiple times now and don&#39;t fully understand everything). I will experiment with those commands in my projects.<div>

<br></div><div style>- Saad</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 3, 2013 at 2:52 AM, Michael Wild <span dir="ltr">&lt;<a href="mailto:themiwi@gmail.com" target="_blank">themiwi@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">You should find this interesting: <a href="http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file" target="_blank">http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file</a><br>



<br>In short:<br>* In project A create a AConfig.cmake file and export your targets<br>* In project B call find_package(A REQUIRED)<br><br>HTH<br><br>Michael<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">

<div><div class="h5">

On Wed, Apr 3, 2013 at 7:44 AM, Saad Khattak <span dir="ltr">&lt;<a href="mailto:saadrustam@gmail.com" target="_blank">saadrustam@gmail.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div class="h5">

<div dir="ltr">Hi,<div><br></div><div>Suppose I have two personal repositories: A and B. Repository B has a dependency on repository A i.e. repository A builds multiple libraries and repository B builds multiple libraries and executables. I can build 32-bit and 64-bit libraries/executables for both by having a &#39;build&#39; and &#39;buildx64&#39; projects generated by CMake. The libraries and executables are put in the default folders (e.g. repoA/build/src/libraryName/Debug and repoA/buildx64/src/library/Debug).</div>





<div><br></div><div>Repo B&#39;s executables depend on repo A&#39;s libraries and libraries in B. Linking with libraries within B is straightforward as CMake is able to figure out the necessary paths for the libraries B is building which B&#39;s executables depend on.</div>





<div><br></div><div>Repo B also depends on Repo A&#39;s libraries and all executables in B have to search for them. How do I go about this? Currently I am searching for each library by specifying its path:<br>

</div><div><br></div><div># I have a CACHE variable for the path to Repo A&#39;s build folder that the user must provide</div><div>target_link_libraries(myProject repoAPath/build/src/LibName/${CMAKE_CFG_INTDIR}) </div>

<div><br></div><div>which feels like a very wrong way to go about linking with other libraries considering CMake is supposed to make the finding libraries part easier. I would appreciate clarification of the workflow in this case.</div>





<div><br></div><div>Thanks,</div><div>Saad</div><div><br></div><div><br></div></div>
<br></div></div><span class="HOEnZb"><font color="#888888">--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</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>
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>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></font></span></blockquote></div><br></div>
</blockquote></div><br></div>