meson: Use cc.has_define instead of cc.get_define for variables that may be undefined

Fixes the message:

  Fetching value of define "DEBUG_SVG_RENDER" : (undefined)
This commit is contained in:
Adrian Johnson 2024-06-01 21:17:52 +09:30
parent 4f38b502e5
commit b00db10ae8

View file

@ -696,6 +696,6 @@ test('cairo', exe,
# The SVG renderer debug tools can only be built if the _cairo_debug_svg_render()
# function has been exposed by defining DEBUG_SVG_RENDER
if conf.get('HAVE_FT_SVG_DOCUMENT', 0) == 1 and cc.get_define('DEBUG_SVG_RENDER') != ''
if conf.get('HAVE_FT_SVG_DOCUMENT', 0) == 1 and cc.has_define('DEBUG_SVG_RENDER')
subdir('svg')
endif