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
This commit is contained in:
David G Yu 2023-06-22 11:48:00 -07:00
parent afaee86641
commit 05abd4e826

View File

@ -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()