mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 13:51:33 -06:00
In a case like
target_link_libraries(targetInOtherDir PUBLIC "$<1:a;b>")
then all entries in the list need to be looked up in the caller's
scope. Previously our `::@(directory-id)` suffix would apply only
to the last entry. Instead surround the entire entry by a pair
`::@(directory-id);...;::@` so that the `::@` syntax can encode
a directory lookup scope change evaluated as the list is processed.
Fixes: #20204
11 lines
640 B
Plaintext
11 lines
640 B
Plaintext
.. note::
|
|
A call to :command:`target_link_libraries(<target> ...)` may update this
|
|
property on ``<target>``. If ``<target>`` was not created in the same
|
|
directory as the call then :command:`target_link_libraries` will wrap each
|
|
entry with the form ``::@(directory-id);...;::@``, where the ``::@`` is
|
|
literal and the ``(directory-id)`` is unspecified.
|
|
This tells the generators that the named libraries must be looked up in
|
|
the scope of the caller rather than in the scope in which the
|
|
``<target>`` was created. Valid directory ids are stripped on export
|
|
by the :command:`install(EXPORT)` and :command:`export` commands.
|