meson.build 432 B

123456789101112
  1. project('subdir targets', 'c')
  2. # Idea behind this test is to create targets with identical name
  3. # but different output files. We can do this by choosing different
  4. # name_prefix of libraries. Target id does not depend on name_prefix.
  5. main_foo = static_library('foo', 'foo.c', name_prefix : 'main')
  6. subdir('subdir') # defines subdir_foo
  7. exe = executable('prog', 'main.c', link_with : [main_foo, subdir_foo])
  8. test('main test', exe)