Discussion:
[CMake] INTERFACE_LINK_LIBRARIES/LINK_INTERFACE_LIBRARIES
Hendrik Greving
2018-11-09 21:58:13 UTC
Permalink
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?
Hendrik Greving
2018-11-09 22:41:20 UTC
Permalink
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 <
Post by Hendrik Greving
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?
Loading...