[glib] meson: skip optional linux deps that default to true when building on Windows



commit 7c8906dcdabf30ac248e0f6838f71a3af9645aa5
Author: Tim-Philipp Müller <tim centricular com>
Date:   Mon Dec 25 22:17:49 2017 +0100

    meson: skip optional linux deps that default to true when building on Windows
    
    As 'auto' dependency checking has been declared undesirable,
    skip checking of optional dependencies where the option
    defaults to true, but where the option doesn't make sense for
    the operating system we're building for. Example: selinux only
    makes sense on Linux, people compiling on Windows or macOS
    shouldn't have to specify -Dselinux=false to get glib to build.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=792129

 meson.build |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/meson.build b/meson.build
index 7039892..d99eda3 100644
--- a/meson.build
+++ b/meson.build
@@ -1510,7 +1510,7 @@ xgettext = find_program('xgettext', required : false)
 # libmount is only used by gio, but we need to fetch the libs to generate the
 # pkg-config file below
 libmount_dep = []
-if get_option('libmount')
+if host_system == 'linux' and get_option('libmount')
   libmount_dep = [dependency('mount', version : '>=2.28', required : false)]
   if not libmount_dep[0].found()
     libmount_dep = [cc.find_library('mount', required : true)]
@@ -1525,14 +1525,14 @@ if host_system == 'windows'
 endif
 
 selinux_dep = []
-if get_option('selinux')
+if host_system == 'linux' and get_option('selinux')
   selinux_dep = [dependency('libselinux')]
   glib_conf.set('SELINUX_LIBS', '-lselinux')
   glib_conf.set('HAVE_SELINUX', 1)
 endif
 
 xattr_dep = []
-if get_option('xattr')
+if host_system != 'windows' and get_option('xattr')
   # either glibc or libattr can provide xattr support
   # for both of them, we check for getxattr being in
   # the library and a valid xattr header.


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