<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2014-12-19 11:25 GMT+01:00 Eric Noulard <span dir="ltr"><<a href="mailto:eric.noulard@gmail.com" target="_blank">eric.noulard@gmail.com</a>></span>:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">2014-12-19 11:22 GMT+01:00 Petr Bena <span dir="ltr"><<a href="mailto:benapetr@gmail.com" target="_blank">benapetr@gmail.com</a>></span>:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">There is this variable that cpack uses for description of package.<br>
This description has many lines and uses special symbols, like quotes.<br>
<br>
Putting it into a variable is extremely complex, so I would prefer to<br>
load it from external resource. I did this:<br>
<br>
FILE(READ "${CMAKE_CURRENT_SOURCE_DIR}/build/summary" CPACK_PACKAGE_DESCRIPTION)<br>
<br>
following <a href="http://www.cmake.org/cmake/help/v3.0/command/file.html" target="_blank">http://www.cmake.org/cmake/help/v3.0/command/file.html</a><br>
<br>
the only thing that happened was that this variable expanded in<br>
CPackConfig.cmake to a long unescaped text, that caused a syntax error<br>
in that cmake file.<br>
<br>
What is a correct way to do that?<br></blockquote><div><br></div></span><div>You can use CPACK_PACKAGE_DESCRIPTION_FILE instead of CPACK_PACKAGE_DESCRIPTION<br></div><div>i.e.<br><br>set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/build/summary)<br></div></div></div></div></blockquote><div><br></div><div>see documentations of CPACK_XXX vars:<br> <a href="http://www.cmake.org/cmake/help/v3.0/module/CPack.html?highlight=cpack_package_description#variable:CPACK_PACKAGE_DESCRIPTION_FILE">http://www.cmake.org/cmake/help/v3.0/module/CPack.html?highlight=cpack_package_description#variable:CPACK_PACKAGE_DESCRIPTION_FILE</a><br></div></div><br>-- <br><div class="gmail_signature"><div dir="ltr"><div>Eric<br>L'élection n'est pas la démocratie -- <a href="http://www.le-message.org" target="_blank">http://www.le-message.org</a></div></div></div>
</div></div>