1project('libvhost-user', 'c',
2        license: 'GPL-2.0-or-later',
3        default_options: ['c_std=gnu99'])
4
5threads = dependency('threads')
6glib = dependency('glib-2.0')
7inc = include_directories('../../include', '../../linux-headers')
8
9vhost_user = static_library('vhost-user',
10                            files('libvhost-user.c'),
11                            include_directories: inc,
12                            dependencies: threads,
13                            c_args: '-D_GNU_SOURCE')
14
15executable('link-test', files('link-test.c'),
16           link_whole: vhost_user,
17           include_directories: inc)
18
19vhost_user_glib = static_library('vhost-user-glib',
20                                 files('libvhost-user-glib.c'),
21                                 include_directories: inc,
22                                 link_with: vhost_user,
23                                 dependencies: glib)
24
25vhost_user_dep = declare_dependency(link_with: vhost_user_glib,
26                                    dependencies: glib,
27                                    include_directories: include_directories('.'))
28