cmake: older emscripten releases have a broken FindOpenGL.cmake

This is fixed since 3.1.10: 485a7b4d6f (diff-034f4d123f23ec5493d0fbf28cba1c36e404a991f286c8d031a22799e4e8b0e5)
main
Anonymous Maarten 2022-11-01 13:40:19 +01:00 committed by Anonymous Maarten
parent d8884b845e
commit a22fcf77fd
1 changed files with 3 additions and 0 deletions

View File

@ -230,6 +230,9 @@ if(OPENGL_FOUND)
target_link_libraries(testshader OpenGL::GL)
target_link_libraries(testgl2 OpenGL::GL)
else()
if(EMSCRIPTEN AND OPENGL_gl_LIBRARY STREQUAL "nul")
set(OPENGL_gl_LIBRARY GL)
endif()
# emscripten's FindOpenGL.cmake does not create OpenGL::GL
target_link_libraries(testshader ${OPENGL_gl_LIBRARY})
target_link_libraries(testgl2 ${OPENGL_gl_LIBRARY})