| 1 |
project('D Shared Library', 'd') |
| 2 |
|
| 3 |
dc = meson.get_compiler('d') |
| 4 |
if dc.get_id() == 'gcc' |
| 5 |
if dc.version().version_compare('< 8') |
| 6 |
error('MESON_SKIP_TEST: GDC < 8.0 cannot build shared libraries') |
| 7 |
endif |
| 8 |
endif |
| 9 |
|
| 10 |
subdir('sub') |
| 11 |
ed = executable('app_d', 'app.d', link_with : ldyn, install : true) |
| 12 |
test('linktest_dyn', ed) |
| 13 |
|
| 14 |
# test D attributes for pkg-config |
| 15 |
pkgc = import('pkgconfig') |
| 16 |
pkgc.generate(name: 'test', |
| 17 |
libraries: ldyn, |
| 18 |
subdirs: 'd/stuff', |
| 19 |
description: 'A test of D attributes to pkgconfig.generate.', |
| 20 |
d_module_versions: ['Use_Static'] |
| 21 |
) |
| 22 |
|
| 23 |
ldd = find_program('ldd', required : false) |
| 24 |
if ldd.found() |
| 25 |
test('ldd-test.py', ed) |
| 26 |
endif |