From ace4d252e5560e5f2dce25d8469af8dba482dab0 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Mon, 2 Oct 2023 11:36:20 -0500 Subject: [PATCH] meson: declare libmpv as a dependency and override it This allows libmpv users to build it as a subproject easily, i.e. meson setup build --force-fallback-for=mpv -Dmpv:libmpv=true, if the mpv source is in the subprojects directory. Mainly useful for development. --- meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meson.build b/meson.build index fb167790e0727..6806105caaa78 100644 --- a/meson.build +++ b/meson.build @@ -1740,6 +1740,10 @@ if get_option('libmpv') headers = ['libmpv/client.h', 'libmpv/render.h', 'libmpv/render_gl.h', 'libmpv/stream_cb.h'] install_headers(headers, subdir: 'mpv') + + # Allow projects to build with libmpv by cloning into ./subprojects/mpv + libmpv_dep = declare_dependency(link_with: libmpv) + meson.override_dependency('mpv', libmpv_dep) endif if get_option('cplayer')