[glib: 1/2] meson: libmount autodectection



commit b220033cf091eec41c169b3be1165775e762b353
Author: stephane Cerveau <scerveau gmail com>
Date:   Wed Jan 29 11:15:47 2020 +0000

    meson: libmount autodectection
    
    As it can be disabled, it should be automatic as the packahge might be
    unavailable for a given target.

 meson.build       | 6 +++---
 meson_options.txt | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/meson.build b/meson.build
index cbacf0d48..e0553f7ee 100644
--- a/meson.build
+++ b/meson.build
@@ -1923,9 +1923,9 @@ glib_conf.set_quoted('GLIB_LOCALE_DIR', join_paths(glib_datadir, 'locale'))
 # libmount is only used by gio, but we need to fetch the libs to generate the
 # pkg-config file below
 libmount_dep = []
-if host_system == 'linux' and get_option('libmount')
-  libmount_dep = [dependency('mount', version : '>=2.23', required : true)]
-  glib_conf.set('HAVE_LIBMOUNT', 1)
+if host_system == 'linux'
+  libmount_dep = dependency('mount', version : '>=2.23', required : get_option('libmount'))
+  glib_conf.set('HAVE_LIBMOUNT', libmount_dep.found())
 endif
 
 if host_system == 'windows'
diff --git a/meson_options.txt b/meson_options.txt
index 2c831e37e..6c72168dd 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -30,8 +30,8 @@ option('xattr',
        description : 'build with xattr support')
 
 option('libmount',
-       type : 'boolean',
-       value : true,
+       type : 'feature',
+       value : 'auto',
        description : 'build with libmount support')
 
 option('internal_pcre',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]