meson.build 2.55 KB
Newer Older
1 2 3 4
input_plugins_sources = [
  'FileInputPlugin.cxx',
]

5 6 7 8
if uring_dep.found()
  input_plugins_sources += 'UringInputPlugin.cxx'
endif

9 10 11 12
if alsa_dep.found()
  input_plugins_sources += 'AlsaInputPlugin.cxx'
endif

13
libcdio_paranoia_dep = dependency('libcdio_paranoia', version: '>= 10.2+0.93+1', required: get_option('cdio_paranoia'))
14
input_features.set('ENABLE_CDIO_PARANOIA', libcdio_paranoia_dep.found())
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
if libcdio_paranoia_dep.found()
  input_plugins_sources += 'CdioParanoiaInputPlugin.cxx'
endif

if curl_dep.found()
  input_plugins_sources += [
    'CurlInputPlugin.cxx',
    '../IcyInputStream.cxx',
    '../../IcyMetaDataParser.cxx',
  ]
endif

if ffmpeg_dep.found()
  input_plugins_sources += 'FfmpegInputPlugin.cxx'
endif

libmms_dep = dependency('libmms', version: '>= 0.4', required: get_option('mms'))
32
input_features.set('ENABLE_MMS', libmms_dep.found())
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
if libmms_dep.found()
  input_plugins_sources += 'MmsInputPlugin.cxx'
endif

if nfs_dep.found()
  input_plugins_sources += 'NfsInputPlugin.cxx'
endif

if smbclient_dep.found()
  input_plugins_sources += 'SmbclientInputPlugin.cxx'
endif

qobuz_feature = get_option('qobuz')
if qobuz_feature.disabled()
  enable_qobuz = false
else
49
  enable_qobuz = curl_dep.found() and yajl_dep.found() and crypto_md5_dep.found()
50 51 52 53
  if not enable_qobuz and qobuz_feature.enabled()
    error('Qobuz requires CURL, libyajl and libgcrypt')
  endif
endif
54
input_features.set('ENABLE_QOBUZ', enable_qobuz)
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
if enable_qobuz
  input_plugins_sources += [
    'QobuzClient.cxx',
    'QobuzErrorParser.cxx',
    'QobuzLoginRequest.cxx',
    'QobuzTrackRequest.cxx',
    'QobuzTagScanner.cxx',
    'QobuzInputPlugin.cxx',
  ]
endif

tidal_feature = get_option('tidal')
if tidal_feature.disabled()
  enable_tidal = false
else
  enable_tidal = curl_dep.found() and yajl_dep.found()
  if not enable_tidal and tidal_feature.enabled()
    error('Tidal requires CURL and libyajl')
  endif
endif
75
input_features.set('ENABLE_TIDAL', enable_tidal)
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
if enable_tidal
  input_plugins_sources += [
    'TidalErrorParser.cxx',
    'TidalLoginRequest.cxx',
    'TidalSessionManager.cxx',
    'TidalTrackRequest.cxx',
    'TidalTagScanner.cxx',
    'TidalInputPlugin.cxx',
  ]
endif

input_plugins = static_library(
  'input_plugins',
  input_plugins_sources,
  include_directories: inc,
  dependencies: [
92
    log_dep,
93 94 95 96 97 98 99 100
    alsa_dep,
    curl_dep,
    ffmpeg_dep,
    libcdio_paranoia_dep,
    libmms_dep,
    nfs_dep,
    smbclient_dep,
    yajl_dep,
101
    crypto_md5_dep,
102 103 104 105 106 107 108 109 110 111
  ],
)

input_plugins_dep = declare_dependency(
  link_with: input_plugins,
  dependencies: [
    input_api_dep,
    pcm_dep,
  ],
)