<div dir="ltr">You can try:<div><br></div><div><p class="MsoNormal" style="font-size:12.8px"><span lang="EN-US">include(version.cmake </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:menlo;font-size:11px">OPTIONAL</span><span style="font-size:12.8px">)</span></p><p class="MsoNormal" style="font-size:12.8px"><span style="font-size:12.8px"><br></span></p><p class="MsoNormal" style="font-size:12.8px"><span style="font-size:12.8px">which will make include tolerate the absence of version.cmake,</span></p><p class="MsoNormal" style="font-size:12.8px"><span style="font-size:12.8px">but then your install statement will only be OK after version.cmake has been created.</span></p><p class="MsoNormal" style="font-size:12.8px"><span style="font-size:12.8px"><br></span></p>







</div><div><span lang="EN-US"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-01-19 9:30 GMT+01:00 Wagner Martin <span dir="ltr"><<a href="mailto:Martin.Wagner@neuberger.net" target="_blank">Martin.Wagner@neuberger.net</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="DE" link="blue" vlink="purple">
<div class="m_3821724127994325406WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hello,<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">I’ve searched for some time, but didn’t find anything useful. Most finds deal with including version system stuff passed to header files for compilation.<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">I want to achieve something like that:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Include(version.cmake)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">install(FILES firmware.hex  RENAME  firmware_${version_string}.<wbr>hex)<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">where version.cmake is created like explained in this mail
<a href="https://cmake.org/pipermail/cmake/2010-July/038015.html" target="_blank">https://cmake.org/pipermail/<wbr>cmake/2010-July/038015.html</a> alongside headers needed for compilation.<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">However, CMake needs to include version.cmake at first CMake run time, which is not possible because it’s a generated file.<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">Is there any other way to do the rename?<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">Thanks for your help!<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">Regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Martin<u></u><u></u></span></p>
</div>
</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/<wbr>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/<wbr>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>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/<wbr>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/<wbr>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/<wbr>mailman/listinfo/cmake</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div>
</div>