[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 17/21] meson: keep subprojects together
From: |
Paolo Bonzini |
Subject: |
[PATCH 17/21] meson: keep subprojects together |
Date: |
Thu, 21 Dec 2023 18:19:54 +0100 |
And move away dependencies that are not subprojects anymore.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
meson.build | 72 ++++++++++++++++++++++++++---------------------------
1 file changed, 36 insertions(+), 36 deletions(-)
diff --git a/meson.build b/meson.build
index e777f507ce3..f8d61a46ad1 100644
--- a/meson.build
+++ b/meson.build
@@ -1538,6 +1538,25 @@ if not gnutls_crypto.found()
endif
endif
+capstone = not_found
+if not get_option('capstone').auto() or have_system or have_user
+ capstone = dependency('capstone', version: '>=3.0.5',
+ method: 'pkg-config',
+ required: get_option('capstone'))
+
+ # Some versions of capstone have broken pkg-config file
+ # that reports a wrong -I path, causing the #include to
+ # fail later. If the system has such a broken version
+ # do not use it.
+ if capstone.found() and not cc.compiles('#include <capstone.h>',
+ dependencies: [capstone])
+ capstone = not_found
+ if get_option('capstone').enabled()
+ error('capstone requested, but it does not appear to work')
+ endif
+ endif
+endif
+
gmp = dependency('gmp', required: false, method: 'pkg-config')
if nettle.found() and gmp.found()
hogweed = dependency('hogweed', version: '>=3.4',
@@ -2123,6 +2142,7 @@ config_host_data.set('CONFIG_ATTR', libattr.found())
config_host_data.set('CONFIG_BDRV_WHITELIST_TOOLS',
get_option('block_drv_whitelist_in_tools'))
config_host_data.set('CONFIG_BRLAPI', brlapi.found())
config_host_data.set('CONFIG_BSD', targetos in bsd_oses)
+config_host_data.set('CONFIG_CAPSTONE', capstone.found())
config_host_data.set('CONFIG_COCOA', cocoa.found())
config_host_data.set('CONFIG_DARWIN', targetos == 'darwin')
config_host_data.set('CONFIG_FUZZ', get_option('fuzzing'))
@@ -2186,6 +2206,7 @@ if seccomp.found()
config_host_data.set('CONFIG_SECCOMP_SYSRAWRC', seccomp_has_sysrawrc)
endif
config_host_data.set('CONFIG_PIXMAN', pixman.found())
+config_host_data.set('CONFIG_SLIRP', slirp.found())
config_host_data.set('CONFIG_SNAPPY', snappy.found())
config_host_data.set('CONFIG_SOLARIS', targetos == 'sunos')
if get_option('tcg').allowed()
@@ -3057,28 +3078,9 @@ genh += custom_target('config-poison.h',
command: [find_program('scripts/make-config-poison.sh'),
target_configs_h])
-##############
-# Submodules #
-##############
-
-capstone = not_found
-if not get_option('capstone').auto() or have_system or have_user
- capstone = dependency('capstone', version: '>=3.0.5',
- method: 'pkg-config',
- required: get_option('capstone'))
-
- # Some versions of capstone have broken pkg-config file
- # that reports a wrong -I path, causing the #include to
- # fail later. If the system has such a broken version
- # do not use it.
- if capstone.found() and not cc.compiles('#include <capstone.h>',
- dependencies: [capstone])
- capstone = not_found
- if get_option('capstone').enabled()
- error('capstone requested, but it does not appear to work')
- endif
- endif
-endif
+###############
+# Subprojects #
+###############
libvfio_user_dep = not_found
if have_system and vfio_user_server_allowed
@@ -3122,9 +3124,19 @@ else
fdt_opt = 'disabled'
endif
-config_host_data.set('CONFIG_CAPSTONE', capstone.found())
config_host_data.set('CONFIG_FDT', fdt.found())
-config_host_data.set('CONFIG_SLIRP', slirp.found())
+
+vhost_user = not_found
+if targetos == 'linux' and have_vhost_user
+ libvhost_user = subproject('libvhost-user')
+ vhost_user = libvhost_user.get_variable('vhost_user_dep')
+endif
+
+libvduse = not_found
+if have_libvduse
+ libvduse_proj = subproject('libvduse')
+ libvduse = libvduse_proj.get_variable('libvduse_dep')
+endif
#####################
# Generated sources #
@@ -3355,18 +3367,6 @@ if have_system or have_user
]
endif
-vhost_user = not_found
-if targetos == 'linux' and have_vhost_user
- libvhost_user = subproject('libvhost-user')
- vhost_user = libvhost_user.get_variable('vhost_user_dep')
-endif
-
-libvduse = not_found
-if have_libvduse
- libvduse_proj = subproject('libvduse')
- libvduse = libvduse_proj.get_variable('libvduse_dep')
-endif
-
# NOTE: the trace/ subdirectory needs the qapi_trace_events variable
# that is filled in by qapi/.
subdir('qapi')
--
2.43.0
- [PATCH 11/21] meson: remove CONFIG_ALL, (continued)
- [PATCH 11/21] meson: remove CONFIG_ALL, Paolo Bonzini, 2023/12/21
- [PATCH 12/21] meson: rename config_all, Paolo Bonzini, 2023/12/21
- [PATCH 13/21] meson: add more sections to main meson.build, Paolo Bonzini, 2023/12/21
- [PATCH 14/21] meson: move program checks together, Paolo Bonzini, 2023/12/21
- [PATCH 15/21] meson: move option validation a bit closer, Paolo Bonzini, 2023/12/21
- [PATCH 16/21] meson: separate host-specific checks from option validation, Paolo Bonzini, 2023/12/21
- [PATCH 17/21] meson: keep subprojects together,
Paolo Bonzini <=
- [PATCH 19/21] meson: move config-host.h definitions together, Paolo Bonzini, 2023/12/21
- [PATCH 18/21] meson: move CFI detection code earlier, Paolo Bonzini, 2023/12/21
- [PATCH 21/21] configure, meson: rename targetos to host_os, Paolo Bonzini, 2023/12/21
- [PATCH 20/21] meson: move subdirs to "Collect sources" section, Paolo Bonzini, 2023/12/21