[CMake] RPM packaging dependencies expressed in subdirectories

Thibault Hild thibault.hild at gmail.com
Wed Jul 16 10:37:44 EDT 2014


Thanks Nils for the hint.

I guess you had to use Cmake constructs like:
if("new dep" MATCHES "a regex built with ${pack_deps}")
in order to decide whether a new dependency is allowed.

As I am quite new to CMake functions, can you detail a bit how do you
operate such validation ?
Is there some sort of function repository to share these custom CMake
function tools ?

Thibault


On Wed, Jul 16, 2014 at 3:39 PM, Nils Gladitz <nilsgladitz at gmail.com> wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140716/5fe4792d/attachment.html>


More information about the CMake mailing list