summaryrefslogtreecommitdiffstats
path: root/Help
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
parentb5915744ebccd086891f1fab0ae91af54deb3a86 (diff)
downloadCMake-f9717725f9d4c7f4a1da52b0184365cd757bc076.zip
CMake-f9717725f9d4c7f4a1da52b0184365cd757bc076.tar.gz
CMake-f9717725f9d4c7f4a1da52b0184365cd757bc076.tar.bz2
link_directories(): enhance capabilities
Diffstat (limited to 'Help')
-rw-r--r--Help/command/link_directories.rst8
-rw-r--r--Help/manual/cmake-variables.7.rst1
-rw-r--r--Help/release/dev/link_directories-enhancements.rst5
-rw-r--r--Help/variable/CMAKE_LINK_DIRECTORIES_BEFORE.rst9
4 files changed, 22 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)`
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 6071999..78353fb 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -179,6 +179,7 @@ Variables that Change Behavior
/variable/CMAKE_INSTALL_PREFIX
/variable/CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
/variable/CMAKE_LIBRARY_PATH
+ /variable/CMAKE_LINK_DIRECTORIES_BEFORE
/variable/CMAKE_MFC_FLAG
/variable/CMAKE_MODULE_PATH
/variable/CMAKE_NOT_USING_CONFIG_FLAGS
diff --git a/Help/release/dev/link_directories-enhancements.rst b/Help/release/dev/link_directories-enhancements.rst
new file mode 100644
index 0000000..2521fa1
--- /dev/null
+++ b/Help/release/dev/link_directories-enhancements.rst
@@ -0,0 +1,5 @@
+link_directories-enhancements
+-----------------------------
+
+* :command:`link_directories` command gains capability to control directories
+ insertion position.
diff --git a/Help/variable/CMAKE_LINK_DIRECTORIES_BEFORE.rst b/Help/variable/CMAKE_LINK_DIRECTORIES_BEFORE.rst
new file mode 100644
index 0000000..026ca35
--- /dev/null
+++ b/Help/variable/CMAKE_LINK_DIRECTORIES_BEFORE.rst
@@ -0,0 +1,9 @@
+CMAKE_LINK_DIRECTORIES_BEFORE
+-----------------------------
+
+Whether to append or prepend directories by default in
+:command:`link_directories`.
+
+This variable affects the default behavior of the :command:`link_directories`
+command. Setting this variable to ``ON`` is equivalent to using the ``BEFORE``
+option in all uses of that command.