SDL: cmake: gameinput.h is a c++-only header

From 0f2c04319f3192c215bef62c25adf7b41ea8f926 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Thu, 14 May 2026 17:37:14 +0200
Subject: [PATCH] cmake: gameinput.h is a c++-only header

---
 CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 851e11add9e85..cf8767121676f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,6 +50,7 @@ include(CheckIncludeFiles)
 include(CheckLanguage)
 include(CheckSymbolExists)
 include(CheckCSourceCompiles)
+include(CheckCXXSourceCompiles)
 include(CheckCSourceRuns)
 include(CheckCCompilerFlag)
 include(CheckCXXCompilerFlag)
@@ -2314,7 +2315,7 @@ elseif(WINDOWS)
     static __x_ABI_CWindows_CGaming_CInput_CIGamepadStatics2 *s2;
     int main(int argc, char **argv) { return 0; }" HAVE_WINDOWS_GAMING_INPUT_H
   )
-  check_c_source_compiles("
+  check_cxx_source_compiles("
     #include <stdbool.h>
     #define COBJMACROS
     #include <gameinput.h>