test cases/fortran/10 find library/meson.build
raw| 1 | project('find fortran library', 'fortran') |
| 2 | |
| 3 | fc = meson.get_compiler('fortran') |
| 4 | |
| 5 | sources = ['main.f90', 'gzip.f90'] |
| 6 | zlib = fc.find_library('z', required: false) |
| 7 | |
| 8 | if not zlib.found() |
| 9 | error('MESON_SKIP_TEST: Z library not available.') |
| 10 | endif |
| 11 | |
| 12 | exe = executable('zlibtest', sources, dependencies : zlib) |
| 13 | test('testzlib', exe) |