aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gmail.com>2022-02-17 12:55:36 +0000
committerGitHub <noreply@github.com>2022-02-17 12:55:36 +0000
commit1c51cfbbe1e17f5e9763d43924ae934bb203e8b0 (patch)
treeeb4de7dcc7fc234180b89174473538068a302ce3
parent8db879f810e2dbc63824c43c17eeea0d3dbca1a2 (diff)
parent9bf47884554b4f7e93c7c8fe4f51058a2efbb846 (diff)
downloadlibepoxy-1c51cfbbe1e17f5e9763d43924ae934bb203e8b0.tar.gz
Merge pull request #261 from arichardson/custom-prefix-build-fix
Fix build if EGL/X11 headers are in a custom prefix
-rw-r--r--meson.build2
-rw-r--r--src/meson.build6
2 files changed, 8 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index e0228d1..f3ae23f 100644
--- a/meson.build
+++ b/meson.build
@@ -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()
diff --git a/src/meson.build b/src/meson.build
index 37e28f0..e19a918 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -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',