SDL_image: cmake: Create SDL2_image-static.lib on MSVC+Windows and WatCOm+(OS2/Windows)

From 7df8bea268f851d516645782e528f18fc5454f32 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Mon, 30 May 2022 16:37:24 +0200
Subject: [PATCH] cmake: Create SDL2_image-static.lib on MSVC+Windows and
 WatCOm+(OS2/Windows)

---
 CMakeLists.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 896728cf..2ed3dd4e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -261,6 +261,12 @@ if(SDL2IMAGE_BUILD_SHARED_LIBS)
             OUTPUT_NAME "SDL2_image-${LT_RELEASE}"
         )
     endif()
+else()
+    if(MSVC OR (WATCOM AND (WIN32 OR OS2)))
+        set_target_properties(SDL2_image PROPERTIES
+            OUTPUT_NAME "SDL2_image-static"
+        )
+    endif()
 endif()
 
 # Use `Compatible Interface Properties` to ensure a shared SDL2_image is built with a shared SDL2