diff options
Diffstat (limited to 'Help/command/link_directories.rst')
-rw-r--r-- | Help/command/link_directories.rst | 8 |
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)` |