<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">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><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><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
--<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://public.kitware.com/mailman/listinfo/cmake" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br>
</blockquote></div><br clear="all"><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>