[vlc-commits] [Git][videolan/vlc][master] meson: refactor link_language usage

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Jan 22 17:08:01 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
af374ba7 by Alexandre Janniaux at 2024-01-22T16:53:25+00:00
meson: refactor link_language usage

Refactor the way link_language is specified to ensure a correct value
(the default one or the one provided by the module) is always used.
Before, [] was allowed as a default value to fallback to meson
autodetection but it has been removed when link_language and other
kwargs have been typed[^1] in the interpreter, leading to the followin
error in meson 1.3.1

    ../modules/meson.build:295:17: ERROR: library keyword argument 'link_language' was of type array[] but should have been one of: str, NoneType

[^1]: https://github.com/mesonbuild/meson/commit/0f23dc5b03fda2e8958903eb25587a7e4e2daa67

- - - - -


1 changed file:

- modules/meson.build


Changes:

=====================================
modules/meson.build
=====================================
@@ -292,13 +292,18 @@ foreach module : vlc_modules
         '-DVLC_DYNAMIC_PLUGIN'
     ]
 
+    kwargs = {}
+
+    if module.has_key('link_language')
+      kwargs += { link_language: module.get('link_language') }
+    endif
+
     vlc_plugin = library(
         module['name'] + '_plugin',
         module['sources'],
         link_with: [module.get('link_with', []), vlc_libcompat],
         link_args: module.get('link_args', []),
         link_depends: module.get('link_depends', []),
-        link_language: module.get('link_language', []),
         include_directories: [module.get('include_directories', []), vlc_include_dirs],
         dependencies: [module.get('dependencies', []), libvlccore_dep],
         c_args: [module.get('c_args', []), common_args],
@@ -306,7 +311,8 @@ foreach module : vlc_modules
         objc_args: [module.get('objc_args', []), common_args],
         build_by_default: true,
         install: true,
-        install_dir: get_option('libdir') / 'vlc/plugins'
+        install_dir: get_option('libdir') / 'vlc/plugins',
+        kwargs: kwargs
     )
     vlc_plugins_targets += {
         module['name']: vlc_plugin



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

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