[CMake] How to use a multiline long string as a variable for CPACK_PACKAGE_DESCRIPTION_SUMMARY

Petr Bena benapetr at gmail.com
Fri Dec 19 05:35:24 EST 2014


This must be some bug, I was trying to fill in something in there by
hand and it's still empty, I will try to fill in a bug report

On Fri, Dec 19, 2014 at 11:30 AM, Petr Bena <benapetr at gmail.com> wrote:
> I am using this to build debian package and as
> http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#control_file_.28aka_DEBIAN.2Fcontrol.29_for_binary_package
> say, I need to fill
>
> CPACK_PACKAGE_DESCRIPTION_SUMMARY
>
> Doing what you suggested, produces a debian package with empty summary.
>
> On Fri, Dec 19, 2014 at 11:28 AM, Eric Noulard <eric.noulard at gmail.com> wrote:
>>
>>
>> 2014-12-19 11:25 GMT+01:00 Eric Noulard <eric.noulard at gmail.com>:
>>>
>>>
>>>
>>> 2014-12-19 11:22 GMT+01:00 Petr Bena <benapetr at gmail.com>:
>>>>
>>>> There is this variable that cpack uses for description of package.
>>>> This description has many lines and uses special symbols, like quotes.
>>>>
>>>> Putting it into a variable is extremely complex, so I would prefer to
>>>> load it from external resource. I did this:
>>>>
>>>> FILE(READ "${CMAKE_CURRENT_SOURCE_DIR}/build/summary"
>>>> CPACK_PACKAGE_DESCRIPTION)
>>>>
>>>> following http://www.cmake.org/cmake/help/v3.0/command/file.html
>>>>
>>>> the only thing that happened was that this variable expanded in
>>>> CPackConfig.cmake to a long unescaped text, that caused a syntax error
>>>> in that cmake file.
>>>>
>>>> What is a correct way to do that?
>>>
>>>
>>> You can use CPACK_PACKAGE_DESCRIPTION_FILE instead of
>>> CPACK_PACKAGE_DESCRIPTION
>>> i.e.
>>>
>>> set(CPACK_PACKAGE_DESCRIPTION_FILE
>>> "${CMAKE_CURRENT_SOURCE_DIR}/build/summary)
>>
>>
>> see documentations of CPACK_XXX vars:
>>
>> http://www.cmake.org/cmake/help/v3.0/module/CPack.html?highlight=cpack_package_description#variable:CPACK_PACKAGE_DESCRIPTION_FILE
>>
>> --
>> Eric
>> L'élection n'est pas la démocratie -- http://www.le-message.org
>>
>> --
>>
>> Powered by www.kitware.com
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Kitware offers various services to support the CMake community. For more
>> information on each offering, please visit:
>>
>> CMake Support: http://cmake.org/cmake/help/support.html
>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/cmake


More information about the CMake mailing list