LINK_INTERFACE_LIBRARIES_<CONFIG>ΒΆ
Per-configuration list of public interface libraries for a target.
This is the configuration-specific version of
LINK_INTERFACE_LIBRARIES
. If set, this property completely
overrides the generic property for the named configuration.
This property is overridden by the INTERFACE_LINK_LIBRARIES
property if policy CMP0022
is NEW
.
This property is deprecated. Use INTERFACE_LINK_LIBRARIES
instead.
Note that it is not advisable to populate the
LINK_INTERFACE_LIBRARIES_<CONFIG>
of a target with paths for dependencies.
That would hard-code into installed packages the include directory paths
for dependencies as found on the machine the package was made on.
That is, code like this is incorrect for targets which will be used to
generate cmake-packages(7)
:
target_link_libraries(mylib INTERFACE
${Boost_LIBRARIES};${OtherDep_LIBRARIES}
)
Dependencies must provide their own IMPORTED targets
which have their own IMPORTED_LOCATION
populated
appropriately. That way, when a consumer uses the installed package, the
consumer will run the appropriate find_package()
command to find
the dependencies on their own machine and populate the
IMPORTED targets with appropriate paths. See
Creating Packages for more. Note that many modules currently shipped
with CMake do not currently provide IMPORTED targets.