2020-11-25 11:06:37 +01:00
|
|
|
project('libvhost-user', 'c',
|
|
|
|
license: 'GPL-2.0-or-later',
|
2022-12-22 21:36:50 +01: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 11:06:37 +01:00
|
|
|
|
2021-01-14 13:56:03 +01:00
|
|
|
threads = dependency('threads')
|
2020-11-25 11:06:37 +01:00
|
|
|
glib = dependency('glib-2.0')
|
|
|
|
|
|
|
|
vhost_user = static_library('vhost-user',
|
|
|
|
files('libvhost-user.c'),
|
2021-01-14 13:56:03 +01:00
|
|
|
dependencies: threads,
|
2020-11-25 11:06:37 +01:00
|
|
|
c_args: '-D_GNU_SOURCE')
|
|
|
|
|
2020-11-25 11:06:39 +01:00
|
|
|
executable('link-test', files('link-test.c'),
|
2021-05-05 17:13:12 +02:00
|
|
|
link_whole: vhost_user)
|
2020-11-25 11:06:39 +01:00
|
|
|
|
2020-11-25 11:06:37 +01: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 13:56:03 +01:00
|
|
|
dependencies: glib,
|
2020-11-25 11:06:37 +01:00
|
|
|
include_directories: include_directories('.'))
|