[vlc-commits] [Git][videolan/vlc][master] libvlc: meson: expose a public dependency object

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Jun 2 13:47:15 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
5d957344 by Alaric Senat at 2026-06-02T13:33:30+00:00
libvlc: meson: expose a public dependency object

This is helps a lot with using libvlc via the meson subproject system.
Meson expects its subprojects to declare a public dependency object that
contains all the requirements to build it.

The `override_dependency` call maps the dependency objects in meson's
global dependency name registry allowing the top-project to lookup like
a native dependency, eg. `libvlc_dep = dependency('libvlc')`.

This mechanism is already used by libvlcpp as a side patch. [^1]

[^1]: <https://code.videolan.org/videolan/libvlcpp/-/blob/master/subprojects/packagefiles/libvlc/declare-libvlc-dependency.patch?ref_type=heads>

- - - - -


1 changed file:

- lib/meson.build


Changes:

=====================================
lib/meson.build
=====================================
@@ -30,3 +30,12 @@ libvlc = library('vlc',
     dependencies: [libvlccore_dep, m_lib, threads_dep],
     install: true
 )
+
+# Publicly exported dependency object. Used when libvlc is wrapped in a meson
+# subproject.
+libvlc_dep = declare_dependency(
+    link_with: libvlc,
+    include_directories: include_directories('../include'),
+)
+
+meson.override_dependency('libvlc', libvlc_dep)



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5d95734488f044b1576b600f848ccd7475513a8d

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5d95734488f044b1576b600f848ccd7475513a8d
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list