Skip to content

Commit

Permalink
Merge pull request #261 from arichardson/custom-prefix-build-fix
Browse files Browse the repository at this point in the history
Fix build if EGL/X11 headers are in a custom prefix
  • Loading branch information
ebassi authored Feb 17, 2022
2 parents 8db879f + 9bf4788 commit 1c51cfb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,11 @@ endif
dl_dep = cc.find_library('dl', required: false)
gl_dep = dependency('gl', required: false)
egl_dep = dependency('egl', required: false)
elg_headers_dep = egl_dep.partial_dependency(compile_args: true, includes: true)

# Optional dependencies for tests
x11_dep = dependency('x11', required: false)
x11_headers_dep = x11_dep.partial_dependency(compile_args: true, includes: true)

# GLES v2 and v1 may have pkg-config files, courtesy of downstream
# packagers; let's check those first, and fall back to find_library()
Expand Down
6 changes: 6 additions & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ epoxy_deps = [ dl_dep, ]
if host_system == 'windows'
epoxy_deps += [ opengl32_dep, gdi32_dep ]
endif
if enable_x11
epoxy_deps += [ x11_headers_dep, ]
endif
if build_egl
epoxy_deps += [ elg_headers_dep, ]
endif

libepoxy = library(
'epoxy',
Expand Down

0 comments on commit 1c51cfb

Please sign in to comment.