summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2019-08-01 09:48:59 +0200
committerAdam Jackson <ajax@nwnk.net>2019-08-15 17:08:04 +0000
commitc0bbc29ae59737ea0e55fd9c8b65133010d32b80 (patch)
tree84ee20867177d5dd379e2b51cbd631b1afc8fac4 /meson.build
parentbf758660c9c0e20abd141a1215e2e2b1ac342097 (diff)
meson: Move requirements in a single place
Some modules are required in multiple places in the meson file. Move the actual requirements to the top of the file as a variable so that updating a version does not require changing the actual value in multiple places. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build26
1 files changed, 17 insertions, 9 deletions
diff --git a/meson.build b/meson.build
index 639acad8a..be3252a71 100644
--- a/meson.build
+++ b/meson.build
@@ -58,6 +58,14 @@ endforeach
add_global_arguments(common_wflags, language : ['c', 'objc'])
+libdrm_req = '>= 2.4.89'
+libselinux_req = '>= 2.0.86'
+xext_req = '>= 1.0.99.4'
+wayland_req = '>= 1.3.0'
+wayland_protocols_req = '>= 1.10'
+gbm_req = '>= 10.2'
+xf86dgaproto_req = '>= 2.0.99.1'
+
xproto_dep = dependency('xproto', version: '>= 7.0.31')
randrproto_dep = dependency('randrproto', version: '>= 1.6.0')
renderproto_dep = dependency('renderproto', version: '>= 0.11')
@@ -186,9 +194,9 @@ if (host_machine.system() != 'darwin' and
xwayland_required = get_option('xwayland') == 'true'
xwayland_dep = [
- dependency('wayland-client', version: '>= 1.3.0', required: xwayland_required),
- dependency('wayland-protocols', version: '>= 1.10', required: xwayland_required),
- dependency('libdrm', version: '>= 2.4.89', required: xwayland_required),
+ dependency('wayland-client', version: wayland_req, required: xwayland_required),
+ dependency('wayland-protocols', version: wayland_protocols_req, required: xwayland_required),
+ dependency('libdrm', version: libdrm_req, required: xwayland_required),
dependency('epoxy', required: xwayland_required),
]
@@ -209,7 +217,7 @@ if (host_machine.system() != 'darwin' and
xnest_required = get_option('xnest') == 'true'
xnest_dep = [
- dependency('xext', version: '>= 1.0.99.4', required: xnest_required),
+ dependency('xext', version: xext_req, required: xnest_required),
dependency('x11', required: xnest_required),
dependency('xau', required: xnest_required),
]
@@ -307,7 +315,7 @@ endif
gbm_dep = dependency('', required: false)
epoxy_dep = dependency('', required: false)
if build_glamor
- gbm_dep = dependency('gbm', version: '>= 10.2', required: false)
+ gbm_dep = dependency('gbm', version: gbm_req, required: false)
epoxy_dep = dependency('epoxy', required: false)
endif
@@ -345,7 +353,7 @@ if build_glx
build_hashtable = true
endif
-libdrm_dep = dependency('libdrm', version: '>= 2.4.89', required: false)
+libdrm_dep = dependency('libdrm', version: libdrm_req, required: false)
if get_option('dri1') == 'auto'
build_dri1 = xf86driproto_dep.found() and libdrm_dep.found()
@@ -430,12 +438,12 @@ endif
build_dga = false
xf86dgaproto_dep = dependency('', required: false)
if get_option('dga') == 'auto'
- xf86dgaproto_dep = dependency('xf86dgaproto', version: '>= 2.0.99.1', required: false)
+ xf86dgaproto_dep = dependency('xf86dgaproto', version: xf86dgaproto_req, required: false)
if xf86dgaproto_dep.found()
build_dga = true
endif
elif get_option('dga') == 'true'
- xf86dgaproto_dep = dependency('xf86dgaproto', version: '>= 2.0.99.1', required: true)
+ xf86dgaproto_dep = dependency('xf86dgaproto', version: xf86dgaproto_req, required: true)
build_dga = true
endif
@@ -526,7 +534,7 @@ inc = include_directories(
build_xselinux = false
if get_option('xselinux') != 'false'
- dep_selinux = dependency('libselinux', version: '>= 2.0.86',
+ dep_selinux = dependency('libselinux', version: libselinux_req,
required: get_option('xselinux') == 'true')
dep_audit = dependency('audit', required: get_option('xselinux') == 'true')
if get_option('xselinux') == 'true'