diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-07-14 18:53:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-07-14 18:53:09 +0000 |
commit | 3945f3269b3e2763faa1ab22d225ca4dd1856b82 (patch) | |
tree | 7e96ec768baa3807ce3a1076a74037a287f4caa8 /src/meson.build | |
parent | Initial commit. (diff) | |
download | libnvme-3945f3269b3e2763faa1ab22d225ca4dd1856b82.tar.xz libnvme-3945f3269b3e2763faa1ab22d225ca4dd1856b82.zip |
Adding upstream version 1.0.upstream/1.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/meson.build')
-rw-r--r-- | src/meson.build | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/src/meson.build b/src/meson.build new file mode 100644 index 0000000..b573b19 --- /dev/null +++ b/src/meson.build @@ -0,0 +1,74 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# This file is part of libnvme. +# Copyright (c) 2021 Dell Inc. +# +# Authors: Martin Belanger <Martin.Belanger@dell.com> +# +sources = [ + 'nvme/cleanup.c', + 'nvme/fabrics.c', + 'nvme/filters.c', + 'nvme/ioctl.c', + 'nvme/linux.c', + 'nvme/log.c', + 'nvme/tree.c', + 'nvme/util.c', +] + +if conf.get('CONFIG_JSONC') + sources += 'nvme/json.c' +endif + +deps = [ + libuuid_dep, + json_c_dep, + openssl_dep, +] + +source_dir = meson.current_source_dir() +mapfile = 'libnvme.map' +version_script_arg = join_paths(source_dir, mapfile) + +libnvme = library( + 'nvme', # produces libnvme.so + sources, + version: library_version, + link_args: ['-Wl,--version-script=' + version_script_arg], + dependencies: deps, + link_depends: mapfile, + include_directories: [incdir, internal_incdir], + install: true, + link_with: libccan, +) + +pkg = import('pkgconfig') +pkg.generate(libnvme, + filebase: meson.project_name(), + name: meson.project_name(), + version: meson.project_version(), + description: 'Manage "libnvme" subsystem devices (Non-volatile Memory Express)', + url: 'http://github.com/linux-nvme/libnvme/', +) + +libnvme_dep = declare_dependency( + include_directories: ['.'], + dependencies: deps, + link_with: libnvme, +) + +mode = ['rw-r--r--', 0, 0] +install_headers('libnvme.h', install_mode: mode) +install_headers([ + 'nvme/fabrics.h', + 'nvme/filters.h', + 'nvme/ioctl.h', + 'nvme/linux.h', + 'nvme/log.h', + 'nvme/tree.h', + 'nvme/types.h', + 'nvme/util.h', + ], + subdir: 'nvme', + install_mode: mode, +) |