From 5b69b60c197695579fd48abaa81c39b9984f1cab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Thu, 21 Apr 2022 16:48:16 +0100 Subject: build: introduce Meson build file rules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Meson build system used by many other virt projects (QEMU, libvirt and others) is easier to understand & maintain rules for than cmake, guiding towards best practice. Signed-off-by: Daniel P. Berrangé --- samples/meson.build | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 samples/meson.build (limited to 'samples') diff --git a/samples/meson.build b/samples/meson.build new file mode 100644 index 0000000..d1d435c --- /dev/null +++ b/samples/meson.build @@ -0,0 +1,94 @@ + +client_sources = [ + 'client.c', + '../lib/migration.c', + '../lib/tran.c', + '../lib/tran_sock.c', +] + +client_deps = [ + json_c_dep, + thread_dep, +] + +client = executable( + 'client', + client_sources, + c_args: common_cflags, + dependencies: client_deps, + include_directories: public_include_dir + lib_include_dir, + install: false, +) + + +server_sources = [ + 'server.c', +] + +server_deps = [ + libvfio_user_dep, +] + +server = executable( + 'server', + server_sources, + c_args: common_cflags, + dependencies: server_deps, + include_directories: lib_include_dir, + install: false, +) + + +null_sources = [ + 'null.c', +] + +null_deps = [ + libvfio_user_dep, + thread_dep, +] + +null = executable( + 'null', + null_sources, + c_args: common_cflags, + dependencies: null_deps, + include_directories: lib_include_dir, + install: false, +) + + +gpio_pci_idio_16_sources = [ + 'gpio-pci-idio-16.c', +] + +gpio_pci_idio_16_deps = [ + libvfio_user_dep, +] + +gpio_pci_idio_16 = executable( + 'gpio-pci-idio-16', + gpio_pci_idio_16_sources, + c_args: common_cflags, + dependencies: gpio_pci_idio_16_deps, + include_directories: lib_include_dir, + install: false, +) + + +lspci_sources = [ + 'lspci.c', +] + +lspci_deps = [ + libvfio_user_dep, +] + +lspci = executable( + 'lspci', + lspci_sources, + c_args: common_cflags, + dependencies: lspci_deps, + include_directories: lib_include_dir, + install: false, +) -- cgit v1.1