[CMake] RPM packaging dependencies expressed in subdirectories
Nils Gladitz
nilsgladitz at gmail.com
Wed Jul 16 09:39:17 EDT 2014
On 16.07.2014 15:08, Thibault Hild wrote:
> Hello,
>
> I'm quite new to CMake and after experimenting a bit, I am currently
> considering a way to express RPM dependencies in subdirectories
> instead of specifying them at the top level.
> After googling a bit, I did not find something that fulfills my
> expectations but I have probably missed a post or something in the
> CPack documentation. If you already know of a discussion thread or
> explanation on this particular subject, can you please redirect me to it ?
>
For DEB I used custom function()s to maintain a custom GLOBAL property
(set_property(), get_property()).
The custom function I used to append dependencies to the property would
check if the dependency already exists.
If it existed with the same version requirement it would be ignored; if
the version differed I threw an error.
Somewhere at the end of my root CMakeLists.txt (but before
include(CPack)) I added a call to my second custom function which would
set the appropriate CPACK_ variable (with PARENT_SCOPE) based on the
content of the GLOBAL property.
Nils
More information about the CMake
mailing list