Debian Codegraph @

test cases/common/55 exe static shared/meson.build

raw
1 project('statchain', 'c')
2
3 subdir('subdir')
4 # Test that -fPIC in c_args is also accepted (on platforms where it's permitted)
5 picflag = []
6 if not ['darwin', 'windows'].contains(host_machine.system())
7 picflag = ['-fPIC']
8 endif
9 statlib2 = static_library('stat2', 'stat2.c', c_args : picflag, pic : false)
10 # Test that pic is needed for both direct and indirect static library
11 # dependencies of shared libraries (on Linux and BSD)
12 statlib = static_library('stat', 'stat.c', link_with : [shlib, statlib2], pic : true)
13 shlib2 = shared_library('shr2', 'shlib2.c', link_with : statlib)
14 exe = executable('prog', 'prog.c', link_with : shlib2)
15 test('runtest', exe)