Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1208 from arandomhuman/master
Browse files Browse the repository at this point in the history
Fixes examples/dmabuf-capture being built with unmet dependencies
  • Loading branch information
ddevault committed Aug 30, 2018
2 parents 633663c + 660a022 commit 2f48453
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions examples/meson.build
Expand Up @@ -20,31 +20,31 @@ endif
examples = {
'simple': {
'src': 'simple.c',
'dep': wlroots,
'dep': [wlroots],
},
'pointer': {
'src': 'pointer.c',
'dep': wlroots,
'dep': [wlroots],
},
'touch': {
'src': ['touch.c', 'cat.c'],
'dep': wlroots,
'dep': [wlroots],
},
'tablet': {
'src': 'tablet.c',
'dep': wlroots,
'dep': [wlroots],
},
'rotation': {
'src': ['rotation.c', 'cat.c'],
'dep': wlroots,
'dep': [wlroots],
},
'multi-pointer': {
'src': 'multi-pointer.c',
'dep': wlroots,
'dep': [wlroots],
},
'output-layout': {
'src': ['output-layout.c', 'cat.c'],
'dep': wlroots,
'dep': [wlroots],
},
'screenshot': {
'src': 'screenshot.c',
Expand Down Expand Up @@ -93,10 +93,18 @@ examples = {
}

foreach name, info : examples
executable(
name,
info.get('src'),
dependencies: info.get('dep'),
build_by_default: get_option('examples'),
)
all_dep_found = true
foreach d : info.get('dep')
all_dep_found = all_dep_found and d.found()
endforeach
if all_dep_found
executable(
name,
info.get('src'),
dependencies: info.get('dep'),
build_by_default: get_option('examples'),
)
else
warning('Dependencies not satisfied for ' + name)
endif
endforeach

0 comments on commit 2f48453

Please sign in to comment.