aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meson.build2
-rw-r--r--src/dispatch_common.c4
-rw-r--r--src/meson.build6
3 files changed, 12 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 182a3c9..e1d8d8b 100644
--- a/meson.build
+++ b/meson.build
@@ -166,9 +166,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/dispatch_common.c b/src/dispatch_common.c
index 592df38..153eb7c 100644
--- a/src/dispatch_common.c
+++ b/src/dispatch_common.c
@@ -683,7 +683,11 @@ epoxy_load_gl(void)
#endif
if (!api.gl_handle) {
+#if defined(OPENGL_LIB)
fprintf(stderr, "Couldn't open %s or %s\n", GLX_LIB, OPENGL_LIB);
+#else
+ fprintf(stderr, "Couldn't open %s\n", GLX_LIB);
+#endif
abort();
}
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',