| 1 | project('libvhost-user', 'c', |
| 2 | license: 'GPL-2.0-or-later', |
| 3 | default_options: ['warning_level=1', 'c_std=gnu99']) |
| 4 | |
| 5 | cc = meson.get_compiler('c') |
| 6 | add_project_arguments(cc.get_supported_arguments('-Wsign-compare', |
| 7 | '-Wdeclaration-after-statement', |
| 8 | '-Wstrict-aliasing'), |
| 9 | native: false, language: 'c') |
| 10 | |
| 11 | threads = dependency('threads') |
| 12 | glib = dependency('glib-2.0') |
| 13 | |
| 14 | vhost_user = static_library('vhost-user', |
| 15 | files('libvhost-user.c'), |
| 16 | dependencies: threads, |
| 17 | c_args: '-D_GNU_SOURCE') |
| 18 | |
| 19 | executable('link-test', files('link-test.c'), |
| 20 | link_whole: vhost_user) |
| 21 | |
| 22 | vhost_user_glib = static_library('vhost-user-glib', |
| 23 | files('libvhost-user-glib.c'), |
| 24 | link_with: vhost_user, |
| 25 | dependencies: glib) |
| 26 | |
| 27 | vhost_user_dep = declare_dependency(link_with: vhost_user_glib, |
| 28 | dependencies: glib, |
| 29 | include_directories: include_directories('.')) |