1dmxexamples_dep = [ 2 dependency('xext'), 3 dependency('x11'), 4] 5 6dmx_dep = dependency('dmx', version: '>= 1.0.99.1') 7 8dmx_examples = [ 9 ['dmxinfo', [dmx_dep]], 10 ['dmxwininfo', [dmx_dep, dependency('xmu')]], 11 ['dmxreconfig', [dmx_dep]], 12 ['dmxresize', [dmx_dep]], 13 ['dmxaddscreen', [dmx_dep]], 14 ['dmxrmscreen', [dmx_dep]], 15 ['dmxaddinput', [dmx_dep]], 16 ['dmxrminput', [dmx_dep]], 17] 18 19noinst_dmx_examples = [ 20 ['xinput', [dmx_dep, dependency('xi')]], 21 ['xtest', [dependency('xtst')]], 22 ['evi', []], 23 ['xled', []], 24 ['xbell', []], 25 ['res', [dependency('xres')]], 26] 27 28foreach ex: dmx_examples 29 bin = ex[0] 30 extra_dep = ex[1] 31 32 executable( 33 bin, 34 bin + '.c', 35 dependencies: [dmxexamples_dep, extra_dep], 36 install: true 37 ) 38endforeach 39 40foreach ex: noinst_dmx_examples 41 bin = ex[0] 42 extra_dep = ex[1] 43 44 executable( 45 bin, 46 bin + '.c', 47 dependencies: [dmxexamples_dep, extra_dep], 48 ) 49endforeach 50 51if cc.has_header('linux/input.h') 52 executable('ev', 'ev.c') 53endif 54