• 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.11 KB
storage_plugins_sources = [
  'LocalStorage.cxx',
]

webdav_option = get_option('webdav')
enable_webdav = false
if not webdav_option.disabled()
  enable_webdav = true

  if not curl_dep.found()
    if webdav_option.enabled()
      error('WebDAV requires CURL')
    endif
    enable_webdav = false
  endif

  if not expat_dep.found()
    if webdav_option.enabled()
      error('WebDAV requires Expat')
    endif
    enable_webdav = false
  endif

  if enable_webdav
    storage_plugins_sources += 'CurlStorage.cxx'
  endif
endif
conf.set('ENABLE_WEBDAV', enable_webdav)

if nfs_dep.found()
  storage_plugins_sources += 'NfsStorage.cxx'
endif

if smbclient_dep.found()
  storage_plugins_sources += 'SmbclientStorage.cxx'
endif

if enable_udisks
  storage_plugins_sources += 'UdisksStorage.cxx'
endif

storage_plugins = static_library(
  'storage_plugins',
  storage_plugins_sources,
  include_directories: inc,
  dependencies: [
    curl_dep,
    dbus_dep,
    expat_dep,
    nfs_dep,
    smbclient_dep,
  ],
)

storage_plugins_dep = declare_dependency(
  link_with: storage_plugins,
  dependencies: [
    storage_api_dep,
    fs_dep,
  ],
)