SDL: testshader: add -sLEGACY_GL_EMULATION for emscripten

From 46bafda7ab4763c8ef083d78001ae020e655a166 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Sat, 17 Aug 2024 16:52:30 +0200
Subject: [PATCH] testshader: add -sLEGACY_GL_EMULATION for emscripten

---
 test/CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index c325e91ae4dc8..12314f5c781bf 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -406,6 +406,9 @@ add_sdl_test_executable(testscale NEEDS_RESOURCES TESTUTILS SOURCES testscale.c)
 add_sdl_test_executable(testsem NONINTERACTIVE NONINTERACTIVE_ARGS 10 NONINTERACTIVE_TIMEOUT 30 SOURCES testsem.c)
 add_sdl_test_executable(testsensor SOURCES testsensor.c)
 add_sdl_test_executable(testshader NEEDS_RESOURCES TESTUTILS SOURCES testshader.c)
+if(EMSCRIPTEN)
+    target_link_options(testshader PRIVATE "-sLEGACY_GL_EMULATION")
+endif()
 add_sdl_test_executable(testshape NEEDS_RESOURCES SOURCES testshape.c ${glass_bmp_header})
 add_sdl_test_executable(testsprite MAIN_CALLBACKS NEEDS_RESOURCES TESTUTILS SOURCES testsprite.c)
 add_sdl_test_executable(testspriteminimal SOURCES testspriteminimal.c ${icon_bmp_header})