summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Rusak <lorusak@gmail.com>2018-06-04 12:38:41 -0700
committerDylan Baker <dylan@pnwbakers.com>2018-06-15 13:55:04 -0700
commit2008ca24d781628b0a49e29385fe93e836eb2ed5 (patch)
tree3e0a7cc2ab71d723231fbc3321ebdbf9e8cc0dd1
parent87453e9fe1686b676cb853b6eb9654d25d177521 (diff)
meson: fix private libs when building without glx
I noticed that the generated pkg-config files will include glx and x11 dependencies even when x11 isn't a selected platform. This fixes the private libs and was tested by building kmscube V2: - check if gallium-xlib is being used for glx Fixes: 108d257a16859898f5ce0 "meson: build libEGL" Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> (cherry picked from commit 4cfc4cef80a85dea2b761efd9f6deb13198c9196)
-rw-r--r--meson.build18
1 files changed, 12 insertions, 6 deletions
diff --git a/meson.build b/meson.build
index c6cca35bf1..1fd4b02456 100644
--- a/meson.build
+++ b/meson.build
@@ -1340,18 +1340,24 @@ endforeach
inc_include = include_directories('include')
-gl_priv_reqs = [
- 'x11', 'xext', 'xdamage >= 1.1', 'xfixes', 'x11-xcb', 'xcb',
- 'xcb-glx >= 1.8.1']
+gl_priv_reqs = []
+
+if with_glx == 'xlib' or with_glx == 'gallium-xlib'
+ gl_priv_reqs += ['x11', 'xext', 'xcb']
+elif with_glx == 'dri'
+ gl_priv_reqs += [
+ 'x11', 'xext', 'xdamage >= 1.1', 'xfixes', 'x11-xcb', 'xcb',
+ 'xcb-glx >= 1.8.1']
+ if with_dri_platform == 'drm'
+ gl_priv_reqs += 'xcb-dri2 >= 1.8'
+ endif
+endif
if dep_libdrm.found()
gl_priv_reqs += 'libdrm >= 2.4.75'
endif
if dep_xxf86vm.found()
gl_priv_reqs += 'xxf86vm'
endif
-if with_dri_platform == 'drm'
- gl_priv_reqs += 'xcb-dri2 >= 1.8'
-endif
gl_priv_libs = []
if dep_thread.found()