Browse Source

add subproject fallbacks for sndfile/samplerate

master
Alexandros Theodotou 3 years ago
parent
commit
82a1728999
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 29
      meson.build
  2. 3
      subprojects/samplerate.wrap
  3. 3
      subprojects/sndfile.wrap

29
meson.build

@ -19,7 +19,7 @@ project ( @@ -19,7 +19,7 @@ project (
'libaudec', ['c'],
version: '0.2.3',
license: 'AGPLv3+',
meson_version: '>= 0.47.0',
meson_version: '>= 0.55.0',
default_options: [
'warning_level=2',
'buildtype=debug',
@ -27,6 +27,10 @@ project ( @@ -27,6 +27,10 @@ project (
],
)
cmake = import ('cmake')
cmake_opts = cmake.subproject_options ()
cmake_opts.add_cmake_defines ({'CMAKE_POSITION_INDEPENDENT_CODE': 'ON'})
srcs = []
subdir('inc')
subdir('src')
@ -141,11 +145,26 @@ endif @@ -141,11 +145,26 @@ endif
audec_cflags = cc.get_supported_arguments (
audec_cflags)
audec_deps = []
samplerate_dep = dependency (
'samplerate', version: '>=0.1.8', required: false)
if not samplerate_dep.found ()
samplerate_subproject = cmake.subproject (
'samplerate', options: cmake_opts)
samplerate_dep = samplerate_subproject.dependency (
'samplerate')
endif
sndfile_dep = dependency (
'sndfile', version: '>=1.0.25', required: false)
if not sndfile_dep.found ()
sndfile_subproject = cmake.subproject (
'sndfile', options: cmake_opts)
sndfile_dep = sndfile_subproject.dependency (
'sndfile')
endif
audec_deps += [
dependency('sndfile', version: '>=1.0.25'),
dependency('samplerate', version: '>=0.1.8'),
audec_deps = [
sndfile_dep,
samplerate_dep,
]
# create config.h and add to deps

3
subprojects/samplerate.wrap

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
[wrap-git]
url = https://github.com/erikd/libsamplerate/
revision = master

3
subprojects/sndfile.wrap

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
[wrap-git]
url = https://github.com/erikd/libsndfile/
revision = v1.0.29
Loading…
Cancel
Save