diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2016-03-19 15:40:22 +0000 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-10-28 22:29:08 +0530 |
commit | c2b542b6c02bafbe7a83b2eeec6cb5a0bfa3ed0d (patch) | |
tree | d788ad2c57bd1ccaae6aa73dced21c83c59df1b1 /src | |
parent | 034c1b61a250457649d788bbf983b3f0fb63f02e (diff) | |
download | opus-c2b542b6c02bafbe7a83b2eeec6cb5a0bfa3ed0d.tar.gz |
Add support for Meson build system
Tested on:
- Linux/x86* with gcc
- Android armv7 arm64 x86 x86_64 with clang
- Windows x86 x86_64 with Visual Studio 2017
- Windows x86 x86_64 with MinGW
- macOS x86_64 with clang
- iOS arm64 x86_64 with clang
Co-authored by: Nirbheek Chauhan <nirbheek@centricular.com>
https://gitlab.xiph.org/xiph/opus/-/merge_requests/13
Diffstat (limited to 'src')
-rw-r--r-- | src/meson.build | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/meson.build b/src/meson.build new file mode 100644 index 00000000..cc07ff06 --- /dev/null +++ b/src/meson.build @@ -0,0 +1,45 @@ +opus_sources = sources['OPUS_SOURCES'] + +opus_sources_float = sources['OPUS_SOURCES_FLOAT'] + +if not disable_float_api + opus_sources += opus_sources_float +endif + +opus_lib_c_args = [] +if host_machine.system() == 'windows' + opus_lib_c_args += ['-DDLL_EXPORT'] +endif + +opus_lib = library('opus', + opus_sources, + version: libversion, + darwin_versions: macosversion, + c_args: opus_lib_c_args, + include_directories: opus_includes, + link_with: [celt_lib, silk_lib], + dependencies: libm, + install: true) + +opus_dep = declare_dependency(link_with: opus_lib, + include_directories: opus_public_includes) + +# Extra uninstalled Opus programs +if not extra_programs.disabled() + foreach prog : ['opus_compare', 'opus_demo', 'repacketizer_demo'] + executable(prog, '@0@.c'.format(prog), + include_directories: opus_includes, + link_with: opus_lib, + dependencies: libm, + install: false) + endforeach + + if opt_custom_modes + executable('opus_custom_demo', '../celt/opus_custom_demo.c', + include_directories: opus_includes, + link_with: opus_lib, + dependencies: libm, + install: false) + endif + +endif |