Skip to content
Snippets Groups Projects
Verified Commit 39f68ce3 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller Committed by Jean-Marc Valin
Browse files

meson: fix build for lpcnet additions

parent 82b945ea
No related branches found
No related tags found
No related merge requests found
......@@ -95,8 +95,9 @@ cmake:
apt-get install -y ninja-build doxygen meson git
- !reference [.snippets, git_prep]
script:
- ./autogen.sh
- mkdir builddir
- meson setup -Dtests=enabled -Ddocs=enabled -Dbuildtype=release builddir ${MESON_EXTRA_ARGS}
- meson setup -Dtests=enabled -Ddocs=enabled -Dbuildtype=release builddir
- meson compile -C builddir
- meson test -C builddir
#- meson dist --no-tests -C builddir
......
......@@ -14,7 +14,7 @@ host_cpu_family = host_machine.cpu_family()
top_srcdir = meson.current_source_dir()
top_builddir = meson.current_build_dir()
opus_includes = include_directories('.', 'include', 'celt', 'silk')
opus_includes = include_directories('.', 'include', 'celt', 'silk', 'lpcnet/include')
opus_public_includes = include_directories('include')
add_project_arguments('-DOPUS_BUILD', language: 'c')
......@@ -563,7 +563,12 @@ else
endif
# extract source file lists from .mk files
mk_files = ['silk_sources.mk', 'opus_headers.mk', 'opus_sources.mk', 'silk_headers.mk', 'celt_sources.mk', 'celt_headers.mk']
mk_files = [
'opus_headers.mk', 'opus_sources.mk',
'silk_headers.mk', 'silk_sources.mk',
'celt_sources.mk', 'celt_headers.mk',
'lpcnet_headers.mk', 'lpcnet_sources.mk',
]
lines = run_command('meson/read-sources-list.py', mk_files, check: true).stdout().strip().split('\n')
sources = {}
foreach l : lines
......
......@@ -54,10 +54,30 @@ if host_machine.system() == 'windows'
silk_c_args += ['-DDLL_EXPORT']
endif
# ----------------------- lpcnet ---------------------------------------------
# Perhaps this should be moved into lpcnet itself
lpcnet_sources = sources['LPCNET_SOURCES']
lpcnet_includes = [opus_includes, include_directories('../lpcnet/include')]
lpcnet_c_args = []
if host_machine.system() == 'windows'
lpcnet_c_args += ['-DDLL_EXPORT']
endif
lpcnet_lib = static_library('silk-lpcnet',
lpcnet_sources,
c_args: lpcnet_c_args,
include_directories: lpcnet_includes,
dependencies: libm,
install: false)
# ----------------------- lpcnet ---------------------------------------------
silk_lib = static_library('opus-silk',
silk_sources,
c_args: silk_c_args,
include_directories: silk_includes,
link_whole: silk_static_libs,
link_whole: [silk_static_libs, lpcnet_lib],
dependencies: libm,
install: false)
......@@ -17,7 +17,7 @@ opus_lib = library('opus',
darwin_versions: macosversion,
c_args: opus_lib_c_args,
include_directories: opus_includes,
link_with: [celt_lib, silk_lib],
link_whole: [celt_lib, silk_lib],
dependencies: libm,
install: true)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment