build with Meson instead of autotools
So long, autotools! This is my last MPD related project to migrate away from it. It has its strengths, but also very obvious weaknesses and weirdnesses. Today, many of its quirks are not needed anymore, and are cumbersome and slow. Now welcome our new Meson overlords!
This commit is contained in:
44
src/input/meson.build
Normal file
44
src/input/meson.build
Normal file
@@ -0,0 +1,44 @@
|
||||
input_api = static_library(
|
||||
'input_api',
|
||||
'Error.cxx',
|
||||
'InputStream.cxx',
|
||||
'ThreadInputStream.cxx',
|
||||
'AsyncInputStream.cxx',
|
||||
'ProxyInputStream.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
input_api_dep = declare_dependency(
|
||||
link_with: input_api,
|
||||
dependencies: [
|
||||
event_dep,
|
||||
],
|
||||
)
|
||||
|
||||
subdir('plugins')
|
||||
|
||||
input_glue = static_library(
|
||||
'input_glue',
|
||||
'Init.cxx',
|
||||
'Registry.cxx',
|
||||
'Open.cxx',
|
||||
'LocalOpen.cxx',
|
||||
'ScanTags.cxx',
|
||||
'Reader.cxx',
|
||||
'TextInputStream.cxx',
|
||||
'ProxyInputStream.cxx',
|
||||
'RewindInputStream.cxx',
|
||||
'BufferedInputStream.cxx',
|
||||
'MaybeBufferedInputStream.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
input_glue_dep = declare_dependency(
|
||||
link_with: input_glue,
|
||||
dependencies: [
|
||||
input_plugins_dep,
|
||||
fs_dep,
|
||||
config_dep,
|
||||
tag_dep,
|
||||
],
|
||||
)
|
110
src/input/plugins/meson.build
Normal file
110
src/input/plugins/meson.build
Normal file
@@ -0,0 +1,110 @@
|
||||
input_plugins_sources = [
|
||||
'FileInputPlugin.cxx',
|
||||
]
|
||||
|
||||
if alsa_dep.found()
|
||||
input_plugins_sources += 'AlsaInputPlugin.cxx'
|
||||
endif
|
||||
|
||||
libcdio_paranoia_dep = dependency('libcdio_paranoia', version: '>= 0.4', required: get_option('cdio_paranoia'))
|
||||
conf.set('ENABLE_CDIO_PARANOIA', libcdio_paranoia_dep.found())
|
||||
if libcdio_paranoia_dep.found()
|
||||
input_plugins_sources += 'CdioParanoiaInputPlugin.cxx'
|
||||
|
||||
conf.set('HAVE_CDIO_PARANOIA_PARANOIA_H',
|
||||
compiler.has_header('cdio/paranoia/paranoia.h',
|
||||
dependencies: libcdio_paranoia_dep))
|
||||
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'))
|
||||
conf.set('ENABLE_MMS', libmms_dep.found())
|
||||
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
|
||||
enable_qobuz = curl_dep.found() and yajl_dep.found() and gcrypt_dep.found()
|
||||
if not enable_qobuz and qobuz_feature.enabled()
|
||||
error('Qobuz requires CURL, libyajl and libgcrypt')
|
||||
endif
|
||||
endif
|
||||
conf.set('ENABLE_QOBUZ', enable_qobuz)
|
||||
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
|
||||
conf.set('ENABLE_TIDAL', enable_tidal)
|
||||
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: [
|
||||
alsa_dep,
|
||||
curl_dep,
|
||||
ffmpeg_dep,
|
||||
libcdio_paranoia_dep,
|
||||
libmms_dep,
|
||||
nfs_dep,
|
||||
smbclient_dep,
|
||||
yajl_dep,
|
||||
gcrypt_dep,
|
||||
],
|
||||
)
|
||||
|
||||
input_plugins_dep = declare_dependency(
|
||||
link_with: input_plugins,
|
||||
dependencies: [
|
||||
input_api_dep,
|
||||
pcm_dep,
|
||||
],
|
||||
)
|
Reference in New Issue
Block a user