aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2020-10-14 17:21:50 -0400
committerXavier Claessens <xavier.claessens@collabora.com>2021-01-20 08:09:14 -0500
commit950b9f5b25843d95c4667ef60038e8d7b476fbb8 (patch)
tree77bca21544d459c3da8a9cf241f9dbbc3244a717
parentc7973204247c777086a94f9f99af83c1a51b2d8e (diff)
downloadlibepoxy-950b9f5b25843d95c4667ef60038e8d7b476fbb8.tar.gz
meson: Set same variables in declare_dependency() as in pkgconfig
GTK currently fails to detect if epoxy has been built with EGL on Windows when epoxy is a subproject. To fix that it needs to get that information from the dependency variables. This requires Meson >=0.54.0 for setting variables in declare_dependency().
-rw-r--r--meson.build2
-rw-r--r--src/meson.build13
2 files changed, 10 insertions, 5 deletions
diff --git a/meson.build b/meson.build
index f42791c..ca37e80 100644
--- a/meson.build
+++ b/meson.build
@@ -5,7 +5,7 @@ project('libepoxy', 'c', version: '1.5.6',
'warning_level=1',
],
license: 'MIT',
- meson_version: '>= 0.48.0')
+ meson_version: '>= 0.54.0')
epoxy_version = meson.project_version().split('.')
epoxy_major_version = epoxy_version[0].to_int()
diff --git a/src/meson.build b/src/meson.build
index 881e087..37e28f0 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -72,17 +72,22 @@ libepoxy = library(
link_args: common_ldflags,
)
+epoxy_has_glx = build_glx ? '1' : '0'
+epoxy_has_egl = build_egl ? '1' : '0'
+epoxy_has_wgl = build_wgl ? '1' : '0'
+
libepoxy_dep = declare_dependency(
link_with: libepoxy,
include_directories: libepoxy_inc,
dependencies: epoxy_deps,
sources: epoxy_headers,
+ variables: {
+ 'epoxy_has_glx': epoxy_has_glx,
+ 'epoxy_has_egl': epoxy_has_egl,
+ 'epoxy_has_wgl': epoxy_has_wgl,
+ },
)
-epoxy_has_glx = build_glx ? '1' : '0'
-epoxy_has_egl = build_egl ? '1' : '0'
-epoxy_has_wgl = build_wgl ? '1' : '0'
-
# We don't want to add these dependencies to the library, as they are
# not needed when building Epoxy; we do want to add them to the generated
# pkg-config file, for consumers of Epoxy