<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Woops wrong target email. So just so that anyone can read.. here it is:<div><br><div><div>Début du message réexpédié :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>De : </b></span><span style="font-family:'Helvetica'; font-size:medium;">Lucas Soltic <<a href="mailto:lucas.soltic@orange.fr">lucas.soltic@orange.fr</a>><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>Objet : </b></span><span style="font-family:'Helvetica'; font-size:medium;"><b>Rép : [CMake] How to install files produced by custom targets</b><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>Date : </b></span><span style="font-family:'Helvetica'; font-size:medium;">6 septembre 2013 19:15:27 UTC+02:00<br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>À : </b></span><span style="font-family:'Helvetica'; font-size:medium;">Petr Kmoch <<a href="mailto:petr.kmoch@gmail.com">petr.kmoch@gmail.com</a>><br></span></div><br><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Le 6 sept. 2013 à 14:23, Petr Kmoch <<a href="mailto:petr.kmoch@gmail.com">petr.kmoch@gmail.com</a>> a écrit :</div><div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">I just wanted to point out the existence of CMAKE_BUILD_TOOL, as it's related. In your case, however, you're probably better off hardcoding 'make'. It should actually be done the same way you run 'make' in your custom command creating the library.<br></div></blockquote><div><br></div><div>Ok :)</div><div><br></div><div>I've looked at install(SCRIPT …) and in the meantime I found install(DIRECTORY …) and I realized it was also solving my problem!</div><div>So at the moment I've a working solution with install(DIRECTORY …)</div><div><br></div><div>Thanks a lot for your help! Still good to know that CMake allows executing scrips at install time.</div><div><br></div><div>Lucas</div><div><br></div><blockquote type="cite"><div dir="ltr">
</div><div class="gmail_extra"><div class="gmail_quote">On Fri, Sep 6, 2013 at 2:08 PM, Lucas Soltic <span dir="ltr"><<a href="mailto:lucas.soltic@orange.fr" target="_blank">lucas.soltic@orange.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><div>Le 6 sept. 2013 à 12:58, Petr Kmoch <<a href="mailto:petr.kmoch@gmail.com" target="_blank">petr.kmoch@gmail.com</a>> a écrit :</div>
<div class="im"><br><blockquote type="cite"><div dir="ltr">Hi Lucas,<br><br>you could look into install(CODE ...) or its escaping-hell-avoiding brother, install(SCRIPT ...). The code/script could then be something like execute_process(COMMAND make install ...) or perhaps even execute_process(COMMAND ${CMAKE_BUILD_TOOL} install ...).<br>
</div></blockquote><div><br></div></div><div>Hi Petr,</div><div><br></div><div>I guess execute_process() with CMAKE_BUILD_TOOL depends on whether the target build tool supports "install" ? Will that work when installing from Visual Studio for example?</div>
<div><br></div><div>I need a solution that works both on Windows and Unixes :/</div><div>I'll have a look a install(SCRIPT …).</div><div><br></div><div>Thanks!</div><span class="HOEnZb"><font color="#888888"><div>Lucas</div>
</font></span><div class="im"><br><blockquote type="cite"><div dir="ltr"><div>
<br></div>Petr<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Sep 6, 2013 at 11:44 AM, Lucas Soltic <span dir="ltr"><<a href="mailto:lucas.soltic@orange.fr" target="_blank">lucas.soltic@orange.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
Considering that I have a custom target that outputs some libraries and these libraries were built using configure+make. The custom library is based on autotools. Configure + make are executed by a custom command in the custom target.<br>
<br>
Is it possible to add a CMake install rule that will execute 'make install' on my custom library? So that the install process is automatically handled.<br>
<br>
I'm asking that because at the moment I'm finding very hard to install a custom library only with classical CMake install rules, because I cannot know in advance the names of all the outputs because they have suffixes depending on the library version. And I would prefer to avoid hardcoding these versions, so that I can easily update my library.<br>
<br>
Regards,<br>
Lucas<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>
</blockquote></div></div><br></div></blockquote></div><br></div>
</blockquote></div><br></div></blockquote></div><br></div></body></html>