test cases/unit/76 as link whole/meson.build
raw| 1 | project('as-link-whole', 'c', default_options: ['default_library=both']) |
| 2 | |
| 3 | foo = static_library('foo', 'foo.c', install: true) |
| 4 | dep = declare_dependency(link_with: foo) |
| 5 | bar1 = library('bar1', 'bar.c', dependencies: dep) |
| 6 | bar2 = library('bar2', 'bar.c', dependencies: dep.as_link_whole()) |
| 7 | |
| 8 | # bar1.pc should have -lfoo but not bar2.pc |
| 9 | pkg = import('pkgconfig') |
| 10 | pkg.generate(bar1) |
| 11 | pkg.generate(bar2) |