sdl2-compat: cmake: fix building with latest CMake policies

From cec43be62ad26960483a25bbb3484df0a34f3523 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Mon, 27 Oct 2025 17:08:55 +0100
Subject: [PATCH] cmake: fix building with latest CMake policies

Explicitly disable runtime checks of shared library
---
 CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 62fb438..04702a4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,7 +2,7 @@
 #        you can define SDL3_INCLUDE_DIRS on the cmdline.  For example:
 #        cmake -DSDL3_INCLUDE_DIRS=/opt/SDL3/include [other stuff ....]
 
-cmake_minimum_required(VERSION 3.0...3.28)
+cmake_minimum_required(VERSION 3.0...4.1)
 project(sdl2_compat VERSION 2.32.57 LANGUAGES C)
 
 if(POLICY CMP0074)
@@ -398,6 +398,7 @@ if(MSVC)
     set_property(TARGET SDL2 APPEND_STRING PROPERTY LINK_FLAGS " /NODEFAULTLIB")
   endif()
   # Make sure /RTC1 is disabled: (from SDL2 CMake)
+  set_property(TARGET SDL2  PROPERTY MSVC_RUNTIME_CHECKS "")
   foreach(flag_var
     CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
     CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)