meson.build 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. silk_sources = sources['SILK_SOURCES']
  2. silk_sources_sse4_1 = sources['SILK_SOURCES_SSE4_1']
  3. silk_sources_neon_intr = sources['SILK_SOURCES_ARM_NEON_INTR']
  4. silk_sources_fixed_neon_intr = sources['SILK_SOURCES_FIXED_ARM_NEON_INTR']
  5. silk_sources_fixed = sources['SILK_SOURCES_FIXED']
  6. silk_sources_fixed_sse4_1 = sources['SILK_SOURCES_FIXED_SSE4_1']
  7. silk_sources_float = sources['SILK_SOURCES_FLOAT']
  8. if opt_fixed_point
  9. silk_sources += silk_sources_fixed
  10. else
  11. silk_sources += silk_sources_float
  12. endif
  13. silk_includes = [opus_includes, include_directories('float', 'fixed')]
  14. silk_static_libs = []
  15. foreach intr_name : ['sse4_1', 'neon_intr']
  16. have_intr = get_variable('have_' + intr_name)
  17. if not have_intr
  18. continue
  19. endif
  20. intr_sources = get_variable('silk_sources_' + intr_name)
  21. if opt_fixed_point
  22. intr_sources += get_variable('silk_sources_fixed_' + intr_name)
  23. endif
  24. intr_args = get_variable('opus_@0@_args'.format(intr_name), [])
  25. silk_static_libs += static_library('silk_' + intr_name, intr_sources,
  26. c_args: intr_args,
  27. include_directories: silk_includes,
  28. install: false)
  29. endforeach
  30. silk_c_args = []
  31. if host_machine.system() == 'windows'
  32. silk_c_args += ['-DDLL_EXPORT']
  33. endif
  34. silk_lib = static_library('opus-silk',
  35. silk_sources,
  36. c_args: silk_c_args,
  37. include_directories: silk_includes,
  38. link_whole: silk_static_libs,
  39. dependencies: libm,
  40. install: false)