This establishes that linking is used to propagate usage-requirements
between targets in CMake code. The use of the target_link_libraries
command as the API for this is chosen because introducing a new command
would introduce confusion due to multiple commands which differ only in
a subtle way.
This is both a short form of using a TARGET_DEFINED expression
together with a TARGET_PROPERTY definition, and a way to strip
non-target content from interface properties when exporting.
Projects set interface requirements upstream, and existing
downstreams use of target_link_libraries will consume those interfaces.
This can create a backward compatibility concern as the result may
be changing the order of include directories of downstreams, or another
side-effect of using the INTERFACE properties.
Provide a way for them to emulate the behavior of a version-based
policy in the config file.
7bf490e Make subclasses responsible for joining content.
f6b16d4 Don't allow targets args in the new target commands.
b3a7e19 Make the Property name protected so that subclasses can use it.
We need to make sure we can export targets which have content such
as $<0:$<TARGET_PROPERTY:not_a_target,INTERFACE_INCLUDE_DIRECTORIES>
That means making not finding a target non-fatal here.
Before this, when creating GTK2_LIBRARIES, FindGTK2 added the GTK
dependencies in wrong order into GTK2_LIBRARIES. With dynamic libraries
this is not a major problem, but when linking to static gtk libraries,
the linker outputs a lot of undefined symbols. Reorder the calls that
append libraries to GTK2_LIBRARIES to respect dependency order.
Explain in the documentation for the legacy signature
target_link_libraries(foo bar)
that the other signatures like
target_link_libraries(foo LINK_INTERFACE_LIBRARIES ...)
target_link_libraries(foo LINK_PRIVATE ...)
will set the LINK_INTERFACE_LIBRARIES target property and therefore make
libraries specified only by the legacy signature private.
The configure_package_config()_file() macro will now use
absolute paths for the PATH_VARS if the Config.cmake file
will be installed into /lib(64) or /usr/lib(64), since due to
the usr-move filesystem changes Config.cmake files installed
there may be found via two paths (once per symlink via
/lib(64) and once via /usr/lib ), and in this case
relative paths break.
Alex
These interface-related link-libraries properties are used to determine
the value of the other INTERFACE properties, so we were getting infinite
recursion and segfaults otherwise.