summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorDaniel Ching <carterbox@users.noreply.github.com>2023-12-07 04:47:47 (GMT)
committerDaniel Ching <carterbox@users.noreply.github.com>2023-12-08 01:19:00 (GMT)
commitf20c5c6f20aa7eab9e43919fffbf5b00281d1461 (patch)
tree33857e147a1cd011f444912010879c53d28dbe91 /Help
parent7598ea5389e04862c567b43d7c08fbbc66512f37 (diff)
downloadCMake-f20c5c6f20aa7eab9e43919fffbf5b00281d1461.zip
CMake-f20c5c6f20aa7eab9e43919fffbf5b00281d1461.tar.gz
CMake-f20c5c6f20aa7eab9e43919fffbf5b00281d1461.tar.bz2
MSVC: Teach find_library to consider Rust's '${name}.dll.lib' convention
This convention is used by Rust toolchains (rustc/cargo/cargo-c) for the MSVC ABI. Fixes: #25478
Diffstat (limited to 'Help')
-rw-r--r--Help/release/dev/find-rustc-importlibs.rst6
-rw-r--r--Help/variable/CMAKE_FIND_LIBRARY_SUFFIXES.rst10
2 files changed, 11 insertions, 5 deletions
diff --git a/Help/release/dev/find-rustc-importlibs.rst b/Help/release/dev/find-rustc-importlibs.rst
new file mode 100644
index 0000000..646afff
--- /dev/null
+++ b/Help/release/dev/find-rustc-importlibs.rst
@@ -0,0 +1,6 @@
+find-rustc-importlibs
+---------------------
+
+* On Windows, when targeting the MSVC ABI, the :command:`find_library` command
+ now considers ``.dll.lib`` file names before ``.lib``. This is the default
+ suffix for DLL import libraries created by Rust toolchains for the MSVC ABI.
diff --git a/Help/variable/CMAKE_FIND_LIBRARY_SUFFIXES.rst b/Help/variable/CMAKE_FIND_LIBRARY_SUFFIXES.rst
index c2c2609..d78dd15 100644
--- a/Help/variable/CMAKE_FIND_LIBRARY_SUFFIXES.rst
+++ b/Help/variable/CMAKE_FIND_LIBRARY_SUFFIXES.rst
@@ -5,8 +5,8 @@ Suffixes to append when looking for libraries.
This specifies what suffixes to add to library names when the
:command:`find_library` command looks for libraries. On Windows systems this
-is typically ``.lib`` and, depending on the compiler, ``.dll.a``, ``.a``
-(e.g. GCC and Clang), so when it tries to find the ``foo`` library, it will
-look for ``[<prefix>]foo.lib`` and/or ``[<prefix>]foo[.dll].a``, depending on
-the compiler used and the ``<prefix>`` specified in the
-:variable:`CMAKE_FIND_LIBRARY_PREFIXES`.
+is typically ``.lib`` and, depending on the compiler, ``.dll.lib``, ``.dll.a``,
+``.a`` (e.g. rustc, GCC, or Clang), so when it tries to find the ``foo``
+library, it will look for ``[<prefix>]foo[.dll].lib`` and/or
+``[<prefix>]foo[.dll].a``, depending on the compiler used and the ``<prefix>``
+specified in the :variable:`CMAKE_FIND_LIBRARY_PREFIXES`.