On 3/15/22 05:47, Kshitij Suri wrote:
+png = dependency('libpng', required: get_option('png'),
+ method: 'pkg-config', kwargs: static_kwargs)
The full way to write it would be:
png = not_found
if get_option('png').allowed() and have_system
png = dependency('libpng', required: get_option('png'),
method: 'pkg-config', kwargs: static_kwargs)
endif
but we can now also use
png = dependency('libpng',
required: get_option('png').disable_auto_if(not have_system),
method: 'pkg-config', kwargs: static_kwargs)
Use the one that you prefer.
Paolo