diff -Naur doxygen-1.15.0.orig/CMakeLists.txt doxygen-1.15.0/CMakeLists.txt
--- doxygen-1.15.0.orig/CMakeLists.txt	2025-10-20 17:42:03.000000000 +0300
+++ doxygen-1.15.0/CMakeLists.txt	2025-10-31 21:54:00.102685000 +0300
@@ -282,7 +282,7 @@
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${EXECUTABLE_OUTPUT_PATH})
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${EXECUTABLE_OUTPUT_PATH})
 
-if (win_static)
+if (win_static AND MSVC)
     set(CompilerFlags
         CMAKE_CXX_FLAGS
         CMAKE_CXX_FLAGS_DEBUG
diff -Naur doxygen-1.15.0.orig/addon/doxysearch/CMakeLists.txt doxygen-1.15.0/addon/doxysearch/CMakeLists.txt
--- doxygen-1.15.0.orig/addon/doxysearch/CMakeLists.txt	2025-05-31 21:52:09.000000000 +0300
+++ doxygen-1.15.0/addon/doxysearch/CMakeLists.txt	2025-10-31 21:53:04.624984600 +0300
@@ -1,7 +1,7 @@
 find_package(xapian REQUIRED)
 find_package(ZLIB REQUIRED)
 
-if (WIN32)
+if (WIN32 AND NOT(MINGW))
   set(WIN_EXTRA_LIBS uuid rpcrt4 ws2_32)
 endif()
 
