<div dir="ltr"><div><div><div>Hi Gilles,<br><br></div>I don't think you can get rid of this .lib, which is the import library. Linking in the .exe/.dll world does not use the .exe or .dll file itself as the item to be linked against, but its import library (.lib) instead. You cannot link against a .dll if you only have the .dll, you need its import library. The same holds true for executables.<br><br></div>So if you want to link against a.exe, you need its a.lib import library.<br><br></div>Petr<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 10, 2016 at 7:04 PM, FOLLIC Gilles <span dir="ltr"><<a href="mailto:gilles.follic@sgcib.com" target="_blank">gilles.follic@sgcib.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link="blue" vlink="purple" lang="FR">
<div>
<p><span lang="EN-US">Hello,<u></u><u></u></span></p>
<p><span lang="EN-US"><u></u> <u></u></span></p>
<p><span lang="EN-US">The idea is to get all the depedencies from an other project (executable).<u></u><u></u></span></p>
<p><span lang="EN-US"><u></u> <u></u></span></p>
<p><span lang="EN-US">set_property(TARGET [EXECUTABLE] PROPERTY ENABLE_EXPORTS true)<u></u><u></u></span></p>
<p><span lang="EN-US">target_link_libraries(${PROJECT_NAME} [EXECUTABLE])<u></u><u></u></span></p>
<p><span lang="EN-US"><u></u> <u></u></span></p>
<p><span lang="EN-US">This works perfectly, as I get all the include, libs I need, but I get on my<u></u><u></u></span></p>
<p><span lang="EN-US">visual studio a new lib from my [EXECUTABLE], called [EXECUTABLE].lib which<u></u><u></u></span></p>
<p><span lang="EN-US">I don't need since it is a executable, not a librairy.<u></u><u></u></span></p>
<p><span lang="EN-US"><u></u> <u></u></span></p>
<p><span lang="EN-US">How can I do to remove this lib?<u></u><u></u></span></p>
<p><span lang="EN-US"><u></u> <u></u></span></p>
<p><span lang="EN-US">Thank you<u></u><u></u></span></p>
<p><span lang="EN-US"><u></u> <u></u></span></p>
<p><span lang="EN-US">Gilles<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</div>
<p>*************************************************************************<br>This message and any attachments (the "message") are confidential, intended solely for the addresse(s), and may contain legally privileged information.<br>Any unauthorized use or dissemination is prohibited. E-mails are susceptible to alteration.  <br>Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or<br>falsified.<br>Please visit <a href="http://swapdisclosure.sgcib.com" target="_blank">http://swapdisclosure.sgcib.com</a> for important information with respect to derivative products.<br>                              ************<br>Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et susceptibles de contenir des informations couvertes <br>par le secret professionnel. <br>Ce message est etabli a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite.<br>Tout message electronique est susceptible d'alteration. <br>La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie.<br>Veuillez consulter le site <a href="http://swapdisclosure.sgcib.com" target="_blank">http://swapdisclosure.sgcib.com</a> afin de recueillir d'importantes informations sur les produits derives.<br>*************************************************************************</p></div>

<br>--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br></blockquote></div><br></div>