meson: Support graphene as a fallback dependency

Don't assume graphene_dep is always a pkg-config dependency.

Closes https://gitlab.gnome.org/GNOME/gtk/issues/1197
This commit is contained in:
Nirbheek Chauhan 2018-07-07 00:23:06 +05:30
parent 5df4d27752
commit b343abfa51

View File

@ -640,8 +640,15 @@ if cloudproviders_enabled
endif
endif
graphene_has_sse2 = graphene_dep.get_pkgconfig_variable('graphene_has_sse2') == '1'
graphene_has_gcc = graphene_dep.get_pkgconfig_variable('graphene_has_gcc') == '1'
graphene_dep_type = graphene_dep.type_name()
if graphene_dep_type == 'pkgconfig'
graphene_has_sse2 = graphene_dep.get_pkgconfig_variable('graphene_has_sse2') == '1'
graphene_has_gcc = graphene_dep.get_pkgconfig_variable('graphene_has_gcc') == '1'
else
graphene_simd = subproject('graphene').get_variable('graphene_simd')
graphene_has_sse2 = graphene_simd.contains('sse2')
graphene_has_gcc = graphene_simd.contains('gcc')
endif
malloc_is_aligned = false