cmake: older emscripten releases have a broken FindOpenGL.cmake

This is fixed since 3.1.10: https://github.com/emscripten-core/emscripten/commit/485a7b4d6f84d4bc3b594ff81d39b6b143c8d598#diff-034f4d123f23ec5493d0fbf28cba1c36e404a991f286c8d031a22799e4e8b0e5
This commit is contained in:
Anonymous Maarten
2022-11-01 13:40:19 +01:00
committed by Anonymous Maarten
parent d8884b845e
commit a22fcf77fd
+3
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})