Debian Codegraph @

test cases/unit/39 external, internal library rpath/external library/meson.build

raw
1 project('system library', 'c', default_options : ['b_lundef=false'])
2
3 shared_library('foo_in_system', 'foo.c', install : true)
4 l = shared_library('faa_pkg', 'faa.c', install: true)
5
6 if host_machine.system() == 'darwin'
7 ldflags = ['-framework', 'CoreFoundation', '-framework', 'CoreMedia']
8 allow_undef_args = ['-Wl,-undefined,dynamic_lookup']
9 else
10 ldflags = ['-Wl,-rpath,${libdir}']
11 allow_undef_args = []
12 endif
13
14 pkg = import('pkgconfig')
15 pkg.generate(name: 'faa_pkg',
16 libraries: [l] + ldflags,
17 description: 'FAA, a pkg-config test library')
18
19 # cygwin DLLs can't have undefined symbols
20 if host_machine.system() != 'cygwin'
21 shared_library('bar_in_system', 'bar.c', install : true, link_args : allow_undef_args)
22 endif