From bfebdc5eb4a56e8ef9a46a316c859d2525246894 Mon Sep 17 00:00:00 2001 From: Frediano Ziglio Date: Thu, 4 Apr 2019 12:22:18 -0300 Subject: [PATCH] meson: Do not build generated files twice spice-gtk and spice-server will use spice_common_client_dep and spice_common_server_dep as dependencies. However they will depend on both spice-common client/server libraries and their sources causing the sources to be compiled multiple times and causes linker errors on spice-gtk. The issue can be observed doing a "find -name \*generated\*.o" in Meson build directory. Signed-off-by: Frediano Ziglio Signed-off-by: Eduardo Lima (Etrunko) Acked-by: Frediano Ziglio --- common/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/meson.build b/common/meson.build index e5629af..980a32a 100644 --- a/common/meson.build +++ b/common/meson.build @@ -106,7 +106,7 @@ if spice_common_generate_client_code install : false, dependencies : spice_common_dep) - spice_common_client_dep = declare_dependency(sources : client_marshallers, + spice_common_client_dep = declare_dependency(sources : client_marshallers[1], link_with : spice_common_client_lib, dependencies : spice_common_dep) endif @@ -164,7 +164,7 @@ if spice_common_generate_server_code install : false, dependencies : spice_common_dep) - spice_common_server_dep = declare_dependency(sources : target, + spice_common_server_dep = declare_dependency(sources : target[1], link_with : spice_common_server_lib, dependencies : spice_common_dep) endif