From 869191566a8c58c236051b1cee6b8920b9e047c0 Mon Sep 17 00:00:00 2001 From: Alex James Date: Thu, 28 Nov 2024 18:03:36 -0600 Subject: [PATCH] meson: Support system-provided vapoursynth Meson unconditionally uses headers from the wrapped vapoursynth subproject when the vapoursynth option is enabled. Update meson.build to support using system-provided vapoursynth headers. --- meson.build | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index e44530e66..40355c5ff 100644 --- a/meson.build +++ b/meson.build @@ -283,8 +283,13 @@ endif if get_option('vapoursynth').enabled() conf.set('WITH_VAPOURSYNTH', 1) - vs_sub = subproject('vapoursynth') - deps_inc += vs_sub.get_variable('vs_inc') + vs_dep = dependency('vapoursynth', required: false) + if vs_dep.found() + deps_inc += vs_dep.get_variable('includedir') + else + vs_sub = subproject('vapoursynth') + deps_inc += vs_sub.get_variable('vs_inc') + endif dep_avail += 'VapourSynth' endif