From 05dcac55f96bbd0f42a7dd0ca401413e5222336c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 28 Nov 2022 22:09:48 +0100 Subject: [PATCH] lib/fmt: add meson.build --- meson.build | 10 +--------- src/lib/fmt/meson.build | 13 +++++++++++++ 2 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 src/lib/fmt/meson.build diff --git a/meson.build b/meson.build index acde4acbd..8fae08362 100644 --- a/meson.build +++ b/meson.build @@ -248,15 +248,7 @@ if boost_dep.version() == '1.67' warning('Your Boost version 1.67 is known to be buggy, and the MPD build will fail. Please upgrade to Boost 1.68 or later.') endif -fmt_dep = dependency('fmt', version: '>= 7', fallback: ['fmt', 'fmt_dep']) - -if compiler.get_id() == 'clang' and compiler.version().version_compare('<15') - fmt_dep = declare_dependency( - dependencies: fmt_dep, - # suppress bogus clang 14 warning (the version in Android NDK r25b) - compile_args: ['-Wno-unused-local-typedef'], - ) -endif +subdir('src/lib/fmt') log = static_library( 'log', diff --git a/src/lib/fmt/meson.build b/src/lib/fmt/meson.build new file mode 100644 index 000000000..66007743e --- /dev/null +++ b/src/lib/fmt/meson.build @@ -0,0 +1,13 @@ +libfmt = dependency('fmt', version: '>= 7', fallback: ['fmt', 'fmt_dep']) + +if compiler.get_id() == 'clang' and compiler.version().version_compare('<15') + libfmt = declare_dependency( + dependencies: libfmt, + # suppress bogus clang 14 warning (the version in Android NDK r25b) + compile_args: ['-Wno-unused-local-typedef'], + ) +endif + +fmt_dep = declare_dependency( + dependencies: libfmt, +)