[cmake-developers] [Patch] FindPkgConfig: optionally create imported target for the found libraries

Rolf Eike Beer eike at sf-mail.de
Fri May 13 13:51:37 EDT 2016


Am Freitag, 13. Mai 2016, 13:38:52 schrieb Brad King:
> On 05/13/2016 12:21 PM, Rolf Eike Beer wrote:
> >> Can you just use
> >> 
> >>   set_property(TARGET PkgConfig::${_prefix} PROPERTY ...)
> >> 
> >> in each `if()` block?
> > 
> > I had this before, but I thought I avoid multiple target lookups. You
> > should only ever see that message if none of the branches is taken I
> > think. And that should never happen, or the if before is wrong. Can you
> > add a message() and show what is actually in _props there?
> 
> The problem is that _libs has more than one value, so set_target_properties
> ends up with
> 
>   PROPERTIES PROP1 v1 PROP2 v2a v2b PROP3 v3
>                             ^^^^^^^
> 
> Please use set_property(TARGET).  It is much more robust, and this is not
> exactly a performance-critical loop.

Hopefully all better now.

Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160513/f4c9249e/attachment.sig>


More information about the cmake-developers mailing list