The Meson Build System
http://mesonbuild.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
849 B
26 lines
849 B
9 years ago
|
project('dep fallback', 'c')
|
||
|
|
||
8 years ago
|
bob = dependency('boblib', fallback : ['boblib', 'bob_dep'], required: false,
|
||
|
default_options : 'warning_level=1')
|
||
8 years ago
|
if not bob.found()
|
||
|
error('Bob is actually needed')
|
||
|
endif
|
||
8 years ago
|
# boblib subproject exists, but sita_dep doesn't exist
|
||
|
sita = dependency('sitalib', fallback : ['boblib', 'sita_dep'], required: false)
|
||
|
# jimmylib subproject doesn't exist
|
||
8 years ago
|
jimmy = dependency('jimmylib', fallback : ['jimmylib', 'jimmy_dep'], required: false)
|
||
8 years ago
|
# dummylib subproject fails to configure
|
||
8 years ago
|
dummy = dependency('dummylib', fallback : ['dummylib', 'dummy_dep'], required: false)
|
||
9 years ago
|
|
||
8 years ago
|
gensrc_py = find_program('gensrc.py')
|
||
|
gensrc = custom_target('gensrc.c',
|
||
|
input : 'tester.c',
|
||
|
output : 'gensrc.c',
|
||
|
command : [gensrc_py, '@INPUT@', '@OUTPUT@'])
|
||
|
|
||
|
exe = executable('bobtester',
|
||
|
[gensrc],
|
||
|
dependencies : bob)
|
||
|
|
||
9 years ago
|
test('bobtester', exe)
|