diff mbox series

[v4l-utils,v1] meson: remove two pre-0.60 workarounds

Message ID 20241121083736.16439-1-ps.report@gmx.net (mailing list archive)
State New
Headers show
Series [v4l-utils,v1] meson: remove two pre-0.60 workarounds | expand

Commit Message

Peter Seiderer Nov. 21, 2024, 8:37 a.m. UTC
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'}

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 meson.build                | 3 +--
 utils/keytable/meson.build | 7 +------
 2 files changed, 2 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/meson.build b/meson.build
index a8843c8f..aad8a794 100644
--- a/meson.build
+++ b/meson.build
@@ -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')
diff --git a/utils/keytable/meson.build b/utils/keytable/meson.build
index c02d4ea9..e214e0b5 100644
--- a/utils/keytable/meson.build
+++ b/utils/keytable/meson.build
@@ -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')