gl/build: also check for the GL/gl.h header

In order to successfully build against a detected libGL library we also need headers
This commit is contained in:
Matthew Waters 2017-08-23 16:23:07 +10:00
parent d8bc42fb30
commit a03f5f5de1

View file

@ -272,6 +272,10 @@ if need_api_opengl != 'no' or need_platform_glx != 'no'
gl_dep = cc.find_library('GL', required : false)
endif
if not cc.has_header('GL/gl.h', required : false)
gl_dep = unneeded_dep
endif
if not gl_dep.found() and need_api_opengl == 'yes'
error ('Could not find requested OpenGL library')
endif