summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>2021-10-06 09:44:12 +0100
committerAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>2022-02-16 19:37:01 +0000
commit9bf47884554b4f7e93c7c8fe4f51058a2efbb846 (patch)
treeeb4de7dcc7fc234180b89174473538068a302ce3 /src
parent8db879f810e2dbc63824c43c17eeea0d3dbca1a2 (diff)
downloadlibepoxy-9bf47884554b4f7e93c7c8fe4f51058a2efbb846.tar.gz
Add the right include paths for EGL and X11 headers
Libepoxy currently depends on all headers living under the same prefix. This is not necessarily true: X11 headers can live in a separate prefix, for instance under /opt/X11. This is also the case when cross-compiling to a platform that sets up the build environment in non-standard ways. We could add `x11_dep` and `egl_dep` to the libepoxy target dependencies, but that could potentially add spurious linker flags and cause libepoxy to depend on libraries it will dlopen() during normal operations. To avoid that case, we use a partial_dep() object from Meson, and we limit the dependency to compiler flags and inclusion paths.
Diffstat (limited to 'src')
-rw-r--r--src/meson.build6
1 files changed, 6 insertions, 0 deletions
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',