[CMake] User-overriding IMPORTED targets (overlaying libraries, ...)

Ivan Shapovalov intelfx at intelfx.name
Wed Sep 7 13:41:11 EDT 2016


On 2016-09-01 at 18:57 +0200, Stephen Kelly wrote:
> Ivan Shapovalov wrote:
> 
> > 
> > Of course, I can always edit the FooConfig.cmake file manually, but
> > I'd
> > better avoid patching anything (installing new files or running any
> > cmake commands is OK).
> > 
> > Is there any nice way to solve this?
> 
> After 
> 
>  find_package(Foo CONFIG)
> 
> do
> 
>  set_property(TARGET Foo::Foo PROPERTY LOCATION "foo_overlay.so")
> 
> Apply whatever platform-specific conditions, suffix and prefix are 
> appropriate.

Yes, I thought of this, but I'd better avoid patching either project's
buildsystem. Is it possible to do this entirely by installing new files
or passing arguments in cmake command line?

Thanks,
-- 
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/20160907/426b598c/attachment.sig>


More information about the CMake mailing list