From 210713a6005600f30146bdca1d888d4588e538c9 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 31 Oct 2021 19:11:09 -0500 Subject: [PATCH] cmake: Work around bug in opengl32.lib detection on MSVC ARM64 --- test/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0531568d1..0dfb69d87 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -18,7 +18,10 @@ if(WINDOWS) add_definitions(-Dmain=SDL_main) endif() -find_package(OpenGL) +# CMake incorrectly detects opengl32.lib being present on MSVC ARM64 +if(NOT MSVC OR NOT CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64") + find_package(OpenGL) +endif() if (OPENGL_FOUND) add_definitions(-DHAVE_OPENGL)