diff --git a/CMakeLists.txt b/CMakeLists.txt index 818164b401..7ce07851e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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})