[gtksourceview/meson.msvc.cleanups: 1/4] meson.build: Clean up MSVC libxml search
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/meson.msvc.cleanups: 1/4] meson.build: Clean up MSVC libxml search
- Date: Thu, 21 Nov 2019 04:45:54 +0000 (UTC)
commit 9d13641bdd2cd80a1c7c20181cc956de7409d19a
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Thu Nov 21 11:47:32 2019 +0800
meson.build: Clean up MSVC libxml search
Bump the required Meson version to 0.50.0 and use the has_headers
sub-method of cc.find_library(), so that things are cleaner for this.
meson.build | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/meson.build b/meson.build
index d1f83412..43cb8c4f 100644
--- a/meson.build
+++ b/meson.build
@@ -1,7 +1,7 @@
project('gtksourceview', 'c',
version: '4.5.1',
license: 'LGPL-2.1-or-later',
- meson_version: '>= 0.49.0',
+ meson_version: '>= 0.50.0',
default_options: [ 'c_std=gnu99',
'buildtype=debugoptimized',
'warning_level=2' ],
@@ -117,15 +117,7 @@ endif
# for us. Remove once Meson gains the ability to declare
# deps in a declarative way
if cc.get_id() == 'msvc' and not libxml_dep.found()
- libxml_headers = ['xmlreader', 'parser']
- libxml_headers_missing = false
- foreach h: libxml_headers
- if not cc.has_header('libxml/@0@.h'.format(h))
- libxml_headers_missing = true
- endif
- endforeach
- assert(not libxml_headers_missing, 'The libxml2 headers and libs are required')
- libxml_dep = cc.find_library('libxml2')
+ libxml_dep = cc.find_library('libxml2', has_headers: ['libxml/xmlreader.h', 'libxml/parser.h'])
endif
xmllint_prg = find_program('xmllint', required: false)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]