From 05abd4e826ab19fec006df326fa5e4be40b354e8 Mon Sep 17 00:00:00 2001 From: David G Yu Date: Thu, 22 Jun 2023 11:48:00 -0700 Subject: [PATCH] Updated build to use OpenGL import targets. This is a slight improvement and fixes link problems in some cases, though we expect to further improve handling of target depenedencies overall. Fixes #1277 --- CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ecc83de..13868342 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -490,17 +490,16 @@ if(GLEW_FOUND AND GLEW_INCLUDE_DIR) ${PROJECT_SOURCE_DIR}/glLoader) set(OPENGL_LOADER_LIBRARIES ${GLEW_LIBRARY} - ${OPENGL_gl_LIBRARY} + OpenGL::GL ${CMAKE_DL_LIBS}) elseif(OPENGL_FOUND) osd_detect_gl_version(${PROJECT_SOURCE_DIR}/glLoader/glApi.h) set(OPENGL_LOADER_INCLUDE_DIRS - ${OPENGL_INCLUDE_DIR} ${PROJECT_SOURCE_DIR}/glLoader) set(OPENGL_LOADER_LIBRARIES - ${OPENGL_gl_LIBRARY} + OpenGL::GL ${CMAKE_DL_LIBS}) endif()