[Spice-devel] [PATCH spice-gtk 20/34] meson: switch lz4 option to auto feature

marcandre.lureau at redhat.com marcandre.lureau at redhat.com
Mon Jan 7 08:00:49 UTC 2019


From: Marc-André Lureau <marcandre.lureau at redhat.com>

Contrary to spice server dependency, spice-gtk doesn't have a known
minimum version requirement.

Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
---
 .gitlab-ci.yml    |  1 -
 meson.build       | 10 +++-------
 meson_options.txt |  3 +--
 3 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 125dbd7..692374a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -45,7 +45,6 @@ makecheck_simple:
 makecheck_simple-meson:
   script:
   - meson build -Dauto_features=disabled
-                -Dlz4=false
                 -Dsasl=false
                 -Dsmartcard=false
                 -Ddbus=false || (cat build/meson-logs/meson-log.txt && exit 1)
diff --git a/meson.build b/meson.build
index 4c9c05c..a5d584d 100644
--- a/meson.build
+++ b/meson.build
@@ -287,13 +287,9 @@ endif
 
 # lz4
 spice_gtk_has_lz4 = false
-if get_option('lz4')
-  lz4_dep = dependency('liblz4', required : false, version : '>= 129')
-  if not lz4_dep.found()
-    lz4_dep = dependency('liblz4', version : '>= 1.7.3')
-  endif
-
-  spice_glib_deps += lz4_dep
+d = dependency('liblz4', required : get_option('lz4'))
+if d.found()
+  spice_glib_deps += d
   spice_gtk_config_data.set('USE_LZ4', '1')
   spice_gtk_has_lz4 = true
 endif
diff --git a/meson_options.txt b/meson_options.txt
index e92f931..abd0b0f 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -63,8 +63,7 @@ option('alignment-checks',
     description : 'Enable runtime checks for cast alignment')
 
 option('lz4',
-    type : 'boolean',
-    value : true,
+    type : 'feature',
     description: 'Enable lz4 compression support')
 
 option('sasl',
-- 
2.20.1.2.gb21ebb671b



More information about the Spice-devel mailing list