aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2020-09-01 14:30:49 +0100
committerThomas Huth <thuth@redhat.com>2020-09-07 12:34:17 +0200
commit46859d939832f666acecd63d7aac6731ade916d9 (patch)
tree5bf50d5273ffdd416a6d46bb290ebf0b53e0ecf1 /meson.build
parent6bcb5fc0f7a543320fbfaabbb3ffe4a9db241222 (diff)
downloadqemu-46859d939832f666acecd63d7aac6731ade916d9.zip
qemu-46859d939832f666acecd63d7aac6731ade916d9.tar.gz
qemu-46859d939832f666acecd63d7aac6731ade916d9.tar.bz2
crypto: fix build with gcrypt enabled
If nettle is disabled and gcrypt enabled, the compiler and linker flags needed for gcrypt are not passed. Gnutls was also not added as a dependancy when gcrypt is enabled. Attempting to add the library dependencies at the same time as the source dependencies is error prone, as there are alot of different rules for picking which sources to use, and some of the source files use code level conditionals intead. It is thus clearer to add the library dependencies separately. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20200901133050.381844-2-berrange@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build5
1 files changed, 5 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 5aaa364..04e070b 100644
--- a/meson.build
+++ b/meson.build
@@ -116,6 +116,11 @@ urcubp = not_found
if 'CONFIG_TRACE_UST' in config_host
urcubp = declare_dependency(link_args: config_host['URCU_BP_LIBS'].split())
endif
+gcrypt = not_found
+if 'CONFIG_GCRYPT' in config_host
+ gcrypt = declare_dependency(compile_args: config_host['GCRYPT_CFLAGS'].split(),
+ link_args: config_host['GCRYPT_LIBS'].split())
+endif
nettle = not_found
if 'CONFIG_NETTLE' in config_host
nettle = declare_dependency(compile_args: config_host['NETTLE_CFLAGS'].split(),