Commit 17f60286 authored by Xavier Claessens's avatar Xavier Claessens
Browse files

meson: Add fallback for pcre2 and xml2

When building on Windows those 2 dependencies are usually not available,
but Meson can build them as subproject. Simply run 'meson wrap install
pcre2' and 'meson wrap install libxml2'

gtk4 and all its dependencies can also be built as subproject if adding
a gtk4.wrap file. With those gtksourceview and all its deps can fully
build on Windows with MSVC.
parent 300fa5a0
......@@ -84,11 +84,13 @@ glib_dep = dependency('glib-2.0', version: glib_req)
gobject_dep = dependency('gobject-2.0', version: glib_req)
gio_dep = dependency('gio-2.0', version: glib_req)
gtk_dep = dependency('gtk4', version: gtk_req)
libxml_dep = dependency('libxml-2.0', version: libxml_req, required: cc.get_id() != 'msvc')
libxml_dep = dependency('libxml-2.0', version: libxml_req,
fallback : ['libxml2', 'xml2lib_dep'])
fribidi_dep = dependency('fribidi', version: fribidi_req)
fontconfig_dep = dependency('fontconfig', required: false)
pangoft2_dep = dependency('pangoft2', required: false)
pcre2_dep = dependency('libpcre2-8', version: pcre2_req)
pcre2_dep = dependency('libpcre2-8', version: pcre2_req,
fallback : ['pcre2', 'libpcre2_8'])
gtk_quartz_dep = dependency('gtk4-quartz', version: gtk_doc_req, required: false)
......@@ -110,15 +112,6 @@ else
gtk_doc_dep = []
# Look for the libxml2 library manually on Visual Studio if
# its pkg-config file could not be found, as the NMake
# Makefiles of libxml2 do not generate the pkg-config files
# 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_dep = cc.find_library('libxml2', has_headers: ['libxml/xmlreader.h', 'libxml/parser.h'])
xmllint_prg = find_program('xmllint', required: false)
glib_version_arr = glib_req_version.split('.')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment