[vlc-commits] [Git][videolan/vlc][master] modules: meson: make xcb detection always valid

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Feb 18 14:58:10 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
f8cd3e54 by Alexandre Janniaux at 2025-02-18T14:22:41+00:00
modules: meson: make xcb detection always valid

This allows checking that the dependency could be found, in particular
to set the enabled: flags for plugins, without first checking whether
the condition to do the lookup are met.

- - - - -


1 changed file:

- modules/meson.build


Changes:

=====================================
modules/meson.build
=====================================
@@ -11,20 +11,17 @@
 # here that are used by multiple modules in the same subdirectory)
 
 # Check for X C bindings (XCB)
-if (host_system != 'darwin' and host_system != 'windows') or get_option('xcb').enabled()
-    xcb_dep = dependency('xcb', version: '>= 1.6', required: get_option('xcb'))
-    xcb_composite_dep = dependency('xcb-composite', required: get_option('xcb'))
-    xcb_randr_dep = dependency('xcb-randr', version: '>= 1.3', required: get_option('xcb'))
-    xcb_render_dep = dependency('xcb-render', required: get_option('xcb'))
-    xcb_shm_dep = dependency('xcb-shm', version: '>= 1.9.2', required: get_option('xcb'))
-    xcb_xkb_dep = dependency('xcb-xkb', required: get_option('xcb'))
-    xcb_keysyms_dep = dependency('xcb-keysyms', version: '>= 0.3.4', required: get_option('xcb'))
-    xproto_dep = dependency('xproto', required: get_option('xcb'))
-    xcb_damage_dep = dependency('xcb-damage', required: get_option('xcb'))
-    xcb_xfixes_dep = dependency('xcb-xfixes', required: get_option('xcb'))
-else
-    xcb_dep = dependency('', required: false)
-endif
+xcb_auto_option = get_option('xcb').disable_auto_if(host_system == 'darwin' or host_system == 'windows')
+xcb_dep = dependency('xcb', version: '>= 1.6', required: xcb_auto_option)
+xcb_composite_dep = dependency('xcb-composite', required: xcb_auto_option)
+xcb_randr_dep = dependency('xcb-randr', version: '>= 1.3', required: xcb_auto_option)
+xcb_render_dep = dependency('xcb-render', required: xcb_auto_option)
+xcb_shm_dep = dependency('xcb-shm', version: '>= 1.9.2', required: xcb_auto_option)
+xcb_xkb_dep = dependency('xcb-xkb', required: xcb_auto_option)
+xcb_keysyms_dep = dependency('xcb-keysyms', version: '>= 0.3.4', required: xcb_auto_option)
+xproto_dep = dependency('xproto', required: xcb_auto_option)
+xcb_damage_dep = dependency('xcb-damage', required: xcb_auto_option)
+xcb_xfixes_dep = dependency('xcb-xfixes', required: xcb_auto_option)
 
 # Check for Wayland
 if (host_system != 'darwin' and host_system != 'windows') or get_option('xcb').enabled()



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

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f8cd3e546f054f3ddb8c3f2d7260c7b7f5591cf0
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list