<div dir="ltr"><div>Hi Luca.<br><br></div>You could look into the CMake command include_external_msproject(), or into the ExternalProject module.<br><br>Petr<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Feb 5, 2014 at 12:19 PM, Luca Gherardi <span dir="ltr"><<a href="mailto:luca.gherardi@unibg.it" target="_blank">luca.gherardi@unibg.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="#0563C1" vlink="#954F72" lang="EN-US"><div><p class="MsoNormal">I’m working with Visual Studio and I need to create the CMakeLists files for the following scenario.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I have a project A, which contains the sources for a library.<u></u><u></u></p><p class="MsoNormal">This project has its own CMakeLists and generates a lib (add_library).<u></u><u></u></p><p class="MsoNormal">
<u></u> <u></u></p><p class="MsoNormal">I have a second project B, which contains the sources from an executable and uses the library generated by A.<u></u><u></u></p><p class="MsoNormal">I would like to setup its CMakeLists in such a way that:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p><u></u><span>-<span style="font:7.0pt "Times New Roman"">        </span></span><u></u>The Visual Studio solution generated from the CMakeLists of B includes the projects for A and B<u></u><u></u></p>
<p><u></u><span>-<span style="font:7.0pt "Times New Roman"">        </span></span><u></u>The project A should be just a link to the project generated with the CMakeLists of A. In other words I would like to avoid duplications of compilation files. I would like that the file generated for A by a compilation started from the solution of A were stored in the same path of the file generated for A by a compilation started from the solution of B.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Is that possible?<u></u><u></u></p><p class="MsoNormal">I know it is possible to do it with visual studio, but I don’t know how to do it with CMake.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Thanks in advance.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal" style="margin-bottom:13.5pt"><span style>------------------------------------------------------------------------------<u></u><u></u></span></p>
<p class="MsoNormal"><span style>Luca Gherardi, PhD<br>Postdoc at ETH Zurich<br>Institute for Dynamic Systems and Control<br>Room ML K 34<br>Sonneggstrasse 3 - 8092 Zurich<u></u><u></u></span></p><p class="MsoNormal"><span style>SWITZERLAND<u></u><u></u></span></p>
<p class="MsoNormal"><span style><br>Office: <a href="tel:%2B41%2044%20632%2073%2055" value="+41446327355" target="_blank">+41 44 632 73 55</a><br>Mobile: <a href="tel:%2B41%20788%20833%20174" value="+41788833174" target="_blank">+41 788 833 174</a><br>
Home: <a href="http://www.lucagherardi.it" target="_blank"><span style="color:blue">http://www.lucagherardi.it</span></a><u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p></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://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br></div>