[Spice-commits] common/Makefile.am common/meson.build m4/spice-deps.m4 meson.build tests/meson.build

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 29 04:25:50 UTC 2020


 common/Makefile.am |    4 ++++
 common/meson.build |    4 ++--
 m4/spice-deps.m4   |    3 ++-
 meson.build        |    3 ++-
 tests/meson.build  |    2 +-
 5 files changed, 11 insertions(+), 5 deletions(-)

New commits:
commit 7a84f60267d7ae35041cb7d9c90df00543745f9c
Author: Frediano Ziglio <freddy77 at gmail.com>
Date:   Wed Apr 22 17:08:04 2020 +0100

    build: Remove dependency to gio2 from common and server libraries
    
    The dependency is required only for client part.
    
    Signed-off-by: Frediano Ziglio <freddy77 at gmail.com>

diff --git a/common/Makefile.am b/common/Makefile.am
index 5200c81..1318400 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -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)
diff --git a/common/meson.build b/common/meson.build
index 20263c8..09e3ea7 100644
--- a/common/meson.build
+++ b/common/meson.build
@@ -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
 
 #
diff --git a/m4/spice-deps.m4 b/m4/spice-deps.m4
index d8c3254..265b17d 100644
--- a/m4/spice-deps.m4
+++ b/m4/spice-deps.m4
@@ -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"
 ])
 
diff --git a/meson.build b/meson.build
index 31940d9..eb1cf31 100644
--- a/meson.build
+++ b/meson.build
@@ -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
 #
diff --git a/tests/meson.build b/tests/meson.build
index ddadfcc..bd53565 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -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()


More information about the Spice-commits mailing list