From aff44f560905bc14cb901beadd7bc854bfb18c97 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 2 Apr 2023 22:57:37 -0400
Subject: [PATCH] Fix opengl lib linking on windows

---
 indra/cmake/OpenGL.cmake      | 7 +++++++
 indra/llrender/CMakeLists.txt | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/indra/cmake/OpenGL.cmake b/indra/cmake/OpenGL.cmake
index bf7cd8366a9..5da923eb926 100644
--- a/indra/cmake/OpenGL.cmake
+++ b/indra/cmake/OpenGL.cmake
@@ -4,3 +4,10 @@ include(Variables)
 include(Prebuilt)
 include(FindOpenGL)
 
+add_library( ll::opengl INTERFACE IMPORTED )
+
+if(TARGET OpenGL::OpenGL)
+	target_link_libraries( ll::opengl INTERFACE OpenGL::OpenGL)
+elseif(TARGET OpenGL::GL)
+	target_link_libraries( ll::opengl INTERFACE OpenGL::GL)
+endif()
\ No newline at end of file
diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt
index 92f50e9ac83..3e068301273 100644
--- a/indra/llrender/CMakeLists.txt
+++ b/indra/llrender/CMakeLists.txt
@@ -96,6 +96,6 @@ target_link_libraries(llrender
         llxml
         llwindow
         ll::freetype
-        OpenGL::OpenGL
+        ll::opengl
         )
 
-- 
GitLab