meson.build 673 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
upnp_dep = dependency('libupnp', required: get_option('upnp'))
conf.set('ENABLE_UPNP', upnp_dep.found())
if not upnp_dep.found()
  subdir_done()
endif

if not curl_dep.found()
  error('UPnP requires CURL')
endif

if not expat_dep.found()
  error('UPnP requires expat')
endif

upnp = static_library(
  'upnp',
  'Init.cxx',
  'ClientInit.cxx',
  'Device.cxx',
  'ContentDirectoryService.cxx',
  'Discovery.cxx',
  'ixmlwrap.cxx',
  'Util.cxx',
  include_directories: inc,
  dependencies: [
    upnp_dep,
    curl_dep,
    expat_dep,
  ],
)

upnp_dep = declare_dependency(
  link_with: upnp,
  dependencies: [
    upnp_dep,
    curl_dep,
    expat_dep,
    event_dep,
  ],
)