--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -438,9 +438,9 @@
   set (Unwind_DEPENDENCY "find_dependency (Unwind ${Unwind_VERSION})")
 endif (Unwind_FOUND)
 
-if (HAVE_DBGHELP)
+if (HAVE_DBGHELP OR MINGW)
   target_link_libraries (ng-log PRIVATE dbghelp)
   set (ng-log_libraries_options_for_static_linking "${ng-log_libraries_options_for_static_linking} -ldbghelp")
-endif (HAVE_DBGHELP)
+endif (HAVE_DBGHELP OR MINGW)
 
 target_link_libraries (ng-log PRIVATE Threads::Threads)
 
