SDL: cmake: fix CMP0072 warning by prefering GLVND

From ad21c70408a6951bf3b3a85df3a26b83721d907e Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Wed, 15 Jun 2022 05:36:28 +0200
Subject: [PATCH] cmake: fix CMP0072 warning by prefering GLVND

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

diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 327393541b7..4cdb237b18e 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -44,6 +44,8 @@ endif()
 
 # CMake incorrectly detects opengl32.lib being present on MSVC ARM64
 if(NOT MSVC OR NOT CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64")
+    # Prefer GLVND, if present
+    set(OpenGL_GL_PREFERENCE GLVND)
     find_package(OpenGL)
 endif()