Skip to contentSkip to conversation

meson: remove two pre-0.60 workarounds

PATCH New Peter Seiderer 1 participant 1 message Nov 21, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meson: remove two pre-0.60 workarounds

Now as the meson required version is bumped to 0.60 it is time to remove two pre-0.60 workarounds:

- use meson.project_source_root() instead of meson.current_source_dir() as suggested in comment for meson >= 0.56

- use install_emptydir instead of install_subdir as suggested in comment for meson >= 0.60, fixes the following warnings:

utils/keytable/meson.build:89: WARNING: Project targets '>= 0.60' but uses feature deprecated since '0.60.0': install_subdir with empty directory. It worked by accident and is buggy. Use install_emptydir instead.
WARNING: Deprecated features used:
* 0.60.0: {'install_subdir with empty directory'}

---
 meson.build                | 3 +--
 utils/keytable/meson.build | 7 +------
 2 files changed, 2 insertions(+), 8 deletions(-)
meson.build +1 -2
index a8843c8f..aad8a794 100644
@@ -9,8 +9,7 @@ project('v4l-utils', 'c', 'cpp',
     ],
     license : 'LGPL 2.1+')
 
-# meson >= 0.56 can use instead meson.project_source_root()
-source_root = meson.current_source_dir()
+source_root = meson.project_source_root()
 
 cc = meson.get_compiler('c')
 cpp = meson.get_compiler('cpp')
utils/keytable/meson.build +1 -6
index c02d4ea9..e214e0b5 100644
@@ -82,9 +82,4 @@ endif
 endif
 endif
 
-# Install non-existing directory to create empty directory structure
-# See: https://github.com/mesonbuild/meson/issues/2904
-# This should be replaced with install_emptydir() when bumping the minimum meson
-# version to 0.60.0.
-install_subdir('protocols',
-               install_dir : ir_keytable_user_dir)
+install_emptydir(ir_keytable_user_dir / 'protocols')
Signature · 1 line
2.47.0