summaryrefslogtreecommitdiffstats
path: root/Help/command/link_directories.rst
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2018-09-19 12:12:35 (GMT)
committerCraig Scott <craig.scott@crascit.com>2018-09-25 13:59:59 (GMT)
commitf9717725f9d4c7f4a1da52b0184365cd757bc076 (patch)
treeee805f2e0fbd53cc0b2b72728e08496f0df57372 /Help/command/link_directories.rst
parentb5915744ebccd086891f1fab0ae91af54deb3a86 (diff)
downloadCMake-f9717725f9d4c7f4a1da52b0184365cd757bc076.zip
CMake-f9717725f9d4c7f4a1da52b0184365cd757bc076.tar.gz
CMake-f9717725f9d4c7f4a1da52b0184365cd757bc076.tar.bz2
link_directories(): enhance capabilities
Diffstat (limited to 'Help/command/link_directories.rst')
-rw-r--r--Help/command/link_directories.rst8
1 files changed, 7 insertions, 1 deletions
diff --git a/Help/command/link_directories.rst b/Help/command/link_directories.rst
index 3efa8e5..1dce9a0 100644
--- a/Help/command/link_directories.rst
+++ b/Help/command/link_directories.rst
@@ -5,7 +5,7 @@ Add directories in which the linker will look for libraries.
::
- link_directories(directory1 [directory2 ...])
+ link_directories([AFTER|BEFORE] directory1 [directory2 ...])
Add the paths in which the linker should search for libraries.
Relative paths given to this command are interpreted as relative to
@@ -16,6 +16,12 @@ property for the current ``CMakeLists.txt`` file, converting relative
paths to absolute as needed.
The command will apply only to targets created after it is called.
+By default the directories specified are appended onto the current list of
+directories. This default behavior can be changed by setting
+:variable:`CMAKE_LINK_DIRECTORIES_BEFORE` to ``ON``. By using
+``AFTER`` or ``BEFORE`` explicitly, you can select between appending and
+prepending, independent of the default.
+
Arguments to ``link_directories`` may use "generator expressions" with
the syntax "$<...>". See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. See the :manual:`cmake-buildsystem(7)`