build: Remove dependency to gio2 from common and server libraries

The dependency is required only for client part.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
This commit is contained in:
Frediano Ziglio 2020-04-22 17:08:04 +01:00
parent 4c6b360f6b
commit 7a84f60267
5 changed files with 11 additions and 5 deletions

View File

@ -91,6 +91,10 @@ libspice_common_client_la_SOURCES = \
$(CLIENT_MARSHALLERS) \
$(NULL)
libspice_common_client_la_LIBADD = \
$(GIO2_LIBS) \
$(NULL)
libspice_common_server_la_SOURCES = \
$(SERVER_MARSHALLERS) \
$(NULL)

View File

@ -114,11 +114,11 @@ if spice_common_generate_client_code
spice_common_client_lib = static_library('spice-common-client', spice_common_client_sources,
install : false,
dependencies : spice_common_dep)
dependencies : [spice_common_dep, gio2_deps])
spice_common_client_dep = declare_dependency(sources : client_marshallers[1],
link_with : spice_common_client_lib,
dependencies : spice_common_dep)
dependencies : [spice_common_dep, gio2_deps])
endif
#

View File

@ -119,7 +119,8 @@ AC_DEFUN([SPICE_CHECK_PIXMAN], [
# use in the GLIB2_CFLAGS and GLIB2_LIBS variables.
#------------------
AC_DEFUN([SPICE_CHECK_GLIB2], [
PKG_CHECK_MODULES(GLIB2, glib-2.0 >= 2.38 gio-2.0 >= 2.38 gthread-2.0 >= 2.38)
PKG_CHECK_MODULES(GLIB2, glib-2.0 >= 2.38 gthread-2.0 >= 2.38)
PKG_CHECK_MODULES(GIO2, gio-2.0 >= 2.38)
GLIB2_CFLAGS="$GLIB2_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_38 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_38"
])

View File

@ -104,7 +104,6 @@ endif
deps = {'spice-protocol' : '>= @0@'.format(spice_protocol_version),
'glib-2.0' : glib_version_info,
'gio-2.0' : glib_version_info,
'gthread-2.0' : glib_version_info,
'pixman-1' : '>= 0.17.7',
'openssl' : '>= 1.0.0'}
@ -113,6 +112,8 @@ foreach dep, version : deps
spice_common_deps += dependency(dep, version : version)
endforeach
gio2_deps = dependency('gio-2.0', version : glib_version_info)
#
# Non-mandatory/optional dependencies
#

View File

@ -7,7 +7,7 @@ tests = [
'test-ssl-verify',
'test-utils',
]
tests_deps = [spice_common_dep]
tests_deps = [spice_common_dep, gio2_deps]
foreach t : tests
name = t.underscorify()