blob: e86f63963e68df297466af9c2f7e6a94f094f1f9 [file] [log] [blame]
Ryan Prichardf6283ab2022-01-13 17:30:19 -08001CMAKE_LINK_SEARCH_END_STATIC
2----------------------------
3
4.. versionadded:: 3.4
5
6End a link line such that static system libraries are used.
7
8Some linkers support switches such as ``-Bstatic`` and ``-Bdynamic`` to
9determine whether to use static or shared libraries for ``-lXXX`` options.
10CMake uses these options to set the link type for libraries whose full
11paths are not known or (in some cases) are in implicit link
12directories for the platform. By default CMake adds an option at the
13end of the library list (if necessary) to set the linker search type
14back to its starting type. This property switches the final linker
15search type to ``-Bstatic`` regardless of how it started.
16
17This variable is used to initialize the target property
18:prop_tgt:`LINK_SEARCH_END_STATIC` for all targets. If set, its
19value is also used by the :command:`try_compile` command.
20
21See also :variable:`CMAKE_LINK_SEARCH_START_STATIC`.