sdl2-compat: cmake: /WX is not understood by MS ARM assembler

From 63dc352f2b34147ff1e265a438043585d95ebc16 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Thu, 2 Jan 2025 22:15:24 +0100
Subject: [PATCH] cmake: /WX is not understood by MS ARM assembler

---
 cmake/sdlcompilers.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/sdlcompilers.cmake b/cmake/sdlcompilers.cmake
index 299a6a0..dd81e6e 100644
--- a/cmake/sdlcompilers.cmake
+++ b/cmake/sdlcompilers.cmake
@@ -101,7 +101,7 @@ function(SDL_AddCommonCompilerFlags TARGET)
     if(MSVC)
       check_c_compiler_flag(/WX HAVE_WX)
       if(HAVE_WX)
-        target_compile_options(${TARGET} PRIVATE "/WX")
+        target_compile_options(${TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:/WX>")
       endif()
     elseif(USE_GCC OR USE_CLANG OR USE_INTELCC OR USE_QNX)
       check_c_compiler_flag(-Werror HAVE_WERROR)