[CMake] Editing IMPORTED targets

Ivan Shapovalov intelfx at intelfx.name
Sun Oct 16 08:37:56 EDT 2016


On 2016-10-03 at 14:43 +0200, Stephen Kelly wrote:
> Ivan Shapovalov wrote:
> 
> > Hello!
> > 
> > Using find modules to detect dependencies has a nice feature: it is
> > then possible to edit the resulting cache entries to link to
> > different
> > libraries (or add other libraries along the found ones, for
> > whatever
> > purposes), or change directories, or flags, or whatever.
> > 
> > Using find configs and IMPORTED targets, however, prevents doing
> > this,
> > because IMPORTED targets are not stored in CMake cache. This can be
> > a
> > significant disadvantage at times.
> 
> Can you be more specific?
> 
> Why can the user provide better information than the supplier of the 
> IMPORTED target?
> 
> Thanks,
> 
> Steve.
> 
> 

Well, sometimes you need to do certain "maintainer-specific" overrides:
include custom headers before everything, link to custom libraries
before everything and so on. Think LD_PRELOAD, but at link time.

-- 
Ivan Shapovalov / intelfx /
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://public.kitware.com/pipermail/cmake/attachments/20161016/bce17d99/attachment.sig>


More information about the CMake mailing list