summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Windows.cmake
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 /Modules/Platform/Windows.cmake
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 'Modules/Platform/Windows.cmake')
-rw-r--r--Modules/Platform/Windows.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/Platform/Windows.cmake b/Modules/Platform/Windows.cmake
index 1bf39cf..bc93caa 100644
--- a/Modules/Platform/Windows.cmake
+++ b/Modules/Platform/Windows.cmake
@@ -14,7 +14,10 @@ set(CMAKE_DL_LIBS "")
set(CMAKE_EXTRA_LINK_EXTENSIONS ".targets")
set(CMAKE_FIND_LIBRARY_PREFIXES "")
-set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
+set(CMAKE_FIND_LIBRARY_SUFFIXES
+ ".dll.lib" # import library from Rust toolchain for MSVC ABI
+ ".lib" # static or import library from MSVC tooling
+ )
# for borland make long command lines are redirected to a file
# with the following syntax, see Windows-bcc32.cmake for use