From a0f17fbe9cc8c8d30d8c1a4df50c4af5fc4e63d1 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 18 Feb 2015 09:37:14 -0500 Subject: Windows-GNU: Do not tell find_library to treat '.dll' as linkable Modern software distributions always use a separate ".dll.a" or ".lib" import library for linking. --- Help/release/dev/mingw-no-find_library-dll.rst | 8 ++++++++ Modules/Platform/Windows-GNU.cmake | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 Help/release/dev/mingw-no-find_library-dll.rst diff --git a/Help/release/dev/mingw-no-find_library-dll.rst b/Help/release/dev/mingw-no-find_library-dll.rst new file mode 100644 index 0000000..1b0c19b --- /dev/null +++ b/Help/release/dev/mingw-no-find_library-dll.rst @@ -0,0 +1,8 @@ +mingw-no-find_library-dll +------------------------- + +* When building with GNU tools on Windows (MinGW tools), the + :command:`find_library` command will no longer consider + ``.dll`` files to be linkable libraries. All dynamic link + libraries are expected to provide separate ``.dll.a`` or + ``.lib`` import libraries. diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake index ffc5657..a7653cf 100644 --- a/Modules/Platform/Windows-GNU.cmake +++ b/Modules/Platform/Windows-GNU.cmake @@ -35,7 +35,7 @@ endif() if(MINGW) set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "") - set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll" ".dll.a" ".a" ".lib") + set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a" ".lib") set(CMAKE_C_STANDARD_LIBRARIES_INIT "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32") set(CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}") endif() -- cgit v0.12