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 <fziglio@redhat.com>
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Frediano Ziglio 2019-04-04 12:22:18 -03:00
parent f236c1ef94
commit bfebdc5eb4

View File

@ -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