You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
3.2 KiB

6 years ago
6 years ago
  1. #project('spa', 'c')
  2. #cc = meson.get_compiler('c')
  3. #dl_lib = cc.find_library('dl', required : false)
  4. #pthread_lib = dependencies('threads')
  5. #mathlib = cc.find_library('m', required : false)
  6. spa_inc = include_directories('include')
  7. subdir('include')
  8. if not get_option('spa-plugins').disabled()
  9. udevrulesdir = get_option('udevrulesdir')
  10. if udevrulesdir == ''
  11. # absolute path, otherwise meson prepends the prefix
  12. udevrulesdir = '/lib/udev/rules.d'
  13. endif
  14. # plugin-specific dependencies
  15. alsa_dep = dependency('alsa', required: get_option('alsa'))
  16. summary({'ALSA': alsa_dep.found()}, bool_yn: true, section: 'Backend')
  17. bluez_dep = dependency('bluez', version : '>= 4.101', required: get_option('bluez5'))
  18. summary({'Bluetooth audio': bluez_dep.found()}, bool_yn: true, section: 'Backend')
  19. if bluez_dep.found()
  20. sbc_dep = dependency('sbc', required: get_option('bluez5'))
  21. summary({'SBC': sbc_dep.found()}, bool_yn: true, section: 'Bluetooth audio codecs')
  22. ldac_dep = dependency('ldacBT-enc', required : get_option('bluez5-codec-ldac'))
  23. summary({'LDAC': ldac_dep.found()}, bool_yn: true, section: 'Bluetooth audio codecs')
  24. ldac_abr_dep = dependency('ldacBT-abr', required : get_option('bluez5-codec-ldac'))
  25. summary({'LDAC ABR': ldac_abr_dep.found()}, bool_yn: true, section: 'Bluetooth audio codecs')
  26. aptx_dep = dependency('libopenaptx', version : '< 0.2.1', required : get_option('bluez5-codec-aptx'))
  27. summary({'aptX': aptx_dep.found()}, bool_yn: true, section: 'Bluetooth audio codecs')
  28. fdk_aac_dep = dependency('fdk-aac', required : get_option('bluez5-codec-aac'))
  29. summary({'AAC': fdk_aac_dep.found()}, bool_yn: true, section: 'Bluetooth audio codecs')
  30. endif
  31. avcodec_dep = dependency('libavcodec', required: get_option('ffmpeg'))
  32. jack_dep = dependency('jack', version : '>= 1.9.10', required: get_option('jack'))
  33. summary({'JACK2': jack_dep.found()}, bool_yn: true, section: 'Backend')
  34. vulkan_dep = dependency('vulkan', disabler : true, version : '>= 1.1.69', required: get_option('vulkan'))
  35. vulkan_headers = cc.has_header('vulkan/vulkan.h', dependencies : vulkan_dep)
  36. #summary({'Vulkan': vulkan_headers}, bool_yn: true, section: 'Misc dependencies')
  37. libcamera_dep = dependency('camera', required: get_option('libcamera'))
  38. summary({'libcamera': libcamera_dep.found()}, bool_yn: true, section: 'Camera portal')
  39. # common dependencies
  40. libudev_dep = dependency('libudev', required: alsa_dep.found() or get_option('udev').enabled() or get_option('v4l2').enabled())
  41. summary({'Udev': libudev_dep.found()}, bool_yn: true, section: 'Backend')
  42. subdir('plugins')
  43. endif
  44. subdir('tools')
  45. subdir('tests')
  46. if not get_option('examples').disabled()
  47. subdir('examples')
  48. endif
  49. spa_dep = declare_dependency(
  50. include_directories : [spa_inc],
  51. version : spaversion,
  52. variables : { 'plugindir' : meson.current_build_dir() / 'plugins' }
  53. )
  54. pkgconfig.generate(filebase : 'lib@0@'.format(spa_name),
  55. name : 'libspa',
  56. subdirs : spa_name,
  57. description : 'Simple Plugin API',
  58. version : spaversion,
  59. extra_cflags : '-D_REENTRANT',
  60. variables : ['plugindir=${libdir}/@0@'.format(spa_name)],
  61. uninstalled_variables : ['plugindir=${prefix}/spa/plugins'],
  62. )
  63. meson.override_dependency('lib@0@'.format(spa_name), spa_dep)