Merge branch 'nirbheek/meson-fallback-dep-fixes' into 'master'

Misc meson fixes for using subproject dependencies

See merge request GNOME/gtk!232
This commit is contained in:
Timm Bäder 2018-10-24 09:42:12 +00:00
commit 98dd53c2c3
2 changed files with 22 additions and 9 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/subprojects/*/

View File

@ -327,12 +327,8 @@ pango_dep = dependency('pango', version: pango_req,
# Require PangoFT2 if on X11 or wayland # Require PangoFT2 if on X11 or wayland
require_pangoft2 = wayland_enabled or x11_enabled require_pangoft2 = wayland_enabled or x11_enabled
pangoft_dep = dependency('pangoft2', required: require_pangoft2,
if require_pangoft2 fallback : ['pango', 'libpangoft2_dep'])
pangoft_dep = dependency('pangoft2', fallback : ['pango', 'libpangoft2_dep'])
else
pangoft_dep = dependency('pangoft2', required: false)
endif
if pangoft_dep.found() if pangoft_dep.found()
# Need at least 2.7.1 for FT_Get_Var_Design_Coordinates() # Need at least 2.7.1 for FT_Get_Var_Design_Coordinates()
@ -373,7 +369,8 @@ pixbuf_dep = dependency('gdk-pixbuf-2.0', version: gdk_pixbuf_req,
epoxy_dep = dependency('epoxy', version: epoxy_req, epoxy_dep = dependency('epoxy', version: epoxy_req,
fallback: ['libepoxy', 'libepoxy_dep']) fallback: ['libepoxy', 'libepoxy_dep'])
atk_dep = dependency('atk', version: atk_req) atk_dep = dependency('atk', version: atk_req)
harfbuzz_dep = dependency('harfbuzz', version: '>= 0.9', required: false) harfbuzz_dep = dependency('harfbuzz', version: '>= 0.9', required: false,
fallback: ['harfbuzz', 'libharfbuzz_dep'])
xkbdep = dependency('xkbcommon', version: xkbcommon_req, required: wayland_enabled) xkbdep = dependency('xkbcommon', version: xkbcommon_req, required: wayland_enabled)
graphene_dep = dependency('graphene-gobject-1.0', version: graphene_req, graphene_dep = dependency('graphene-gobject-1.0', version: graphene_req,
fallback: ['graphene', 'graphene_dep']) fallback: ['graphene', 'graphene_dep'])
@ -590,9 +587,24 @@ endif
# Check for bind_textdomain_codeset, including -lintl if GLib brings it in by # Check for bind_textdomain_codeset, including -lintl if GLib brings it in by
# doing the same check as glib. We can't check that by linking to glib because # doing the same check as glib. We can't check that by linking to glib because
# it might be a subproject and hence not built yet. # it might be a subproject and hence not built yet.
libintl_dep = cc.find_library('intl', required : false) if cc.has_function('ngettext')
if cc.has_function('bind_textdomain_codeset', dependencies: libintl_dep) libintl_dep = []
cdata.set('HAVE_BIND_TEXTDOMAIN_CODESET', 1) cdata.set('HAVE_BIND_TEXTDOMAIN_CODESET', 1)
else
libintl_dep = cc.find_library('intl', required : false)
if cc.has_function('bind_textdomain_codeset', dependencies: libintl_dep)
cdata.set('HAVE_BIND_TEXTDOMAIN_CODESET', 1)
else
# Don't use subproject('proxy-libintl').get_variable('intl_dep') because that
# makes the dependency unconditional. This way, people have the option of
# either not providing the subproject or disabling it entirely with
# --wrap-mode=nodownload or nofallback.
libintl_dep = dependency('', required : false,
fallback: ['proxy-libintl', 'intl_dep'])
if libintl_dep.found()
cdata.set('HAVE_BIND_TEXTDOMAIN_CODESET', 1)
endif
endif
endif endif
if os_unix if os_unix