| 1 |
mod = import('unstable-external_project') |
| 2 |
|
| 3 |
target_system = target_machine.system() |
| 4 |
if target_system in ['windows', 'cygwin'] |
| 5 |
libext = 'dll' |
| 6 |
elif target_system == 'darwin' |
| 7 |
libext = 'dylib' |
| 8 |
else |
| 9 |
libext = 'so' |
| 10 |
endif |
| 11 |
|
| 12 |
p = mod.add_project('configure', |
| 13 |
configure_options : [ |
| 14 |
'--prefix=@PREFIX@', |
| 15 |
'--libdir=@PREFIX@/@LIBDIR@', |
| 16 |
'--includedir=@PREFIX@/@INCLUDEDIR@', |
| 17 |
'--libext=' + libext, |
| 18 |
], |
| 19 |
depends: somelib, |
| 20 |
verbose: true, |
| 21 |
) |
| 22 |
|
| 23 |
libfoo_dep = declare_dependency(link_with : somelib, |
| 24 |
dependencies : p.dependency('foo')) |