diff options
author | Richard Hughes <richard@hughsie.com> | 2017-12-14 14:09:38 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2017-12-14 14:09:38 +0000 |
commit | f7a064e4509d7f24d57d39a71ecde90292de9a3b (patch) | |
tree | 5ca8ae5028e6fa53240dbdd3e0c63548bd20f635 | |
parent | 12034745755ec289b698882d37feb1b67d73e5d3 (diff) | |
download | appstream-glib-f7a064e4509d7f24d57d39a71ecde90292de9a3b.tar.gz |
Fix compile with GCab v1.0
-rw-r--r-- | libappstream-glib/as-store-cab.c | 2 | ||||
-rw-r--r-- | meson.build | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/libappstream-glib/as-store-cab.c b/libappstream-glib/as-store-cab.c index 3979118..9fcc317 100644 --- a/libappstream-glib/as-store-cab.c +++ b/libappstream-glib/as-store-cab.c @@ -28,7 +28,7 @@ #include "as-store-cab.h" #include "as-utils.h" -#ifndef GCabCabinet_autoptr +#ifndef HAVE_GCAB_1_0 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GCabCabinet, g_object_unref) #endif diff --git a/meson.build b/meson.build index be0fc20..0ab3a85 100644 --- a/meson.build +++ b/meson.build @@ -58,6 +58,9 @@ soup = dependency('libsoup-2.4', version : '>= 2.51.92') json_glib = dependency('json-glib-1.0') gdkpixbuf = dependency('gdk-pixbuf-2.0', version : '>= 2.31.5') libgcab = dependency('libgcab-1.0', required : false) +if libgcab.version().version_compare('>= 1.0') + conf.set('HAVE_GCAB_1_0', '1') +endif if libgcab.found() conf.set('HAVE_GCAB', 1) |