mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-24 20:51:10 +00:00
meson: Only use HarfBuzz fallback when needed
The current Meson releases have broken CMake support, meaning that it is likely that HarfBuzz could not be located for Visual Studio builds unless one handcrafts pkg-config files for it, which is both tedious and error-prone. Instead, use the existing mechanism for looking for the HarfBuzz headers and libraries on Visual Studio first when it could not be found via dependency(), and then use the fallback if it still could not be found.
This commit is contained in:
parent
0842d084dd
commit
88086ea91a
@ -376,8 +376,7 @@ 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'])
|
||||||
@ -460,6 +459,11 @@ if cc.get_id() == 'msvc'
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if not harfbuzz_dep.found()
|
||||||
|
harfbuzz_dep = dependency('harfbuzz', version: '>= 0.9', required: false,
|
||||||
|
fallback: ['harfbuzz', 'libharfbuzz_dep'])
|
||||||
|
endif
|
||||||
|
|
||||||
cdata.set('HAVE_HARFBUZZ', harfbuzz_dep.found())
|
cdata.set('HAVE_HARFBUZZ', harfbuzz_dep.found())
|
||||||
cdata.set('HAVE_PANGOFT', pangoft_dep.found())
|
cdata.set('HAVE_PANGOFT', pangoft_dep.found())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user