summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2017-09-28 15:53:53 -0700
committerDylan Baker <[email protected]>2017-10-09 13:42:44 -0700
commit816bf7d1644b9b14df253c5d54f595514aa34703 (patch)
treeb87d9a8bc916c8e81744b1440490074a398b050a /meson.build
parentdb9788420d4bc7b4a61eab38c0093af94274d00d (diff)
meson: build gbm
This doesn't include egl support, just dri support. v2: - when gbm is set to 'auto', only build if a dri driver is also enabled - Fix conditional to check for x11 modules with vulkan as well as with dri drivers v3: - Set pkgconfig libraries.private value Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build17
1 files changed, 16 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 716976ccfc6..79ee1a33459 100644
--- a/meson.build
+++ b/meson.build
@@ -101,12 +101,15 @@ pre_args += '-DHAVE_LIBDRM'
with_dri2 = with_dri_platform == 'drm' and dep_libdrm.found()
with_dri3 = get_option('dri3')
if with_dri3 == 'auto'
- if host_machine.system() == 'linux'
+ if host_machine.system() == 'linux' and with_dri2
with_dri3 = true
else
with_dri3 = false
endif
elif with_dri3 == 'yes'
+ if not with_dri2
+ error('dri3 support requires libdrm')
+ endif
with_dri3 = true
else
with_dri3 = false
@@ -122,6 +125,18 @@ if _platforms != ''
with_platform_wayland = _split.contains('wayland')
endif
+with_gbm = get_option('gbm')
+if with_gbm == 'auto' and with_dri # TODO: or gallium
+ with_gbm = host_machine.system() == 'linux'
+elif with_gbm == 'yes'
+ if not ['linux', 'bsd'].contains(host_machine.system())
+ error('GBM only supports unix-like platforms')
+ endif
+ with_gbm = true
+else
+ with_gbm = false
+endif
+
with_glx = get_option('glx')
if with_glx != 'disabled'
pre_args += '-DGLX_USE_TLS'