• Max Kellermann's avatar
    build with Meson instead of autotools · 94592c14
    Max Kellermann authored
    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!
    94592c14
meson.build 1.33 KB
playlist_plugins_sources = [
  'ExtM3uPlaylistPlugin.cxx',
  'M3uPlaylistPlugin.cxx',
  'PlsPlaylistPlugin.cxx',
]

playlist_plugins_deps = [
  expat_dep,
  flac_dep,
]

conf.set('ENABLE_CUE', get_option('cue'))
if get_option('cue')
  playlist_plugins_sources += [
    '../cue/CueParser.cxx',
    'CuePlaylistPlugin.cxx',
    'EmbeddedCuePlaylistPlugin.cxx',
  ]
endif

if expat_dep.found()
  playlist_plugins_sources += [
    'XspfPlaylistPlugin.cxx',
    'AsxPlaylistPlugin.cxx',
    'RssPlaylistPlugin.cxx',
  ]
endif

if flac_dep.found()
  playlist_plugins_sources += 'FlacPlaylistPlugin.cxx'
endif

soundcloud_feature = get_option('soundcloud')
if soundcloud_feature.disabled()
  enable_soundcloud = false
else
  enable_soundcloud = curl_dep.found() and yajl_dep.found()
  if not enable_soundcloud and soundcloud_feature.enabled()
    error('SoundCloud requires CURL and libyajl')
  endif
endif
conf.set('ENABLE_SOUNDCLOUD', enable_soundcloud)
if enable_soundcloud
  playlist_plugins_sources += 'SoundCloudPlaylistPlugin.cxx'
  playlist_plugins_deps += yajl_dep
endif

playlist_plugins = static_library(
  'playlist_plugins',
  playlist_plugins_sources,
  include_directories: inc,
  dependencies: playlist_plugins_deps,
)

playlist_plugins_dep = declare_dependency(
  link_with: playlist_plugins,
  dependencies: [
    playlist_api_dep,
    tag_dep,
  ],
)