meson.build: make sure xcb packages are recent enough

Fixes #248

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-10-11 18:11:45 +01:00
parent 1ca01ec456
commit 945dc179f5
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 13 additions and 9 deletions

View File

@ -4,8 +4,7 @@ if not libev.found()
endif
base_deps = [
cc.find_library('m'),
libev,
dependency('xcb', version: '>=1.9.2'),
libev
]
srcs = [ files('compton.c', 'win.c', 'c2.c', 'x.c', 'config.c', 'vsync.c', 'utils.c',
@ -15,18 +14,23 @@ compton_inc = include_directories('.')
cflags = []
required_package = [
'x11', 'x11-xcb', 'xcb-renderutil',
'xcb-render', 'xcb-damage', 'xcb-randr', 'xcb-sync',
'xcb-composite', 'xcb-shape', 'xcb-image', 'xcb-xinerama',
'xcb-xfixes', 'xcb-present', 'xext', 'pixman-1'
required_xcb_packages = [
'xcb-render', 'xcb-damage', 'xcb-randr', 'xcb-sync', 'xcb-composite',
'xcb-shape', 'xcb-xinerama', 'xcb-xfixes', 'xcb-present', 'xcb'
]
foreach i : required_package
required_packages = [
'x11', 'x11-xcb', 'xcb-renderutil', 'xcb-image', 'xext', 'pixman-1'
]
foreach i : required_packages
base_deps += [dependency(i, required: true)]
endforeach
foreach i : required_xcb_packages
base_deps += [dependency(i, version: '>=1.12.0', required: true)]
endforeach
if not cc.has_header('uthash.h')
error('Dependency uthash not found')
endif