meson: add subproject wraps for dependencies
This commit is contained in:
parent
920efc0ef7
commit
fce88f9905
29
meson.build
29
meson.build
|
@ -30,21 +30,17 @@ check_freetype_funcs = [
|
|||
['FT_Done_MM_Var'],
|
||||
]
|
||||
|
||||
check_alignofs = [
|
||||
['struct{char;}', {'conf-name': 'ALIGNOF_STRUCT_CHAR__'}]
|
||||
]
|
||||
|
||||
freetype_dep = dependency('freetype2', required: false)
|
||||
glib_dep = dependency('glib-2.0', required: false)
|
||||
gobject_dep = dependency('gobject-2.0', required: false)
|
||||
freetype_dep = dependency('freetype2', required: false, fallback: ['freetype2', 'freetype_dep'])
|
||||
glib_dep = dependency('glib-2.0', required: false, fallback: ['glib', 'libglib_dep'])
|
||||
gobject_dep = dependency('gobject-2.0', required: false, fallback: ['glib', 'libgobject_dep'])
|
||||
cairo_dep = dependency('cairo', required: false)
|
||||
cairo_ft_dep = dependency('cairo-ft', required: false)
|
||||
fontconfig_dep = dependency('fontconfig', required: false)
|
||||
fontconfig_dep = dependency('fontconfig', required: false, fallback: ['fontconfig', 'fontconfig_dep'])
|
||||
graphite2_dep = dependency('graphite2', required: false)
|
||||
icu_dep = dependency('icu-uc', required: false)
|
||||
m_dep = cpp.find_library('m')
|
||||
m_dep = cpp.find_library('m', required: false)
|
||||
|
||||
deps = [m_dep]
|
||||
deps = []
|
||||
|
||||
conf = configuration_data()
|
||||
incbase = include_directories('.')
|
||||
|
@ -56,6 +52,10 @@ warn_cflags = [
|
|||
|
||||
cpp_args += cpp.get_supported_arguments(warn_cflags)
|
||||
|
||||
if m_dep.found()
|
||||
deps += [m_dep]
|
||||
endif
|
||||
|
||||
if glib_dep.found()
|
||||
conf.set('HAVE_GLIB', 1)
|
||||
deps += [glib_dep]
|
||||
|
@ -165,15 +165,6 @@ foreach check : check_funcs
|
|||
endif
|
||||
endforeach
|
||||
|
||||
foreach check : check_alignofs
|
||||
type = check[0]
|
||||
opts = check.length() > 1 ? check[1] : {}
|
||||
|
||||
conf_name = opts.get('conf-name', 'ALIGNOF_@0@'.format(type.to_upper()))
|
||||
|
||||
conf.set(conf_name, cpp.alignment(type))
|
||||
endforeach
|
||||
|
||||
if cpp.links(files('meson-cc-tests/intel-atomic-primitives-test.c'), name: 'Intel atomics')
|
||||
conf.set('HAVE_INTEL_ATOMIC_PRIMITIVES', 1)
|
||||
endif
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
/expat-2.2.5
|
||||
/freetype2
|
||||
/glib
|
||||
/fontconfig
|
||||
/libffi
|
||||
/packagecache
|
|
@ -0,0 +1,10 @@
|
|||
[wrap-file]
|
||||
directory = expat-2.2.5
|
||||
|
||||
source_url = https://github.com/libexpat/libexpat/releases/download/R_2_2_5/expat-2.2.5.tar.bz2
|
||||
source_filename = expat-2.2.5.tar.bz2
|
||||
source_hash = d9dc32efba7e74f788fcc4f212a43216fc37cf5f23f4c2339664d473353aedf6
|
||||
|
||||
patch_url = https://wrapdb.mesonbuild.com/v1/projects/expat/2.2.5/4/get_zip
|
||||
patch_filename = expat-2.2.5-4-wrap.zip
|
||||
patch_hash = 25748839be2bbdd2ff586d1a05aa6fc37aeada75c78416df6e8347a6321abaac
|
|
@ -0,0 +1,5 @@
|
|||
[wrap-git]
|
||||
directory=fontconfig
|
||||
url=https://github.com/centricular/fontconfig.git
|
||||
push-url=git@github.com:centricular/fontconfig.git
|
||||
revision=meson
|
|
@ -0,0 +1,5 @@
|
|||
[wrap-git]
|
||||
directory=freetype2
|
||||
url=https://github.com/centricular/freetype2.git
|
||||
push-url=git@github.com:centricular/freetype2.git
|
||||
revision=meson
|
|
@ -0,0 +1,5 @@
|
|||
[wrap-git]
|
||||
directory=glib
|
||||
url=git://git.gnome.org/glib
|
||||
push-url=ssh://git.gnome.org/git/glib
|
||||
revision=master
|
|
@ -0,0 +1,4 @@
|
|||
[wrap-git]
|
||||
directory=libffi
|
||||
url=https://github.com/centricular/libffi.git
|
||||
revision=meson
|
Loading…
Reference in New Issue