[vlc-commits] [Git][videolan/vlc][master] meson: add disable_modules and enable_modules options

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sun Nov 15 21:19:49 UTC 2026



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
728ab921 by Arthur Vasseur at 2026-11-15T21:52:13+01:00
meson: add disable_modules and enable_modules options

- - - - -


2 changed files:

- meson_options.txt
- modules/meson.build


Changes:

=====================================
meson_options.txt
=====================================
@@ -144,6 +144,16 @@ option('adaptive',
     value : 'auto',
     description : 'Adaptive streaming (DASH/HLS/Smooth) demux module')
 
+option('disable_modules',
+    type : 'array',
+    value : [],
+    description : 'Names of the modules to not build, or \'all\' to disable every module (see also enable_modules)')
+
+option('enable_modules',
+    type : 'array',
+    value : [],
+    description : 'Names of the modules to build even when listed in disable_modules, or when \'all\' is disabled')
+
 # Dependency options
 option('chromecast',
     type : 'feature',


=====================================
modules/meson.build
=====================================
@@ -443,6 +443,11 @@ endif
 vlc_plugins_targets = {}
 vlc_plugins_targets_array = []
 vlc_plugins_manifest = {}
+
+disabled_modules = get_option('disable_modules')
+enabled_modules = get_option('enable_modules')
+disable_all_modules = 'all' in disabled_modules
+
 foreach module : vlc_modules
     if not module.has_key('name')
         error('Got invalid vlc_modules entry without \'name\' key')
@@ -487,6 +492,14 @@ foreach module : vlc_modules
         continue
     endif
 
+    if (disable_all_modules or module['name'] in disabled_modules) \
+       and module['name'] not in enabled_modules
+        vlc_plugins_manifest += {
+            module['name']: module + { 'enabled': false }
+        }
+        continue
+    endif
+
     common_args = [
         '-DMODULE_STRING="@0@"'.format(module['name']),
         '-DVLC_DYNAMIC_PLUGIN'
@@ -548,6 +561,13 @@ foreach module : vlc_modules
     vlc_plugins_targets_array += vlc_plugin
 endforeach
 
+foreach name : disabled_modules + enabled_modules
+    if name != 'all' and name not in vlc_plugins_manifest
+        warning('Unknown module \'@0@\' in disable_modules/enable_modules'
+            .format(name))
+    endif
+endforeach
+
 # Rust/cargo common handling code
 if get_option('rust').enabled()
     if get_option('vendored_rust_deps') != 'no'



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/728ab921c2ce4010014f1f25c49501c246cecfb7

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/728ab921c2ce4010014f1f25c49501c246cecfb7
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