blob: c91674caaa54ef0de2cc1e15a46b56349a884263 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
project('rust linking to c using dependency', 'c', 'rust')
if host_machine.system() == 'darwin'
error('MESON_SKIP_TEST: does not work right on macos, please fix!')
endif
dep_zlib = dependency('zlib', static : get_option('static'), method : get_option('method'), required : false)
if not dep_zlib.found()
error('MESON_SKIP_TEST: Could not find a @0@ zlib'.format(get_option('static') ? 'static' : 'shared'))
endif
l = static_library(
'c_accessing_zlib',
'c_accessing_zlib.c',
dependencies: [dep_zlib],
)
e = executable(
'prog', 'prog.rs',
link_with : l,
)
test('cdepstest', e)
|