[gobject-introspection/wip/meson] meson: Don't look for gio-unix-2.0 on Windows



commit 0e6365e7f9640c0fb40582d63efc741a9a35cecd
Author: Nirbheek Chauhan <nirbheek centricular com>
Date:   Thu Nov 30 22:33:42 2017 +0530

    meson: Don't look for gio-unix-2.0 on Windows
    
    As reported by guruDanny76[1], this was causing meson to always clone
    the glib subproject and fruitlessly try to find gio-unix-2.0, so just
    don't even try.
    
    1. https://github.com/wingtk/gvsbuild/issues/22#issuecomment-348139054

 meson.build |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/meson.build b/meson.build
index 244897c..cd1787c 100644
--- a/meson.build
+++ b/meson.build
@@ -32,7 +32,7 @@ endforeach
 add_project_arguments(['-DHAVE_CONFIG_H'], language: 'c')
 
 gi_hidden_visibility_cflags = []
-if host_machine.system() == 'windows'
+if host_system == 'windows'
   config.set('DLL_EXPORT', true)
   config.set('_GI_EXTERN', '__declspec(dllexport) extern')
   if cc.get_id() != 'msvc'
@@ -59,8 +59,15 @@ gio_dep = dependency('gio-2.0', version : glib_version,
   fallback: ['glib', 'libgio_dep'])
 gmodule_dep = dependency('gmodule-2.0', version : glib_version,
   fallback: ['glib', 'libgmodule_dep'])
-giounix_dep = dependency('gio-unix-2.0', version : glib_version,
-  fallback: ['glib', 'libgiounix_dep'], required: false)
+if host_system != 'windows'
+  giounix_dep = dependency('gio-unix-2.0', version : glib_version,
+    fallback: ['glib', 'libgiounix_dep'])
+else
+  # Don't even try to look for gio-unix-2.0 on Windows because Meson will
+  # fruitlessly try to find it in the glib subproject even when we don't want
+  # it to look in the subproject at all.
+  # XXX: Autotools doesn't build girs for gio-win32-2.0, but maybe we should?
+endif
 libffi_dep = dependency('libffi',
   fallback : ['libffi', 'ffi_dep'])
 


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