meson.build 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # Sources for compilation in the library
  2. speex_sources = files([
  3. 'cb_search.c',
  4. 'exc_10_32_table.c',
  5. 'exc_8_128_table.c',
  6. 'filters.c',
  7. 'gain_table.c',
  8. 'hexc_table.c',
  9. 'high_lsp_tables.c',
  10. 'lsp.c',
  11. 'ltp.c',
  12. 'speex.c',
  13. 'stereo.c',
  14. 'vbr.c',
  15. 'vq.c',
  16. 'bits.c',
  17. 'exc_10_16_table.c',
  18. 'exc_20_32_table.c',
  19. 'exc_5_256_table.c',
  20. 'exc_5_64_table.c',
  21. 'gain_table_lbr.c',
  22. 'hexc_10_32_table.c',
  23. 'lpc.c',
  24. 'lsp_tables_nb.c',
  25. 'modes.c',
  26. 'modes_wb.c',
  27. 'nb_celp.c',
  28. 'quant_lsp.c',
  29. 'sb_celp.c',
  30. 'speex_callbacks.c',
  31. 'speex_header.c',
  32. 'window.c',
  33. ])
  34. if fft_used == 'kiss'
  35. # Use KISS Fast Fourier Transform
  36. speex_sources += files(['kiss_fft.c', 'kiss_fftr.c'])
  37. cdata.set('USE_KISS_FFT', true)
  38. elif fft_used == 'smallft'
  39. # Use FFT from OggVorbis
  40. speex_sources += files(['smallft.c'])
  41. cdata.set('USE_SMALLFT', true)
  42. endif
  43. if opt_vorbis_psy
  44. speex_sources += files(['vorbis_psy.c'])
  45. cdata.set('VORBIS_PSYCHO', true)
  46. endif
  47. libm = cc.find_library('m', required: false)
  48. libspeex = library('speex', speex_sources, speex_config_types_h,
  49. include_directories: [config_inc, speex_incs],
  50. dependencies: [fft_dep, libm],
  51. gnu_symbol_visibility: 'hidden',
  52. vs_module_defs: 'speex.def',
  53. version: libversion,
  54. install: true)
  55. speex_dep = declare_dependency(link_with: libspeex,
  56. include_directories: speex_incs)
  57. meson.override_dependency('speex', speex_dep)
  58. # pkg-config file
  59. pkg = import('pkgconfig')
  60. pkg.generate(libspeex,
  61. name: 'speex',
  62. description: 'Speex is an audio codec tuned for speech',
  63. version: meson.project_version())
  64. if not get_option('test-binaries').disabled()
  65. foreach bin : ['testenc', 'testenc_wb', 'testenc_uwb']
  66. executable(bin, '@0@.c'.format(bin),
  67. include_directories: config_inc,
  68. dependencies: [speex_dep, libm],
  69. install: false)
  70. endforeach
  71. endif