aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-08-30 14:29:13 -0400
committerGitHub <noreply@github.com>2018-08-30 14:29:13 -0400
commit2f484537181c515082b632f9d575613abda72a48 (patch)
treed17eaaa5ada10f0d904f6f822b0ecf845cf81b2c
parent633663cddefea5d66e2116573f39ec9aab9e12ab (diff)
parent660a022909d62e51de42518806815ce446fc10f7 (diff)
Merge pull request #1208 from arandomhuman/master
Fixes examples/dmabuf-capture being built with unmet dependencies
-rw-r--r--examples/meson.build34
1 files changed, 21 insertions, 13 deletions
diff --git a/examples/meson.build b/examples/meson.build
index 0fb37a9e..b5ad6c98 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -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',
@@ -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