Only clone libsndfile and spdlog if not available on system

This commit is contained in:
apoorv569 2023-12-08 02:21:03 +05:30
parent 0f1700fcdc
commit 023d4bca27
1 changed files with 10 additions and 7 deletions

View File

@ -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)