SDL_image: cmake install cmake configuration files on non-MinGW-Windows to cmake/SDL2_image

From 8c12e4e4f124c636bc9ffe9fc8d3d0b42f0de93e Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Mon, 30 May 2022 16:42:09 +0200
Subject: [PATCH] cmake install cmake configuration files on non-MinGW-Windows
 to cmake/SDL2_image

---
 CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2ed3dd4e..2a89a736 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -664,8 +664,8 @@ if(SDL2IMAGE_INSTALL)
 
     if(APPLE)
         set(PKG_PREFIX "SDL2_image.framework/Resources")
-    elseif(WIN32)
-        set(PKG_PREFIX "cmake/SDL2_image")
+    elseif(WIN32 AND NOT MINGW)
+        set(PKG_PREFIX "cmake")
     else()
         set(PKG_PREFIX "${CMAKE_INSTALL_LIBDIR}/cmake/SDL2_image")
     endif()