meson: Format build files according to meson style guide
muon[1], an meson-compatible build system, provides a `fmt` subcommand
to format meson build files in accordance with the meson style guide[2].
[1]: https://muon.build/
[2]: https://mesonbuild.com/Style-guide.html
Apply `muon fmt` using the following to provide consistent formatting:
```
for f in $(git ls-files | grep meson.build)
do
muon fmt $f | sponge $f
done
```
Change-Id: I7ef7693ddf964e9540b2e3e256cdf584fb8ac9cd
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/meson.build b/meson.build
index 927f532..606d987 100644
--- a/meson.build
+++ b/meson.build
@@ -1,11 +1,7 @@
project(
'dbus-sensors',
'cpp',
- default_options: [
- 'warning_level=3',
- 'werror=true',
- 'cpp_std=c++20'
- ],
+ default_options: ['warning_level=3', 'werror=true', 'cpp_std=c++20'],
license: 'Apache-2.0',
version: '0.1',
meson_version: '>=0.58.0',
@@ -40,18 +36,19 @@
cpp = meson.get_compiler('cpp')
build_tests = get_option('tests')
-gpiodcxx = dependency('libgpiodcxx',
+gpiodcxx = dependency(
+ 'libgpiodcxx',
default_options: ['bindings=cxx'],
)
# i2c-tools doesn't ship a pkg-config file for libi2c
i2c = meson.get_compiler('cpp').find_library('i2c')
-sdbusplus = dependency('sdbusplus', required : false, include_type: 'system')
+sdbusplus = dependency('sdbusplus', required: false, include_type: 'system')
if not sdbusplus.found()
- sdbusplus_proj = subproject('sdbusplus', required: true)
- sdbusplus = sdbusplus_proj.get_variable('sdbusplus_dep')
- sdbusplus = sdbusplus.as_system('system')
+ sdbusplus_proj = subproject('sdbusplus', required: true)
+ sdbusplus = sdbusplus_proj.get_variable('sdbusplus_dep')
+ sdbusplus = sdbusplus.as_system('system')
endif
phosphor_logging_dep = dependency('phosphor-logging')
@@ -60,22 +57,31 @@
systemd = dependency('systemd')
systemd_system_unit_dir = systemd.get_variable(
'systemdsystemunitdir',
- pkgconfig_define: ['prefix', get_option('prefix')])
+ pkgconfig_define: ['prefix', get_option('prefix')],
+)
threads = dependency('threads')
-boost = dependency('boost',version : '>=1.79.0', required : false, include_type: 'system')
+boost = dependency(
+ 'boost',
+ version: '>=1.79.0',
+ required: false,
+ include_type: 'system',
+)
if not boost.found()
- subproject('boost', required: false)
- boost_inc = include_directories('subprojects/boost_1_79_0/', is_system:true)
- boost = declare_dependency(include_directories : boost_inc)
- boost = boost.as_system('system')
+ subproject('boost', required: false)
+ boost_inc = include_directories(
+ 'subprojects/boost_1_79_0/',
+ is_system: true,
+ )
+ boost = declare_dependency(include_directories: boost_inc)
+ boost = boost.as_system('system')
endif
-uring = dependency('liburing', required : false, include_type: 'system')
+uring = dependency('liburing', required: false, include_type: 'system')
if not uring.found()
- uring_proj = subproject('liburing', required: true)
- uring = uring_proj.get_variable('uring')
- uring = uring.as_system('system')
+ uring_proj = subproject('liburing', required: true)
+ uring = uring_proj.get_variable('uring')
+ uring = uring.as_system('system')
endif
default_deps = [