summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/release/dev/detect-lib_foo.a-msvc.rst7
-rw-r--r--Modules/Platform/Windows.cmake4
2 files changed, 9 insertions, 2 deletions
diff --git a/Help/release/dev/detect-lib_foo.a-msvc.rst b/Help/release/dev/detect-lib_foo.a-msvc.rst
new file mode 100644
index 0000000..4080a5b
--- /dev/null
+++ b/Help/release/dev/detect-lib_foo.a-msvc.rst
@@ -0,0 +1,7 @@
+detect-lib_foo.a-msvc
+---------------------
+
+* On Windows, when targeting the MSVC ABI, the :command:`find_library` command
+ now accepts ``.a`` file names after first considering ``.lib``. This is
+ symmetric with existing behavior when targeting the GNU ABI, in which the
+ command accepts ``.lib`` file names after first considering ``.a``.
diff --git a/Modules/Platform/Windows.cmake b/Modules/Platform/Windows.cmake
index d8b3957..5263161 100644
--- a/Modules/Platform/Windows.cmake
+++ b/Modules/Platform/Windows.cmake
@@ -19,8 +19,8 @@ set(CMAKE_LINK_LIBRARY_SUFFIX ".lib")
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_PREFIXES "" "lib")
+set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".a")
# for borland make long command lines are redirected to a file
# with the following syntax, see Windows-bcc32.cmake for use