summaryrefslogtreecommitdiff
path: root/ext/dts/meson.build
blob: 8ab3fc917f03ef62ec0b21f89983b9ce4f779260 (plain)
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
# Don't do any dependency checks if disabled
if get_option('dts').disabled()
  subdir_done()
endif

# Detect libdca using a pkg-config file, or manually
dca_dep = dependency('libdca', required : false)
if not dca_dep.found()
  if cc.has_header_symbol('dca.h', 'dca_init')
    dca_dep = cc.find_library('dca', required : false)
  endif
  if not dca_dep.found() and get_option('dts').enabled()
    error('DTS plugin enabled, but libdca not found')
  endif
endif

no_warn_c_args = []
if cc.get_id() != 'msvc'
  # autotools didn't use the libdca pkg-config cflags, and they
  # can point to a non-existing location (/usr/include/dca)
  no_warn_c_args = ['-Wno-missing-include-dirs']
endif

if dca_dep.found()
  gstdtsdec = library('gstdtsdec',
    'gstdtsdec.c',
    c_args : gst_plugins_bad_args + no_warn_c_args,
    link_args : noseh_link_args,
    include_directories : [configinc, libsinc],
    dependencies : [gstaudio_dep, orc_dep, dca_dep],
    install : true,
    install_dir : plugins_install_dir,
  )
  pkgconfig.generate(gstdtsdec, install_dir : plugins_pkgconfig_install_dir)
  plugins += [gstdtsdec]
endif