[CMake] CPack and user .spec file

Piotr Sipika piotr.sipika at gmail.com
Tue Jun 20 08:53:45 EDT 2017


2017-06-20 8:43 GMT-04:00 Domen Vrankar <domen.vrankar at gmail.com>:
> Can this not be done from CMakeLists.txt by setting some additional CPACK_*
> variables depending on the build environment?

The custom bits could be done with CPACK_*, I think, but I haven't
spent too much time investigating those, since I'd like to see how far
I can get with my own spec file, first.

> Not certain what exactly you're doing here - while creating binary packages
> Source directive is not used (CPackRPM is always the build driver so the
> build phase of rpm is skipped and instead the CPackRPM prepared/built files
> are used directly). Are you trying to produce a binary or a source rpm?

Binary RPM

> If the answer is binary then you'll have to change your spec file. First
> generate a spec file template by setting
> CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE [1]
> and then change it to suit your needs.
>
> For examples you can look into CPack tests [2] (CUSTOM_BINARY_SPEC_FILE test
> is using a custom spec file).

Thank you for the links, will definitely read through to get a better
understanding.

Thank you!
Piotr


More information about the CMake mailing list