meson.build 525 B

12345678910111213
  1. project('both libraries linking test', 'c')
  2. both_libs = both_libraries('mylib', 'libfile.c')
  3. exe_shared = executable('prog-shared', 'main.c', link_with : both_libs.get_shared_lib())
  4. exe_static = executable('prog-static', 'main.c',
  5. c_args : ['-DSTATIC_COMPILATION'],
  6. link_with : both_libs.get_static_lib())
  7. exe_both = executable('prog-both', 'main.c', link_with : both_libs)
  8. test('runtest-shared', exe_shared)
  9. test('runtest-static', exe_static)
  10. test('runtest-both', exe_both)