From 023d4bca2707063bdbf44dc545021b3fced84974 Mon Sep 17 00:00:00 2001 From: apoorv569 Date: Fri, 8 Dec 2023 02:21:03 +0530 Subject: [PATCH] Only clone libsndfile and spdlog if not available on system --- meson.build | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/meson.build b/meson.build index 1310fa5..35ca345 100755 --- a/meson.build +++ b/meson.build @@ -263,16 +263,19 @@ if not yaml.found() yaml = yaml_subproject.dependency('yaml-cpp') endif -snd_subproject = cmake.subproject('libsndfile', options: snd_opts) -snd = snd_subproject.dependency('sndfile') +snd = dependency('sndfile', version: '>=1.2.0', required: false) +if not snd.found() + snd_subproject = cmake.subproject('libsndfile', options: snd_opts) + snd = snd_subproject.dependency('sndfile') +endif -spdlog_subproject = subproject('spdlog', - default_options: [ - 'default_library=static', - 'compile_library=true',]) +spdlog = dependency('spdlog', version: '>=1.12.0', required: false) -spdlog = spdlog_subproject.get_variable('spdlog_dep') +if not spdlog.found() + spdlog_subproject = cmake.subproject('spdlog', options: spdlog_opts) + spdlog = spdlog_subproject.dependency('spdlog') +endif aubio = dependency('aubio', version: '>=0.4.9', required: false)