[CMake] INTERFACE_LINK_LIBRARIES/LINK_INTERFACE_LIBRARIES

Hendrik Greving hendrik.greving.smi at gmail.com
Fri Nov 9 17:41:20 EST 2018


In other words, when providing the EXPORT_LINK_INTERFACE_LIBRARIES flag for
exported targets (in main project that was changed to CMP0022 NEW), I was
expecting the IMPORTED_LINK_INTERFACE_LIBRARIES property set in the
<exported_target>.cmake file so that projects that import it (with CMP0022
OLD) can see it. Instead, I am only seeing the INTERFACE_LINK_LIBRARIES
property set.

On Fri, Nov 9, 2018 at 1:58 PM Hendrik Greving <
hendrik.greving.smi at gmail.com> wrote:

> If CMP0022 is set to new, since project is still using
> LINK_INTERFACE_LIBRARIES I have added EXPORT_LINK_INTERFACE_LIBRARIES to
> install(EXPORT) and export() calls. Looking at the generated exported cmake
> files, I only see the INTERFACE_LINK_LIBRARIES link property set. There are
> downstream projects that are using the previously mentioned project
> importing targets from it. These downstream projects still have CMP0022 set
> to OLD. Will this work? My understanding is that these downstream projects
> now don't see the linked libraries since they will ignore
> INTERFACE_LINK_LIBRARIES?
>
> Is it possible to achieve both, and have the main project generate the LINK_INTERFACE_LIBRARIES
> properties with CMP0022 set to NEW?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20181109/af6cad26/attachment.html>


More information about the CMake mailing list