|
|
5e458b |
project('libdnf-plugin-txnupd', 'cpp',
|
|
|
b7ac2d |
version : '0.1.4',
|
|
|
5e458b |
license : 'LGPL-2.1-or-later',
|
|
|
5e458b |
default_options : [
|
|
|
5e458b |
'buildtype=debugoptimized',
|
|
|
5e458b |
'b_asneeded=True',
|
|
|
5e458b |
'b_lundef=True',
|
|
|
5e458b |
'b_pie=true',
|
|
|
5e458b |
'cpp_std=gnu++17',
|
|
|
5e458b |
'warning_level=3',
|
|
|
5e458b |
],
|
|
|
5e458b |
meson_version : '>=0.49.0')
|
|
|
5e458b |
|
|
|
5e458b |
cc = meson.get_compiler('cpp')
|
|
|
5e458b |
test_cppflags = [
|
|
|
5e458b |
'-fstrict-aliasing',
|
|
|
5e458b |
'-Wformat=2',
|
|
|
5e458b |
'-Wunused',
|
|
|
5e458b |
'-Wuninitialized',
|
|
|
5e458b |
'-Wstrict-prototypes',
|
|
|
5e458b |
'-Wmissing-prototypes',
|
|
|
5e458b |
'-Werror=init-self',
|
|
|
5e458b |
'-Werror=main',
|
|
|
5e458b |
]
|
|
|
5e458b |
foreach cppflag : test_cppflags
|
|
|
5e458b |
if cc.has_argument(cppflag)
|
|
|
5e458b |
add_project_arguments(cppflag, language : 'cpp')
|
|
|
5e458b |
endif
|
|
|
5e458b |
endforeach
|
|
|
5e458b |
|
|
|
2f7a28 |
libdnf_plugin_libdir = join_paths(get_option('prefix'), get_option('libdir'), 'libdnf', 'plugins')
|
|
|
2f7a28 |
|
|
|
5e458b |
add_project_arguments(
|
|
|
5e458b |
'-DTXNUPD_PLUGIN_VERSION="@0@"'.format(meson.project_version()),
|
|
|
5e458b |
language : 'cpp',
|
|
|
5e458b |
)
|
|
|
5e458b |
|
|
|
4fa25d |
libdnf = dependency('libdnf', version : '>=0.60')
|
|
|
0c5f87 |
tukit = dependency('tukit', version : '>=3.6.2')
|
|
|
5e458b |
|
|
|
5e458b |
libdnf_plugin_src = files(
|
|
|
5e458b |
'src/txnupd.cpp',
|
|
|
5e458b |
)
|
|
|
5e458b |
|
|
|
5e458b |
libdnf_plugin = shared_module('txnupd',
|
|
|
5e458b |
libdnf_plugin_src,
|
|
|
5e458b |
dependencies : [libdnf, tukit],
|
|
|
5e458b |
name_prefix : '',
|
|
|
2f7a28 |
name_suffix : 'so',
|
|
|
5e458b |
install : true,
|
|
|
5e458b |
install_dir : libdnf_plugin_libdir,
|
|
|
5e458b |
)
|