cache_src = [ 'entry.c', 'handle.c', 'threaded_waits.c', 'backings/memory.c' ] cache_deps = [] cache_args = [] if 'file' in get_option('sources') if naunet_has_mmap cache_src += ['backings/file_mapped.c'] else cache_src += ['backings/file.c'] endif cache_src += ['handlers/file.c'] cache_args += ['-DCACHE_HAVE_FILE'] endif if 'http' in get_option('sources') and naunet_has_curl cache_src += ['handlers/http.c'] endif if 'cdio' in get_option('sources') libcdio_paranoia = dependency('libcdio_paranoia', allow_fallback: true) libcdio_cdda = dependency('libcdio_cdda', allow_fallback: true) if libcdio_paranoia.found() and libcdio_cdda.found() cache_src += ['handlers/cdio.c'] cache_deps += [libcdio_paranoia, libcdio_cdda] cache_args += ['-DCACHE_HAVE_CDIO'] endif endif if 'libdvd' in get_option('sources') libdvdcss = dependency('libdvdcss', allow_fallback: true) libdvdread = dependency('dvdread', allow_fallback: true) libdvdnav = dependency('dvdnav', allow_fallback: true) if libdvdcss.found() and libdvdread.found() and libdvdnav.found() cache_deps += [libdvdcss, libdvdread, libdvdnav] cache_args += ['-DCACHE_HAVE_LIBDVD'] endif endif cache = declare_dependency(sources: cache_src, dependencies: cache_deps, compile_args: cache_args)