Skip to content

Commit

Permalink
Prefer using pkg-config files to find GLES
Browse files Browse the repository at this point in the history
Just like we do for GL and EGL, we can use pkg-config to find the GLES
v2 and v1 dependencies.

Fixes: #110
  • Loading branch information
ebassi committed Mar 9, 2017
1 parent 4719e58 commit f7d3671
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,19 @@ egl_dep = dependency('egl', required: false)

# Optional dependencies for tests
x11_dep = dependency('x11', required: false)
gles1_dep = cc.find_library('libGLESv1_CM', required: false)
gles2_dep = cc.find_library('libGLESv2', required: false)

# GLES v2 and v1 may have pkg-config files, courtesy of downstream
# packagers; let's check those first, and fall back to find_library()
# if we fail
gles2_dep = dependency('glesv2', required: false)
if not gles2_dep.found()
gles2_dep = cc.find_library('libGLESv2', required: false)
endif

gles1_dep = dependency('glesv1_cm', required: false)
if not gles1_dep.found()
gles1_dep = cc.find_library('libGLESv1_CM', required: false)
endif

# On windows, the DLL has to have all of its functions
# resolved at link time, so we have to link directly aginst
Expand Down

0 comments on commit f7d3671

Please sign in to comment.