65fa4c
Index: cmake-3.17.0-rc1/Modules/Platform/Windows-GNU.cmake
65fa4c
===================================================================
65fa4c
--- cmake-3.17.0-rc1.orig/Modules/Platform/Windows-GNU.cmake
65fa4c
+++ cmake-3.17.0-rc1/Modules/Platform/Windows-GNU.cmake
65fa4c
@@ -25,12 +25,14 @@ endif()
65fa4c
 
65fa4c
 if(MINGW)
65fa4c
   set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")
65fa4c
-  set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a" ".lib")
65fa4c
+  set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll" ".dll.a" ".a" ".lib")
65fa4c
   set(CMAKE_C_STANDARD_LIBRARIES_INIT "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32")
65fa4c
   set(CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
65fa4c
+  set(CMAKE_DL_LIBS "dl")
65fa4c
+else()
65fa4c
+  set(CMAKE_DL_LIBS "")
65fa4c
 endif()
65fa4c
 
65fa4c
-set(CMAKE_DL_LIBS "")
65fa4c
 set(CMAKE_LIBRARY_PATH_FLAG "-L")
65fa4c
 set(CMAKE_LINK_LIBRARY_FLAG "-l")
65fa4c
 set(CMAKE_LINK_DEF_FILE_FLAG "") # Empty string: passing the file is enough