cmake/cmake-mingw-dl.patch
Björn Esser a299111fe1
cmake-3.23.0-rc2
Fixes rhbz#2052100
2022-02-23 17:52:30 +01:00

19 lines
951 B
Diff

Index: cmake-3.23.0-rc2/Modules/Platform/Windows-GNU.cmake
===================================================================
--- cmake-3.23.0-rc2.orig/Modules/Platform/Windows-GNU.cmake
+++ cmake-3.23.0-rc2/Modules/Platform/Windows-GNU.cmake
@@ -24,11 +24,11 @@ set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
set(CMAKE_EXTRA_LINK_EXTENSIONS ".lib") # MinGW can also link to a MS .lib
set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")
-set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a" ".lib")
+set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll" ".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}")
-set(CMAKE_DL_LIBS "")
+set(CMAKE_DL_LIBS "dl")
set(CMAKE_LIBRARY_PATH_FLAG "-L")
set(CMAKE_LINK_LIBRARY_FLAG "-l")
set(CMAKE_LINK_DEF_FILE_FLAG "") # Empty string: passing the file is enough