summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2018-02-23 10:52:58 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2018-02-23 16:05:50 +0000
commitbaa75c4a92bff37cb742a8c3ad42ab93e4f2a3d6 (patch)
treecd6b09e5268b1c8296d6544c7faaca76b1d11fd0 /src
parentf8a7661f2a63c9ffe86151439b4243836c5cb82a (diff)
downloadlibepoxy-baa75c4a92bff37cb742a8c3ad42ab93e4f2a3d6.tar.gz
Add gl and egl private dependencies
If the system we're building Epoxy on has GL and EGL pkg-config modules, then we should add them to the Requires.private field of the pkg-config file. The Requires.private field does not contribute to the linker flags generated by pkg-config, unless we're doing a static build; it does, however, contribute to the compiler flags generated by pkg-config, which means that platforms that specify ad hoc compiler flags for their GL and EGL implementations via pkg-config will be able to propagate them through Epoxy. Closes: #139
Diffstat (limited to 'src')
-rw-r--r--src/meson.build12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/meson.build b/src/meson.build
index e54eed2..3401075 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -89,6 +89,17 @@ 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
+gl_reqs = []
+if gl_dep.found()
+ gl_reqs += 'gl'
+endif
+if build_egl and egl_dep.found()
+ gl_reqs += 'egl'
+endif
+
pkg = import('pkgconfig')
pkg.generate(
libraries: libepoxy,
@@ -101,4 +112,5 @@ pkg.generate(
'epoxy_has_wgl=@0@'.format(epoxy_has_wgl),
],
filebase: 'epoxy',
+ requires_private: ' '.join(gl_reqs),
)