Mingw 64-bit uses libgcc_s_seh-1 instead of libgcc_s_dw2-1.

This commit is contained in:
John Ralls committed 2026-01-09 16:20:31 -08:00
1 parent b5185e1823
commit 4bd23cf195
1 file changed
+6 -2
+6 -2
View File
@@ -1062,9 +1062,13 @@ if (WIN32)
if (NOT LIBSTDC++)
message(FATAL_ERROR "libstdc++ not found.")
endif()
find_file(LIBDW2 libgcc_s_dw2-1.dll)
if ($ENV{MSYSTEM} STREQUAL "MINGW32")
find_file(LIBDW2 libgcc_s_dw2-1.dll)
else()
find_file(LIBDW2 libgcc_s_seh-1.dll)
endif()
if (NOT LIBDW2)
message(FATAL_ERROR "libgcc_s_dw2-l not found.")
message(FATAL_ERROR "GCC exception library not found.")
endif()
set(MINGW_DLLS ${LIBSTDC++} ${LIBDW2})
install(PROGRAMS ${MINGW_DLLS} DESTINATION ${CMAKE_INSTALL_BINDIR})