2020-11-25 13:06:37 +03:00
|
|
|
project('libvhost-user', 'c',
|
|
|
|
license: 'GPL-2.0-or-later',
|
2022-12-22 23:36:50 +03:00
|
|
|
default_options: ['warning_level=1', 'c_std=gnu99'])
|
|
|
|
|
|
|
|
cc = meson.get_compiler('c')
|
|
|
|
add_project_arguments(cc.get_supported_arguments('-Wsign-compare',
|
|
|
|
'-Wdeclaration-after-statement',
|
|
|
|
'-Wstrict-aliasing'),
|
|
|
|
native: false, language: 'c')
|
2020-11-25 13:06:37 +03:00
|
|
|
|
2021-01-14 15:56:03 +03:00
|
|
|
threads = dependency('threads')
|
2020-11-25 13:06:37 +03:00
|
|
|
glib = dependency('glib-2.0')
|
|
|
|
|
|
|
|
vhost_user = static_library('vhost-user',
|
|
|
|
files('libvhost-user.c'),
|
2021-01-14 15:56:03 +03:00
|
|
|
dependencies: threads,
|
2020-11-25 13:06:37 +03:00
|
|
|
c_args: '-D_GNU_SOURCE')
|
|
|
|
|
2020-11-25 13:06:39 +03:00
|
|
|
executable('link-test', files('link-test.c'),
|
2021-05-05 18:13:12 +03:00
|
|
|
link_whole: vhost_user)
|
2020-11-25 13:06:39 +03:00
|
|
|
|
2020-11-25 13:06:37 +03:00
|
|
|
vhost_user_glib = static_library('vhost-user-glib',
|
|
|
|
files('libvhost-user-glib.c'),
|
|
|
|
link_with: vhost_user,
|
|
|
|
dependencies: glib)
|
|
|
|
|
|
|
|
vhost_user_dep = declare_dependency(link_with: vhost_user_glib,
|
2021-01-14 15:56:03 +03:00
|
|
|
dependencies: glib,
|
2020-11-25 13:06:37 +03:00
|
|
|
include_directories: include_directories('.'))
|