target_link_libraries: Allow use with targets in other directories

Previously the command did not allow naming targets on the LHS that
were not created in the calling directory.  Lift this restriction to
enable more flexible use by projects.

Fixes: #17943
This commit is contained in:
Patrick Stotko
2018-05-11 18:06:53 +02:00
committed by Brad King
parent 743f24bac6
commit c9349cc1b9
19 changed files with 110 additions and 10 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ All of them have the general form::
target_link_libraries(<target> ... <item>... ...)
The named ``<target>`` must have been created in the current directory by
The named ``<target>`` must have been created by
a command such as :command:`add_executable` or :command:`add_library` and
must not be an :ref:`ALIAS target <Alias Targets>`.
Repeated calls for the same ``<target>`` append items in the order called.
@@ -0,0 +1,5 @@
subdirectory-linking
--------------------
* The :command:`target_link_libraries` command may now be called
to modify targets created outside the current directory.