[glade/glade-3-36.msvc: 3/18] Meson: Make finding libxml2 easier on Visual Studio



commit 86a3f62a115c3955bea0272114e05654e38ef02c
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Jun 3 19:16:10 2020 +0800

    Meson: Make finding libxml2 easier on Visual Studio
    
    The build files for libxml2 for Visual Studio do not generate pkg-config
    files for us, so look for the libxml2 library manually if finding it via
    pkg-config file failed on Visual Studio-style builds.

 meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 59d2ac52..7dcacb93 100644
--- a/meson.build
+++ b/meson.build
@@ -101,7 +101,11 @@ glib_dep = dependency('glib-2.0', version: '>= 2.53.2')
 gmodule_dep = dependency('gmodule-2.0')
 gmodule_export_dep = dependency('gmodule-export-2.0')
 gtk_dep = dependency('gtk+-3.0', version: '>= 3.22.0')
-libxml_dep = dependency('libxml-2.0', version: '>= 2.4.0')
+libxml_dep = dependency('libxml-2.0', version: '>= 2.4.0', required: cc.get_argument_syntax() != 'msvc')
+
+if not libxml_dep.found()
+  libxml_dep = cc.find_library('libxml2')
+endif
 
 m_dep = cc.find_library('m', required: false)
 


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